-
mukaddeskonak23 Ocak 2024 03:35 tarihinde soruldu
Merhaba formlarımın Görüntülenme sayısını apıden almam gerekiyor yardımcı olur musunuz?
-
Frédéric Jotform Support23 Ocak 2024 06:23 tarihinde yanıtlandı
Hi Mukaddes,
Thanks for reaching out to Jotform Support. Unfortunately, our Turkish Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Turkish, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.
Now, let me help you with your question. To get the number of submissions of your forms by the means of the API, it's really easy, Let me walk you through the steps:
- First, in the API page of your Account Settings, if not already done, click on Create API button to create an API key and copy it. Here I used a key with Read Access only to avoid changes when collecting the data.
- Then, in your script or terminal, run the following command:
curl -X GET "https://api.jotform.com/form/{formID}/submissions?apiKey={YourAPIkey}
where {formID] is the ID of the form and {YourAPIkey} is the key you copied from your API settings as described above.
As a result, we got a JSON code describing all the submissions of the form that you can save, and/or parse to get only the number of submissions. For instance, I can run in a shell,using the command jq to parse:
curl -X GET "https://eu-api.jotform.com/form/232926900302045/submissions?apiKey=thisismykey" | jq '.'
returns the following result with all the details of the submissions (note that I'm using the URL which includes 'eu' in the URL since I'm actually using an European Jotform datacenter).
Or, using in a Linux shell the commands curl, jq, grep and wc, returns 8 subsmissions:You might also want to check out the API doc to have more details.
Give it a try and let us know how it goes.