Query Workers

Import custom query workers

Import custom queries.

post/_fabric/{fabric}/_api/restql/import

Request

Path parameters

fabricstring string required

Fabric name for which to import queries.

Request body

detailsboolean

If true extra information for errors will be returned in the result.

Example request

{
  "queries": [
    {
      "name": "testQueryName",
      "value": "for u in testCollection return u",
      "parameter": {},
      "type": "c8ql"
    }
  ]
}

Response

Successfully imported queries.

If there are any errors, an additional header X-C8-Error-Codes is set, that contains a map of the error codes that occurred together with their multiplicities, as in: 1205:10,1210:17 which means that in 10 cases the error 1205 "illegal document handle" and in 17 cases the error 1210 "unique constraint violated" has happened. The response body has additional failed document details in details object.

errorboolean

Flag if there was an error (true) or not (false). It is always true in this response.

codeinteger

The response code.

Example response

{
  "code": 200,
  "result": {
    "created": 10,
    "details": {
      "errors": [
        {
          "errorNumber": 102022,
          "errorMessage": "The error message"
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.