getFieldsPaginated
Get fields paginated
Details
- Method:
GET - Path:
/rest/api/3/field/search - Operation ID:
getFieldsPaginated
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"
},
"type": {
"description": "The type of fields to search.",
"required": false,
"location": "query",
"type": "array"
},
"id": {
"description": "The IDs of the custom fields to return or, where `query` is specified, filter.",
"required": false,
"location": "query",
"type": "array"
},
"query": {
"description": "String used to perform a case-insensitive partial match with field names or descriptions.",
"required": false,
"location": "query",
"type": "string"
},
"orderBy": {
"description": "[Order](#ordering) the results by:\n\n * `contextsCount` sorts by the number of contexts related to a field\n * `lastUsed` sorts by the date when the value of the field last changed\n * `name` sorts by the field name\n * `screensCount` sorts by the number of screens related to a field",
"required": false,
"location": "query",
"type": "string",
"enum": [
"contextsCount",
"-contextsCount",
"+contextsCount",
"lastUsed",
"-lastUsed",
"+lastUsed",
"name",
"-name",
"+name",
"screensCount",
"-screensCount",
"+screensCount",
"projectsCount",
"-projectsCount",
"+projectsCount"
]
},
"expand": {
"description": "Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:\n\n * `key` returns the key for each field\n * `stableId` returns the stableId for each field\n * `lastUsed` returns the date when the value of the field last changed\n * `screensCount` returns the number of screens related to a field\n * `contextsCount` returns the number of contexts related to a field\n * `isLocked` returns information about whether the field is locked\n * `searcherKey` returns the searcher key for each custom field",
"required": false,
"location": "query",
"type": "string"
},
"projectIds": {
"description": "The IDs of the projects to filter the fields by. Fields belonging to project Ids that the user does not have access to will not be returned",
"required": false,
"location": "query",
"type": "array"
}
}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 a field.",
"properties": {
"contextsCount": {
"description": "Number of contexts where the field is used.",
"format": "int64",
"type": "integer"
},
"description": {
"description": "The description of the field.",
"type": "string"
},
"id": {
"description": "The ID of the field.",
"type": "string"
},
"isLocked": {
"description": "Whether the field is locked.",
"type": "boolean"
},
"isUnscreenable": {
"description": "Whether the field is shown on screen or not.",
"type": "boolean"
},
"key": {
"description": "The key of the field.",
"type": "string"
},
"lastUsed": {
"additionalProperties": false,
"description": "Information about the most recent use of a field.",
"properties": {
"type": {
"description": "Last used value type:\n\n * *TRACKED*: field is tracked and a last used date is available.\n * *NOT\\_TRACKED*: field is not tracked, last used date is not available.\n * *NO\\_INFORMATION*: field is tracked, but no last used date is available.",
"enum": [
"TRACKED",
"NOT_TRACKED",
"NO_INFORMATION"
],
"type": "string"
},
"value": {
"description": "The date when the value of the field last changed.",
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"name": {
"description": "The name of the field.",
"type": "string"
},
"projectsCount": {
"description": "Number of projects where the field is used.",
"format": "int64",
"type": "integer"
},
"schema": {
"additionalProperties": false,
"description": "The schema of a field.",
"properties": {
"configuration": {
"additionalProperties": {
"readOnly": true
},
"description": "If the field is a custom field, the configuration of the field.",
"readOnly": true,
"type": "object"
},
"custom": {
"description": "If the field is a custom field, the URI of the field.",
"readOnly": true,
"type": "string"
},
"customId": {
"description": "If the field is a custom field, the custom ID of the field.",
"format": "int64",
"readOnly": true,
"type": "integer"
},
"items": {
"description": "When the data type is an array, the name of the field items within the array.",
"readOnly": true,
"type": "string"
},
"system": {
"description": "If the field is a system field, the name of the field.",
"readOnly": true,
"type": "string"
},
"type": {
"description": "The data type of the field.",
"readOnly": true,
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"screensCount": {
"description": "Number of screens where the field is used.",
"format": "int64",
"type": "integer"
},
"searcherKey": {
"description": "The searcher key of the field. Returned for custom fields.",
"type": "string"
},
"stableId": {
"description": "The stable ID of the field.",
"type": "string"
},
"typeDisplayName": {
"description": "The display name of the field type",
"type": "string"
}
},
"required": [
"id",
"name",
"schema"
],
"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('getFieldsPaginated', {
# Add required parameters here
})