oos-utils
oos-utils copied to clipboard
REST Utils
Create a new REST package.
Things to add:
- error: This will pass in a record table object which then loops over the errors, generates the proper JSON object (use APEX 4.2
apex_javascriptfor this) and then calls theowa_util:
owa_util.status_line(nstatus => 400, creason => '', bclose_header => false);
owa_util.mime_header(ccontent_type => 'application/json');
owa_util.http_header_close;
Error ideas: http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
Ideas: http://raml.org/ http://swagger.io/
Codes: For oos-utils: https://twiki.cern.ch/twiki/bin/view/DB/DevelopingOracleRestfulServices There’s a link there for REstful http statuses: http://www.restapitutorial.com/httpstatuscodes.html
It looks like this Alexandria project has some code to deal with REST\SOAP. I haven't personally audited the code, nor do I have any experience with it, I just happened to stumble across it the other day.
https://github.com/mortenbra/alexandria-plsql-utils