1. API
  2. Cases
  3. Fields
  4. Field values

Field values: List

Description

Returns a list of field values for a field.

See the Get Field API to learn more about fields.

Request

HTTP Method: GET

Query Parameter Description
case_input_id The ID of the field that the field values 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://<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 field values for the field.

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 field.

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://<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?