List

Description

Retrieve a list of cases.

Request

HTTP Method: GET

Query Parameter Description
team_id Optional Retrieve cases for the specified team.
filters Optional Object specifying case filters (see the table below).
per_page Optional Set the number of results returned per page. Defaults to 20, maximum is 50.
page Optional Specify the page of results to return if there are multiple pages. Defaults to page 1.

Supported parameters in filters

filters parameters Description
assigned_to_me Optional A boolean (true or false).
assignees Optional An array of user IDs.
assignee_emails Optional An array of user email addresses.
start_date Optional A timestamp. End date will default to today if not provided.
end_date Optional A timestamp.
search Optional A string that searches against case name, description and ID.
or_tags Optional An array of tag names that are OR'd by.
and_tags Optional An array of tag names to AND'd by.
tags Optional An array of tag names (behaves the same as and_tags).
records Optional A string array of record values.
status Optional OPEN or CLOSED.
priority Optional CRITICAL, HIGH, MEDIUM, LOW or INFO
metadata Optional An object of metadata as key-value pairs
author_emails Optional An array of author emails.
curl -X GET \
  https://<<META.tenant.domain>>/api/v1/cases \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Response

A successful request will return a JSON object containing the cases the requesting token has access to.

Field description

Parameter Description
case_id The case ID.
name The case name.
description The case description.
status The case status - open or closed.
url The case URL.
metadata Case related metadata represented as key-value pairs.
author An object describing the case author.
opened_by An object describing the user who opened the case.
resolved_by An object describing the user who resolved the case.
assignees An array of users assigned to the case.
tags An array of tags associated with the case.
team_case_actions An array of team case actions taken within the case.
team The team the case is within - ID & name.
team_case_buttons An array of team case buttons for downstream actions associated with the case.
linked_cases An array of cases linked to this case (IDs only).
opened_at ISO 8601 Timestamp representing the date and time the case was opened at.
resolved_at ISO 8601 Timestamp representing the date and time the case was resolved at.
created_at ISO 8601 Timestamp representing the date and time the case was created at.
updated_at ISO 8601 Timestamp representing the date and time the case was updated at.
records An array of records associated with the case.
priority The case priority - critical, high, medium, low or info.
closure_conditions An array of closure requirements in the form of a set of formula rules that need to evaluate to true to enable the closing of a case.

Sample response

"cases": [
  {
    "case_id": 42,
    "name": "Suspicious login detected",
    "description": "This is a high priority case created via the API",
    "status": "OPEN",
    "url": "https://tenant.tines.com/team/2/cases/42",
    "metadata": {},
    "author": {
      "id": 1,
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@tines.io",
      "is_service_account": false
    },
    "opened_by": {
      "id": 1,
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@tines.io",
      "is_service_account": false
    },
    "resolved_by": null,
    "assignees": [
      {
        "id": 1,
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "jane@tines.io",
        "is_service_account": false
      }
    ],
    "tags": [
      {
        "id":4,
        "name": "login"
      }
    ],
    "team_case_actions": [
      {
        "id": 7508,
        "action": "CREATED",
        "value": "42",
        "user": {}
      }
    ],
    "team": {
      "id": 2,
      "name": "Team 1"
    },
    "team_case_buttons": [
      {
        "id": 8,
        "button_type": "webhook",
        "url": "http://tenant.tines.com/webhook/e840b4e8cf60437196d9a4bcb85d2de0/61441bc05fddfa4c09924b23fcf72b91",
        "label": "Isolate host"
      },
          {
        "id": 9,
        "button_type": "page",
        "url": "https://tenant.tines.com/pages/55e94b9b4e26175051c0287f4259363f/",
        "label": "Isolate host and submit reason"
      }
    ],
    "linked_cases": [],
    "opened_at": "2023-12-18T22:29:22Z",
    "resolved_at":null,
    "created_at": "2023-12-18T22:29:22Z" ,
    "updated_at": "2023-12-18T22:29:22Z",
    "records": [
      {
        "id": 187,
        "results": [
          {
            "id": 1871,
            "name": "Story name",
            "value": "Cases API"
          },
        ]
      }
    ],
    "priority": "HIGH",
    "closure_conditions": [
      {
        "name": "has at least 1 assignee",
        "formula": "=SIZE(team_case.assignees) > 0"
      }
    ]
  }
],
"meta": {
  "current_page": "https://<<META.tenant.domain>>/api/v1/cases?per_page=20&page=1",
  "previous_page": null,
  "next_page": null,
  "per_page": 20,
  "pages": 1,
  "count": 1
}
Was this helpful?