Spaces method and path for this operation:
get /s/{space_id}/api/cases/{caseId}/fields
Refer to Spaces for more information.
Returns the fields you can write to the case's extended_fields. The case determines the owner and any applied template. The response includes the owner's global fields (library-wide) and, if the case has a template, that template's fields. Requires the Cases feature to be enabled in the space.
GET
/api/cases/{caseId}/fields
curl \
--request GET 'https://localhost:5601/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/fields' \
--header "Authorization: $API_KEY"
Response examples (200)
{
"fields": [
{
"control": "SELECT_BASIC",
"defaultValue": "medium",
"displayOnly": false,
"isGlobal": true,
"key": "priority_as_keyword",
"label": "Priority",
"name": "priority",
"options": [
"low",
"medium",
"high"
],
"type": "keyword",
"required": true,
"requiredOnClose": false,
"source": "global"
},
{
"control": "TEXTAREA",
"displayOnly": false,
"isGlobal": false,
"key": "rollout_notes_as_keyword",
"label": "Rollout notes",
"name": "rollout_notes",
"type": "keyword",
"required": false,
"requiredOnClose": true,
"source": "template"
},
{
"control": "MARKDOWN",
"displayOnly": true,
"isGlobal": false,
"key": "instructions_as_keyword",
"label": "Instructions",
"name": "instructions",
"type": "keyword",
"required": false,
"requiredOnClose": false,
"source": "template"
}
]
}
Response examples (401)
{
"error": "Unauthorized",
"message": "Unable to authenticate with the provided credentials.",
"statusCode": 401
}
Response examples (403)
{
"error": "Forbidden",
"message": "Unauthorized to access cases",
"statusCode": 403
}
Response examples (404)
{
"error": "Not Found",
"message": "Saved object [cases-template/9da1ea2a-09f8-4d0e-bf9d-09bf8c9d0f42] not found",
"statusCode": 404
}