Skip to main content

%Api.Atelier.v6

class %Api.Atelier.v6 extends %Api.Atelier.v5

%Api.Atelier.v6 provides version 6 APIs for Atelier

Method Inventory

Methods

classmethod Query(pNamespace As %String) as %Status
This method returns the results of running the specified query in the specified namespace.
The request body is simply a JSON object which specifies the query:
{
  "query": "SELECT TOP 1 Name FROM %Dictionary.ClassDefinition",
  "parameters" : []
}

The URL parameter ?max= can be passed to specify the maximum number of rows to return. The value must be a positive integer or the default behavior (return all rows) will be used.

HTTP Codes returned:-

HTTP 200 if OK
HTTP 415 if the we are not passed application/json as the content type
HTTP 500 if an error occurs (details will be in status error array)

If the URL parameter ?positional=1 is passed, the return object key will contain an array of objects, one for each result set, that contains the column metadata and the values for each row in separate arrays:
{
  "status": {
    "errors": [],
    "summary": ""
  },
  "console": [],
  "result": [
     {
       "columns": [
         {
           "name": "Name",
           "type": "VARCHAR(4096)"
         }
       ],
       "content": [
         [
           "%Api.Atelier"
         ]
       ]
     }
  ]
}

If the positional URL parameter is not passed or the value is not 1, the return content will be an array of objects.
The objects contain information relating to each row returned by the query:
{
  "status": {
    "errors": [],
    "summary": ""
  },
  "console": [],
  "result": {
    "content": [
      {
        "Name": "%Api.Atelier"
      }
    ]
  }
}

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab