List

Description

Retrieve a list of case activities for a case. These activities are logged on the case timeline and can be filtered by type.

Request

HTTP Method: GET

Query Parameter Description
case_id Retrieve activities for the specified case.
activity_type Optional An array of types of activities requested. See the list below for supported types.
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 activity types

  • CREATED
  • ASSIGNED
  • UNASSIGNED
  • STATUS_UPDATED
  • SEVERITY_UPDATED
  • COMMENTED
  • DELETED_COMMENT
  • FILE_ATTACHED
  • FILE_ATTACHED_AND_COMMENTED
  • FILE_DELETED
  • TAGS_ADDED
  • TAGS_REMOVED
  • RECORD_RESULT_SET_ADDED
  • RECORD_RESULT_SET_REMOVED
  • CHECKLIST_ITEM_COMPLETED
  • CHECKLIST_ITEM_INCOMPLETE
  • LINKED_CASE_ADDED
  • LINKED_CASE_REMOVED
  • METADATA_UPDATED
curl -X GET \
  https://<<META.tenant.domain>>/api/v2/cases/<<case_id>>/activities?activity_type=%5B%5D=<<type>> \
  -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
id The activity ID.
activity_type The type of activity.
value The value of the activity.
file An object describing the file attached to the activity. Available only for FILE_ATTACHED or FILE_ATTACHED_AND_COMMENTED type activities.
user An object describing the user who performed the activity.
created_at The timestamp of the activity.

Sample response

{
  "case_id": 10,
  "activities": [
    {
      "id": 10,
      "activity_type": "FILE_ATTACHED_AND_COMMENTED",
      "value": "This is a case comment",
      "file": {
        "filename": "foo",
        "url": "http://<<META.tenant.domain>>/api/v2/cases/10/files/10/download"
      },
      "user": {
        "id": 1,
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "jane@tines.io",
        "avatar_url": "example.com/avatar",
        "is_service_account": false
      },
      "created_at": "2023-07-18T10:27:18Z"
    }
  ],
  "meta": {
    "current_page": "https://<<META.tenant.domain>>/api/v2/cases/<<case_id>>/activities?activity_type=%5B%5D=<<type>>?per_page=20&page=1",
    "previous_page": null,
    "next_page": null,
    "per_page": 20,
    "pages": 1,
    "count": 1
  }
}
Was this helpful?