[Moims-dai] Thoughts on REST API
David Giaretta
david at giaretta.org
Tue Apr 30 09:40:14 UTC 2024
As discussed, I looked at examples of REST API's and found (again) https://restfulapi.net/resource-naming/
I think the API in the BB should be changed to be more consistent.
The article suggests:
* Use nouns to represent resources
* Use “/” to indicate hierarchy
* Use hyphens to improve readability
* Do not use underscores
* Use lower case letters in URI
* Never use CRUD function names in URI
Here are some ideas:
1. rather than having the URI named "Get", the GET part is in the type of request, as it shows in the Swagger docs.
2. the resources are
a. Sources such as archives or users etc
b. Information which will be available packaged as general IP or AIP
i. With subtypes RepInfo and PDI elements
c. Data objects
So we should have something like
http://www.oais.info:8085/oaisif/sb/sources to list switchboard entries
http://www.oais.info:8765/oaisif/ga/information - to list information available
http://www.oais.info:8765/oaisif/ga/information?id=nnn –a specific piece of info
http://www.oais.info:8765/oaisif/ga/information/pdi?id=nnn –PDI of specific info
http://www.oais.info:8765/oaisif/ga/information/data?id=nnn – data object of specific info
http://www.oais.info:8765/oaisif/ga/information/repinfo?id=nnn – repinfo object of specific info
http://www.oais.info:8083/oaisif/rr/information – list all repinfo in the RRORI
..David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ccsds.org/pipermail/moims-dai/attachments/20240430/9d34c1f1/attachment-0001.htm>
More information about the MOIMS-DAI
mailing list