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

createCustomFieldOption

Create custom field options (context)

Details

  • Method: POST
  • Path: /rest/api/3/field/{fieldId}/context/{contextId}/option
  • Operation ID: createCustomFieldOption

Parameters

{
  "fieldId": {
    "description": "The ID of the custom field.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "contextId": {
    "description": "The ID of the context.",
    "required": true,
    "location": "path",
    "type": "integer",
    "format": "int64"
  },
  "options": {
    "description": "Details of options to create.",
    "required": false,
    "location": "body",
    "type": "array"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "A list of custom field options for a context.",
  "properties": {
    "options": {
      "description": "The created custom field options.",
      "items": {
        "additionalProperties": false,
        "description": "Details of the custom field options for a context.",
        "properties": {
          "disabled": {
            "description": "Whether the option is disabled.",
            "type": "boolean"
          },
          "id": {
            "description": "The ID of the custom field option.",
            "type": "string"
          },
          "optionId": {
            "description": "For cascading options, the ID of the custom field option containing the cascading option.",
            "type": "string"
          },
          "value": {
            "description": "The value of the custom field option.",
            "type": "string"
          }
        },
        "required": [
          "disabled",
          "id",
          "value"
        ],
        "type": "object"
      },
      "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('createCustomFieldOption', {
    # Add required parameters here
})