getDefaultValues
Get custom field contexts default values
Details
- Method:
GET - Path:
/rest/api/3/field/{fieldId}/context/defaultValue - Operation ID:
getDefaultValues
Parameters
{
"fieldId": {
"description": "The ID of the custom field, for example `customfield\\_10000`.",
"required": true,
"location": "path",
"type": "string"
},
"contextId": {
"description": "The IDs of the contexts.",
"required": false,
"location": "query",
"type": "array"
},
"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": {
"oneOf": [
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueCascadingOption"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueMultipleOption"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueSingleOption"
},
{
"$ref": "#/components/schemas/CustomFieldContextSingleUserPickerDefaults"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueMultiUserPicker"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueSingleGroupPicker"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueMultipleGroupPicker"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueDate"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueDateTime"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueURL"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueProject"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueFloat"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueLabels"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueTextField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueTextArea"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueReadOnly"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueSingleVersionPicker"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueMultipleVersionPicker"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeStringField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeMultiStringField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeObjectField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeDateTimeField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeGroupField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeMultiGroupField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeNumberField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeUserField"
},
{
"$ref": "#/components/schemas/CustomFieldContextDefaultValueForgeMultiUserField"
}
],
"additionalProperties": false,
"discriminator": {
"mapping": {
"datepicker": "#/components/schemas/CustomFieldContextDefaultValueDate",
"datetimepicker": "#/components/schemas/CustomFieldContextDefaultValueDateTime",
"float": "#/components/schemas/CustomFieldContextDefaultValueFloat",
"forge.datetime": "#/components/schemas/CustomFieldContextDefaultValueForgeDateTimeField",
"forge.group": "#/components/schemas/CustomFieldContextDefaultValueForgeGroupField",
"forge.group.list": "#/components/schemas/CustomFieldContextDefaultValueForgeMultiGroupField",
"forge.number": "#/components/schemas/CustomFieldContextDefaultValueForgeNumberField",
"forge.object": "#/components/schemas/CustomFieldContextDefaultValueForgeObjectField",
"forge.string": "#/components/schemas/CustomFieldContextDefaultValueForgeStringField",
"forge.string.list": "#/components/schemas/CustomFieldContextDefaultValueForgeMultiStringField",
"forge.user": "#/components/schemas/CustomFieldContextDefaultValueForgeUserField",
"forge.user.list": "#/components/schemas/CustomFieldContextDefaultValueForgeMultiUserField",
"grouppicker.multiple": "#/components/schemas/CustomFieldContextDefaultValueMultipleGroupPicker",
"grouppicker.single": "#/components/schemas/CustomFieldContextDefaultValueSingleGroupPicker",
"labels": "#/components/schemas/CustomFieldContextDefaultValueLabels",
"multi.user.select": "#/components/schemas/CustomFieldContextDefaultValueMultiUserPicker",
"option.cascading": "#/components/schemas/CustomFieldContextDefaultValueCascadingOption",
"option.multiple": "#/components/schemas/CustomFieldContextDefaultValueMultipleOption",
"option.single": "#/components/schemas/CustomFieldContextDefaultValueSingleOption",
"project": "#/components/schemas/CustomFieldContextDefaultValueProject",
"readonly": "#/components/schemas/CustomFieldContextDefaultValueReadOnly",
"single.user.select": "#/components/schemas/CustomFieldContextSingleUserPickerDefaults",
"textarea": "#/components/schemas/CustomFieldContextDefaultValueTextArea",
"textfield": "#/components/schemas/CustomFieldContextDefaultValueTextField",
"url": "#/components/schemas/CustomFieldContextDefaultValueURL",
"version.multiple": "#/components/schemas/CustomFieldContextDefaultValueMultipleVersionPicker",
"version.single": "#/components/schemas/CustomFieldContextDefaultValueSingleVersionPicker"
},
"propertyName": "type"
},
"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('getDefaultValues', {
# Add required parameters here
})