Open Context Protocol is live! 🚀 Read the launch post
getAllIssueFieldOptions

getAllIssueFieldOptions

Get all issue field options

Details

  • Method: GET
  • Path: /rest/api/3/field/{fieldKey}/option
  • Operation ID: getAllIssueFieldOptions

Parameters

{
  "startAt": {
    "description": "The index of the first item to return in a page of results (page offset).",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int64"
  },
  "maxResults": {
    "description": "The maximum number of items to return per page.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  },
  "fieldKey": {
    "description": "The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following:\n\n *  open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager.\n *  run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"`",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "A page of items.",
  "properties": {
    "isLast": {
      "description": "Whether this is the last page.",
      "readOnly": true,
      "type": "boolean"
    },
    "maxResults": {
      "description": "The maximum number of items that could be returned.",
      "format": "int32",
      "readOnly": true,
      "type": "integer"
    },
    "nextPage": {
      "description": "If there is another page of results, the URL of the next page.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "self": {
      "description": "The URL of the page.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "startAt": {
      "description": "The index of the first item returned.",
      "format": "int64",
      "readOnly": true,
      "type": "integer"
    },
    "total": {
      "description": "The number of items returned.",
      "format": "int64",
      "readOnly": true,
      "type": "integer"
    },
    "values": {
      "description": "The list of items.",
      "items": {
        "additionalProperties": false,
        "description": "Details of the options for a select list issue field.",
        "properties": {
          "config": {
            "additionalProperties": false,
            "description": "Details of the projects the option is available in.",
            "properties": {
              "attributes": {
                "description": "DEPRECATED",
                "items": {
                  "enum": [
                    "notSelectable",
                    "defaultValue"
                  ],
                  "type": "string"
                },
                "type": "array",
                "uniqueItems": true
              },
              "scope": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/IssueFieldOptionScopeBean"
                  }
                ],
                "description": "Defines the projects that the option is available in. If the scope is not defined, then the option is available in all projects."
              }
            },
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the option. This is only unique within the select field's set of options.",
            "format": "int64",
            "type": "integer"
          },
          "properties": {
            "additionalProperties": {},
            "description": "The properties of the object, as arbitrary key-value pairs. These properties can be searched using JQL, if the extractions (see [Issue Field Option Property Index](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/)) are defined in the descriptor for the issue field module.",
            "type": "object"
          },
          "value": {
            "description": "The option's name, which is displayed in Jira.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "value"
        ],
        "type": "object"
      },
      "readOnly": true,
      "type": "array"
    }
  },
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('jira')

# Call this tool
result = await agent.call_tool('getAllIssueFieldOptions', {
    # Add required parameters here
})