DEV Community

Cover image for REST API Guide

REST API Guide

Douglas Minnaar on February 02, 2020

tl;dr This is a guide with the goal of laying down foundational knowledge that is required when speaking about building REST API's. The ...
Collapse
 
rajneeshshukl14 profile image
Rajneesh shukla • Edited

Hello All,

I need to discuss regarding RESTful API for accessing oracle database tables.
API was created using Oracle Rest Data Services (rest data enable at SQL developer).
I am getting error : 401 unauthorized while doing query through post man as below:

GET localhost:8080/ords/autodemo2/meta...

However below is working fine (code 200 OK):
localhost:8080/ords/autodemo2/open...

Not sure why metadata query is facing authorization issue while swagger(open API) one is giving response without issue at postman.

I tried for other schema alias autodemo and here both are giving proper response:
localhost:8080/ords/autodemo/metad...
localhost:8080/ords/autodemo/open-...

Thanks,
Rajneesh

Collapse
 
aaronscribner profile image
aaronscribner

Please fix your HTTP reference chart. The /{id} needs to be removed from the POST.

Collapse
 
drminnaar profile image
Douglas Minnaar

Sorted! Thanks

Collapse
 
bogicevic7 profile image
Dragoljub Bogićević

Great post! Perhaps you should mention 202 HTTP status code for async resource creation.

Collapse
 
bpkinez profile image
Branislav Petrović

Great article! I like the way you explaining things, simple and understandable. Kudos for Github example.

Thanks Douglas