API Data: Difference between revisions
From Golden Retriever Wiki
Created page with "Once you have the Dictionary_no you wish to pull the data from (Use the Dictionary endpoint to find the Dictionary_no ) you can use the following format to pull the data. '''curl -X GET -H "Content-Type: application/json" -H "authorization: <api_key>" "<nowiki>https://api.thedog.io/data/{Dictionary_no}</nowiki>"''' Each response from the API will be in the following JSON format: { "message": "Successful", "skip": 0, "limit": 10,..." |
No edit summary |
||
Line 1: | Line 1: | ||
Once you have the Dictionary_no you wish to pull the data from (Use the [[API_Dictionary|Dictionary]] endpoint to find the Dictionary_no ) you can use the following format to pull the data. | Once you have the Dictionary_no you wish to pull the data from (Use the [[API_Dictionary|Dictionary]] endpoint to find the Dictionary_no) you can use the following format to pull the data. | ||
'''curl -X GET -H "Content-Type: application/json" -H "authorization: <api_key>" "<nowiki>https://api.thedog.io/data/{Dictionary_no}</nowiki>"''' | '''curl -X GET -H "Content-Type: application/json" -H "authorization: <api_key>" "<nowiki>https://api.thedog.io/data/{Dictionary_no}</nowiki>"''' |
Latest revision as of 16:42, 22 December 2023
Once you have the Dictionary_no you wish to pull the data from (Use the Dictionary endpoint to find the Dictionary_no) you can use the following format to pull the data.
curl -X GET -H "Content-Type: application/json" -H "authorization: <api_key>" "https://api.thedog.io/data/{Dictionary_no}"
Each response from the API will be in the following JSON format:
{ "message": "Successful", "skip": 0, "limit": 10, "total": 15, "data": [] }
"message" will either be "Successful" or an error message. "skip" is how many records into the query we skipped, "limit" is how many objects we returned. "total" is the total amount of objects that are available. And "data" is an array of objects containing the results.