Post SQL query to OIPA

post

/PASService/rest/services/v1/queries

Inserts a SQL query in the database.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: string
Back to Top

Response

201 Response

This response code indicates instertion of a SQL query in the database successfully.
Back to Top

Examples

This example describes how to insert a SQL query in the database.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \   
     -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -L "http://server:port/PASService/rest/services/v1/queries" \
     -d '{"Use this placeholder to plug-in the example request body given below"}'

Note:

The Request body of this request is dynamic and depends on the configuration. The query name needs to be saved in the database table.

Example Request Body

The following shows an example of the request body in JSON format:


{
  "applicationName": "test",
  "queries": [
    {
      "queryName": "testQuery",
      "queryValue": "select * from asPolicy"
    }
  ]
}
Back to Top