List

Description

Returns a list of fields for a case input.

Request

HTTP Method: GET

Query Parameter Description
case_input_id The ID of the case input that the fields belong to.
per_page Optional Set the number of results returned per page. Defaults to 20.
page Optional Specify the page of results to return if there are multiple pages. Defaults to page 1.
curl -X GET \
  https://<<META.tenant.domain>>/api/v1/case_inputs/<<case_input_id>>/fields \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Response

A successful request returns a JSON array describing fields for the case input.

Field description

Parameter Description
id The field ID.
value The stored value.
case An object containing the ID of the case.
case_input An object containing the ID, name, validation_type, and validation_options of the case input.

Sample response

{
  "fields": [
    {
      "id": 1,
      "value": "high",
      "case": { "id": 1 },
      "case_input": {
        "id": 1,
        "name": "Priority",
        "validation_type": "options",
        "validation_options": {
          "options": ["low", "medium", "high", "critical"]
        }
      }
    },
    {
      "id": 2,
      "value": "value 2",
      "case": { "id": 2 },
      "case_input": {
        "id": 2,
        "name": "Input #2",
        "validation_type": "none",
        "validation_options": {}
      }
    }
  ],
  "meta": {
    "current_page": "https://<<META.tenant.domain>>/api/v1/case_inputs/1/fields?per_page=20&page=1",
    "previous_page": null,
    "next_page": null,
    "next_page_number": null,
    "per_page": 20,
    "pages": 1,
    "count": 3
  }
}
Was this helpful?