API: Query Operators

A QueryOperator can be referenced by a QueryFilter to denote the operator to be applied to the filter relation.

Actions

As of now, no actions are defined.

Linked Properties

Property Description Type Constraints Supported operations
self This query operator QueryOperator not null READ

Local Properties

Property Description Type Constraints Supported operations
id Query operator id String not null READ
name Query operator name String not null READ

Methods

View query operator

Retrieve an individual QueryOperator as identified by the id parameter.

id
string

required path

QueryOperator id

Example:
!

200

OK

{
  "_links": {
    "self": {
      "href": "/api/v3/queries/operators/!",
      "title": "is not"
    }
  },
  "_type": "QueryOperator",
  "id": "!",
  "name": "is not"
}
Query_OperatorModel
{
  "type": "object",
  "required": [
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Query operator id",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "Query operator name"
    }
  },
  "example": {
    "_type": "QueryOperator",
    "id": "!",
    "name": "is not",
    "_links": {
      "self": {
        "href": "/api/v3/queries/operators/!",
        "title": "is not"
      }
    }
  }
}

403

Returned if the client does not have sufficient permissions to see it.

Required permission: view work package in any project

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",
  "message": "You are not authorized to access this resource."
}
ErrorResponse
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string",
              "example": "project"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string",
      "example": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation"
    },
    "message": {
      "type": "string",
      "example": "Project can't be blank."
    }
  }
}

404

Returned if the QueryOperator does not exist.

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The specified query does not exist."
}
ErrorResponse
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string",
              "example": "project"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string",
      "example": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation"
    },
    "message": {
      "type": "string",
      "example": "Project can't be blank."
    }
  }
}