API: Statuses

Linked Properties

Link Description Type Constraints Supported operations
self This status Status not null READ

Local Properties

Property Description Type Constraints Supported operations
id Status id Integer x > 0 READ
name Status name String READ
position Sort index of the status Integer READ
isDefault Boolean READ
isClosed are tickets of this status considered closed? Boolean READ
isReadonly are tickets of this status read only? Boolean READ
defaultDoneRatio The percentageDone being applied when changing to this status Integer 0 <= x <= 100 READ

Methods

List all statuses

No parameters

200

OK

{
  "_embedded": {
    "elements": [
      {
        "_links": {
          "self": {
            "href": "/api/v3/statuses/1"
          }
        },
        "_type": "Status",
        "defaultDoneRatio": 0,
        "id": 1,
        "isClosed": false,
        "isDefault": true,
        "name": "New",
        "position": 1
      },
      {
        "_links": {
          "self": {
            "href": "/api/v3/statuses/3"
          }
        },
        "_type": "Status",
        "defaultDoneRatio": 75,
        "id": 3,
        "isClosed": false,
        "isDefault": false,
        "isReadonly": false,
        "name": "Resolved",
        "position": 3
      },
      {
        "_links": {
          "self": {
            "href": "/api/v3/statuses/4"
          }
        },
        "_type": "Status",
        "defaultDoneRatio": 25,
        "id": 4,
        "isClosed": false,
        "isDefault": false,
        "name": "Feedback",
        "position": 4
      },
      {
        "_links": {
          "self": {
            "href": "/api/v3/statuses/5"
          }
        },
        "_type": "Status",
        "defaultDoneRatio": 100,
        "id": 5,
        "isClosed": true,
        "isDefault": false,
        "name": "Closed",
        "position": 5
      },
      {
        "_links": {
          "self": {
            "href": "/api/v3/statuses/6"
          }
        },
        "_type": "Status",
        "defaultDoneRatio": 100,
        "id": 6,
        "isClosed": true,
        "isDefault": false,
        "name": "Rejected",
        "position": 6
      },
      {
        "_links": {
          "self": {
            "href": "/api/v3/statuses/2"
          }
        },
        "_type": "Status",
        "defaultDoneRatio": 50,
        "id": 2,
        "isClosed": false,
        "isDefault": false,
        "name": "In Progress",
        "position": 3
      }
    ]
  },
  "_links": {
    "self": {
      "href": "/api/v3/statuses"
    }
  },
  "_type": "Collection",
  "count": 6,
  "total": 6
}
StatusCollectionModel
{
  "allOf": [
    {
      "$ref": "#/components/schemas/CollectionModel"
    },
    {
      "type": "object",
      "required": [
        "_links",
        "_embedded"
      ],
      "properties": {
        "_links": {
          "type": "object",
          "required": [
            "self"
          ],
          "properties": {
            "self": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Link"
                },
                {
                  "description": "This file links collection\n\n**Resource**: StatusCollectionModel"
                }
              ]
            }
          }
        },
        "_embedded": {
          "type": "object",
          "required": [
            "elements"
          ],
          "properties": {
            "elements": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/StatusModel"
              }
            }
          }
        }
      }
    }
  ]
}

403

Returned if the client does not have sufficient permissions.

Required permission: view work package (on any project)

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",
  "message": "You are not allowed to see the statuses."
}
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."
    }
  }
}

View status

id
integer

required path

Status id

Example:
1

200

OK

{
  "_links": {
    "self": {
      "href": "/api/v3/statuses/1"
    }
  },
  "_type": "Status",
  "defaultDoneRatio": 0,
  "id": 1,
  "isClosed": false,
  "isDefault": true,
  "name": "New",
  "position": 1
}
StatusModel
{
  "type": "object",
  "properties": {
    "_type": {
      "type": "string",
      "enum": [
        "Status"
      ]
    },
    "id": {
      "type": "integer",
      "description": "Status id",
      "readOnly": true,
      "minimum": 1
    },
    "name": {
      "type": "string",
      "description": "Status name",
      "readOnly": true
    },
    "position": {
      "type": "integer",
      "description": "Sort index of the status",
      "readOnly": true
    },
    "isDefault": {
      "type": "boolean",
      "readOnly": true
    },
    "isClosed": {
      "type": "boolean",
      "description": "are tickets of this status considered closed?",
      "readOnly": true
    },
    "isReadonly": {
      "type": "boolean",
      "description": "are tickets of this status read only?",
      "readOnly": true
    },
    "defaultDoneRatio": {
      "type": "integer",
      "description": "The percentageDone being applied when changing to this status",
      "maximum": 100
    },
    "_links": {
      "type": "object",
      "required": [
        "self"
      ],
      "properties": {
        "self": {
          "allOf": [
            {
              "$ref": "#/components/schemas/Link"
            },
            {
              "description": "This status\n\n**Resource**: Status",
              "readOnly": true
            }
          ]
        }
      }
    }
  },
  "example": {
    "_links": {
      "self": {
        "href": "/api/v3/statuses/1"
      }
    },
    "_type": "Status",
    "id": 1,
    "name": "New",
    "position": 1,
    "isDefault": true,
    "isClosed": false,
    "defaultDoneRatio": 0
  }
}

403

Returned if the client does not have sufficient permissions.

Required permission: view work package (on any project)

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",
  "message": "You are not allowed to see this status."
}
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."
    }
  }
}