2 Replies Latest reply on Sep 15, 2015 7:12 AM by User595758-OC

    post request in json format (standalone development)

    User595758-OC

      hi,

       

      i m trying to insert a new record into emp table by issuing a POST request on my standalone env. for development purposes.

       

      i m able to hit GET request. URI is : http://localhost:8080/ords/hr/emp/ . 

       

      But when i try to insert a new record to emp table by issuing a POST request  i m getting 400 Bad Request status code.


      my payload is in json format:


      {

      "EMPLOYEE_ID" : 230,

      "FIRST_NAME" : "JOE",

        "LAST_NAME" : "PESCI"

      }

       

      and sqldeveloper console log message is :

      java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("HR"."EMPLOYEES"."EMPLOYEE_ID")

      ORA-06512: at line 4

       

      i think there is something that i miss. So i m not able to insert new record to emp table by using POST request.



      postRequest.PNG