API: Custom Options

Linked Properties

Link Description Type Constraints Supported operations
self This custom option CustomOption not null READ

Local Properties

Property Description Type Constraints Supported operations
id The identifier Integer READ
value The value defined for this custom option String READ

custom options are options of list custom fields.

Methods

View custom option

id
integer

required path

The custom option’s identifier

Example:
1

200

OK

{
  "_links": {
    "self": {
      "href": "/api/v3/custom_options/1"
    }
  },
  "_type": "CustomOption",
  "value": "Foo"
}
CustomOptionModel
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "The identifier",
      "readOnly": true
    },
    "value": {
      "type": "string",
      "description": "The value defined for this custom option",
      "readOnly": true
    },
    "_links": {
      "type": "object",
      "required": [
        "self"
      ],
      "properties": {
        "self": {
          "allOf": [
            {
              "$ref": "#/components/schemas/Link"
            },
            {
              "description": "This custom option.\n\n**Resource**: CustomOption",
              "readOnly": true
            }
          ]
        }
      }
    }
  },
  "example": {
    "_links": {
      "self": {
        "href": "/api/v3/custom_options/1"
      }
    },
    "_type": "CustomOption",
    "value": "Foo"
  }
}

404

Returned if the custom option does not exist or the client does not have sufficient permissions to see it.

Required permission: view work package in any project the custom option’s custom field is active in.

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The requested resource could not be found."
}
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."
    }
  }
}