The document describes EyeEm's transition from its second API version to a third, documentation-less version. The third API is designed to be intuitive, flexible, verbose, and discoverable through its use of RESTful principles and HATEOAS. It aims to optimize the developer experience and allow users to easily explore the API functionality through linked relationships between resources. An example is provided of how a user could search for another user, view their photos, like one, and then follow the first liker through linked URLs between the resources.
9. 9
• RESTFUL: correct use of nouns / verbs!
• standard pagination sequencing on
pagination response
after={unique_id},limit=X!
!
• consistent parameters
sort ={time || popular}
type ={nearby || popular …}
ll =52.2513,13.3425
order ={asc || desc}
query ={string}
Intuitive
10. 10
• Optimized for native apps!
• Versioning (qualifier OR uri)!
• “fields” param allows granular control of response
content
users/{id}?fields=id,nickname,group(photos:10)
Flexible
11. 11
• meta object in all responses!
• http code in header and body!
• custom error code w/ link in body!
• custom message in body
Verbose
{
“meta”:{
“http_code”:200,
“message”:“deprecated endpoint”,
“error_code”:123,
“error_url”:“https://www.github.com/eyeem/
api/wiki/error_123”
}
“data”:{ … }
}