Oracle Magazine, Jan/Feb 2018
Database Developer REST ORACLE MAGAZINE JANUARY FEBRUARY 2018 108 https webserver port ords schema_ sql To issue a POST request you will need to use a command line interface such as CURL or an application such as Postman Here is the CURL command to issue a POST request that contains a simple SELECT query against the HR schema curl i X POST user HR password H Content Type application sql k d select department_ id max salary from employees group by department_ id http localhost 8888 ords hr_ sql Oracle REST Data Services confirms that the schema portion of the URI hr in this case represents a schema that is REST enabled It then attempts to log in to the database as the HR user using the supplied password and if it is successful it runs the attached SQL statement as that user in the database The results from the execution of the SQL statement are then transformed to JSON and returned to the calling client which in this case is the CURL session Below the response for this request has been formatted for easier readability env defaultTimeZone America New_ York items statementId 1
You must have JavaScript enabled to view digital editions.