Line 9: |
Line 9: |
| === API version number === | | === API version number === |
| Add the API version number to each call as a path (Robotoff) | | Add the API version number to each call as a path (Robotoff) |
| + | === Path parameters vs Queries === |
| | | |
| == Output == | | == Output == |
− | === Single Json response === | + | All API calls should result in a json response. |
| + | |
| + | === Single json response === |
| === Response wrapper === | | === Response wrapper === |
− | The wrapper contains the meta data of the response, i.e. whether the request was successful, how many results are available, etc. | + | The wrapper contains the meta data of the response, i.e. whether the request was successful, how many results are available, etc. The usual possible parameters: |
| + | * status (string) - the quality of a successful response: '''found''' or '''not found'''. |
| + | * count (uint) - the number of results |
| + | Missing from this wrapper are the original query, which would make the json-response independent of the query. It would be nice to have as well: |
| + | * number of items in response (uint) - how many items are contained in the response? |
| + | * page number (uint) - which page do these items belong to (is page 0 the first 25 items?) |
| + | * time stamp (time) - so when we look at the json later we can tell how old the data is. |
| + | |
| === Free dictionaries === | | === Free dictionaries === |
| === Dependent field names === | | === Dependent field names === |
| [[Category:API]] | | [[Category:API]] |