The Preside REST framework implementation as of now is already really useful. But there are several things that could be added that would make developing APIs within Preside even more powerful.
There are currently 4 open tickets in Jira regarding possible improvements and new features.
https://presidecms.atlassian.net/browse/PRESIDECMS-421 (swagger integration)
https://presidecms.atlassian.net/browse/PRESIDECMS-462 (multilingual requests)
https://presidecms.atlassian.net/browse/PRESIDECMS-464 (scaffolding endpoints)
Please feel free to comment here or on the individual tickets to push this topic forward. Anyone interested in contributing and/or sharing additional ideas is welcome.
Things that have not been covered yet that might be interesting in the future:
- API monitoring
- request throttling
- authorization (specific users/apikeys only allowed for specific endpoints)
- non-code endpoints (e.g. preside-object itself is annotated as being accessible via REST)
- system endpoints (e.g. for authentication, system objects like languages, maybe pages, sites, etc.)
If we start scaffolding endpoints we need to come up with some sort of reference implementation. How are validation or other errors reported back to the caller (HTTP response headers, a defined response body format, etc.), which HTTP verb translates to which CRUD action. We should have a common understanding of what we would consider best practice.
A good reading on this topic is Adam Tuttle’s book: http://www.restassuredbook.com
We might also have a look at the implementation of the REST stuff in ACF2016 (how they generate swagger specs, what the API Manager is all about). Anyone played with that already?