1 Reply Latest reply on Apr 15, 2016 7:34 AM by IoanaIo

    ORDS Return JSON object in POST call result


      This is an example from Oracle REST Data Services Documentation

      Pattern: POST http://<HOST>:<PORT>/ords/<SchemaAlias>/<ObjectAlias>/


      POST http://localhost:8080/ords/ordstest/emp/

      Content-Type: application/json


      { "empno" :7, "ename": "JBOND", "job":"SPY", "deptno" :11 }


      { "empno": 7,

      "ename": "JBOND",

      "job": "SPY",

      "mgr": null,

      "hiredate": null,

      "sal": null,

      "comm": null,

      "deptno": 11,

      "links": [ {

      "rel": "self", "href": "http://localhost:8080/ords/ordstest/emp/7" },

      { "rel": "edit", "href": "http://localhost:8080/ords/ordstest/emp/7" },

      { "rel": "describedby", "href": "http://localhost:8080/ords/ordstest/metadata-catalog/emp/item" },

      { "rel": "collection", "href": "http://localhost:8080/ords/ordstest/emp/" } ] }


      My question is: how can I display the JSON object in the "Result" box?

      For the moment we are able to return only basic parameters (INT, STRING) defined with ords.define_parameter. The problem is that we can't find a datatype suitable for returning a JSON object in the same way. Our goal is to return an array with the errors from the called post_procedure.

      Are we doing this in the wrong way? Could please someone help?


      I found this discussion Using refcursors, but is only part of what we need. It doesn't work for POST calls. We partially managed to make it work with GET calls.