API: Query Columns

A QueryColumn can be referenced by a Query to denote the work package properties the client should display for the work packages returned as query results. The columns maps to the WorkPackage by the id property. QueryColumns exist in three types: QueryColumn::Property, QueryColumn::RelationToType and QueryColumn::RelationOfType.

Actions

As of now, no actions are defined.

Linked Properties

Property Description Type Constraints Supported operations
self This query column QueryColumn::Property, QueryColumn::RelationToType or QueryColumn::RelationOfType not null READ
 type The type relations point to Type not null, exists only on QueryColumn::Relation READ

Local Properties

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

Methods

View query column

Retrieve an individual QueryColumn as identified by the id parameter.

id
string

required path

QueryColumn id

Example:
priority

200

OK

{
  "_links": {
    "self": {
      "href": "/api/v3/queries/columns/priority",
      "title": "Priority"
    }
  },
  "_type": "QueryColumn::Property",
  "id": "priority",
  "name": "Priority"
}
Query_ColumnModel
{
  "type": "object",
  "required": [
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Query column id",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "Query column name"
    }
  },
  "example": {
    "_type": "QueryColumn::Property",
    "id": "priority",
    "name": "Priority",
    "_links": {
      "self": {
        "href": "/api/v3/queries/columns/priority",
        "title": "Priority"
      }
    }
  }
}

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 QueryColumn 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."
    }
  }
}