I'm Matt, and I am a software engineer at a marketing/lead generation company for higher education. I found the webcast on data-oriented APIs fascinating and am really compelled to start building data-oriented APIs. I'm even thinking about building an open-source framework for data-oriented APIs in Node.js.
My question is: what do we do with methods that just don't directly transcribe to your traditional CRUD operations? For example, I understand the idea of passing some kind of session token with a request in the headers for calls that require a layer of authentication -- but what does the API call that gets this token look like?
In my traditional, operation-driven model, I see an API call that looks like POST /users/logIn {"username":"jdoe","password":"123"}, but that isn't a self-describing API call -- now I need proprietary documentation on the route, the parameters, response codes/messages, etc., making it non-standard. Is there a way to model such a method with a more data-driven approach? It seems to break the purity of these data-oriented approaches, but I can't think of a way to set up more specialized methods without describing arbitrary endpoints.
Examples include:
I realize that you guys probably get a ton of questions from the conferences, but I just happened to find this one very compelling and would like to model my own work after it. I'll definitely be following your future webcasts! Thanks for this insight!
(I tried emailing the webcast email address shown in the presentation but it bounced back.)
UPDATE:
After thinking about this situation for a bit, I had some thoughts about how to approach these examples while keeping to a data model:
Matt
@Matt Miller , Welcome to Apigee Community 🙂
@Matt Miller Thanks for your POST, Matt. These are interesting problems and the general direction you are taking makes sense to us. Marsh and I wrote a blog post with some of our own thoughts on solutions. See what you think: http://apigee.com/about/blog/developer/data-oriented-designs-common-api-problems
Thank you so much! The refund thing was obvious, I don't know why I didn't think of Refund as a different resource entirely, but of course it would be. Your examples really clarified the questions I had, and I really didn't expect you to go all out and write a blog post about it! Very much appreciated, and this helps me model my understanding of "operational" calls closer to their resource representations.
Glad you enjoyed it! And thanks for suggesting a solid blog topic. 🙂
the blog post isnt reachable. is this available elsewhere?
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |