getTrashedFieldsPaginated
Get fields in trash paginated
Details
- Method:
GET - Path:
/rest/api/3/field/search/trashed - Operation ID:
getTrashedFieldsPaginated
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"
},
"id": {
"description": "",
"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"
},
"expand": {
"description": "",
"required": false,
"location": "query",
"type": "string",
"enum": [
"name",
"-name",
"+name",
"trashDate",
"-trashDate",
"+trashDate",
"plannedDeletionDate",
"-plannedDeletionDate",
"+plannedDeletionDate",
"projectsCount",
"-projectsCount",
"+projectsCount"
]
},
"orderBy": {
"description": "[Order](#ordering) the results by a field:\n\n * `name` sorts by the field name\n * `trashDate` sorts by the date the field was moved to the trash\n * `plannedDeletionDate` sorts by the planned deletion date",
"required": false,
"location": "query",
"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 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('getTrashedFieldsPaginated', {
# Add required parameters here
})