toggleFeatureForProject
Set project feature state
Details
- Method:
PUT - Path:
/rest/api/3/project/{projectIdOrKey}/features/{featureKey} - Operation ID:
toggleFeatureForProject
Parameters
{
"projectIdOrKey": {
"description": "The ID or (case-sensitive) key of the project.",
"required": true,
"location": "path",
"type": "string"
},
"featureKey": {
"description": "The key of the feature.",
"required": true,
"location": "path",
"type": "string"
},
"state": {
"description": "The feature state.",
"required": false,
"location": "body",
"type": "string",
"enum": [
"ENABLED",
"DISABLED",
"COMING_SOON"
]
}
}Response Schema
{
"additionalProperties": false,
"description": "The list of features on a project.",
"properties": {
"features": {
"description": "The project features.",
"items": {
"additionalProperties": false,
"description": "Details of a project feature.",
"properties": {
"feature": {
"description": "The key of the feature.",
"type": "string"
},
"imageUri": {
"description": "URI for the image representing the feature.",
"type": "string"
},
"localisedDescription": {
"description": "Localized display description for the feature.",
"type": "string"
},
"localisedName": {
"description": "Localized display name for the feature.",
"type": "string"
},
"prerequisites": {
"description": "List of keys of the features required to enable the feature.",
"items": {
"type": "string"
},
"type": "array"
},
"projectId": {
"description": "The ID of the project.",
"format": "int64",
"type": "integer"
},
"state": {
"description": "The state of the feature. When updating the state of a feature, only ENABLED and DISABLED are supported. Responses can contain all values",
"enum": [
"ENABLED",
"DISABLED",
"COMING_SOON"
],
"type": "string"
},
"toggleLocked": {
"description": "Whether the state of the feature can be updated.",
"type": "boolean"
}
},
"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('toggleFeatureForProject', {
# Add required parameters here
})