getOptionsForContext
Get custom field options (context)
Details
- Method:
GET - Path:
/rest/api/3/field/{fieldId}/context/{contextId}/option - Operation ID:
getOptionsForContext
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"
},
"optionId": {
"description": "The ID of the option.",
"required": false,
"location": "query",
"type": "integer",
"format": "int64"
},
"onlyOptions": {
"description": "Whether only options are returned.",
"required": false,
"location": "query",
"type": "boolean"
},
"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"
}
}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 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"
},
"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('getOptionsForContext', {
# Add required parameters here
})