Skip to main content

Query

Query

This method performs an SQL query on an InterSystems IRIS table and returns the results. The request body is a JSON object which specifies the query. It returns an array of objects that match the query conditions. Each returned object contains information relating to one row returned by the query. ee the class reference for Query()Opens in a new tab for supported parameters.

URL

POST https://<baseURL>/api/atelier/v1/namespace/action/query

Where <baseURL> is the base URL for your instance.

The SQL query is specified in the body of the URL request. The query must specify a database in the specified namespace.

This call requires the header Content-Type application/json.

JSON Messages

Return content is an array of objects. Errors will be in the status property of each source code file object:

{
  "status": {
    "errors": [],
    "summary": ""
  },
  "console": [],
  "result": {
    "content": [
      {
        "ID": "%all",
        "Description": "The Super-User Role"
      },
      {
        "ID": "%db_%default",
        "Description": "R/W access for this resource"
      },
      {
        "ID": "%db_irislocaldata",
        "Description": "R/W access for this resource"
      },
      ...
      {
        "ID": "%sqltunetable",
        "Description": "Role for use by tunetable to sample tables irrespective of row level security"
      }
    ]
  }
}

HTTP Return Codes

  • HTTP 200 if OK.

  • HTTP 415 if the passed content type is not application/json.

  • HTTP 500 if an unexpected error occurred (details will be in status error array).

FeedbackOpens in a new tab