Retrieve a paginated list of all cases for the given filter.

GET https://yoursite.desk.com/api/v2/filters/:id/cases

Applicable Roles

Agent, Reporting Agent, Workflow Manager, Knowledgebase Manager, Content Manager, Business Manager, Administrative Manager, Administrator, Knowledgebase Adminstrator, and Billing Administrator

Fields

Please see Cases for details on the specific fields for each case.

Sorting

Sorting is supported on cases in a filter by using sort_field and sort_direction parameters in your request.

  • sort_field - case field on which you would like to sort
  • sort_direction - direction to sort - asc for ascending, desc for descending

The following fields can be used for sorting cases: id, created_at, priority, received_at, status, and updated_at. The default sort field is created_at and the default direction is asc.

Limits

The maximum page parameter value for this endpoint is currently 500. See Case list for more information.

Example Curl Request

1
2
3
$ curl https://yoursite.desk.com/api/v2/filters/:id/cases \
    -u email:password \
    -H 'Accept: application/json'

Example Response

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
{
  "total_entries": 2,
  "page": 1,
  "_links": {
    "self": {
      "href": "/api/v2/cases?page=1&per_page=50",
      "class": "page"
    },
    "first": {
      "href": "/api/v2/cases?page=1&per_page=50",
      "class": "page"
    },
    "last": {
      "href": "/api/v2/cases?page=1&per_page=50",
      "class": "page"
    },
    "next": null,
    "previous": null
  },
  "_embedded": {
    "entries": [
      {
        "id": 1,
        "external_id": null,
        "blurb": null,
        "subject": "Welcome",
        "priority": 5,
        "locked_until": null,
        "description": null,
        "status": "new",
        "type": "email",
        "labels": [

        ],
        "label_ids": [

        ],
        "language": "en_us",
        "created_at": "2017-10-18T18:08:06Z",
        "updated_at": "2017-10-18T18:13:06Z",
        "changed_at": "2017-10-18T18:12:06Z",
        "active_at": "2017-10-18T18:13:06Z",
        "received_at": "2017-10-18T18:08:06Z",
        "first_opened_at": "2017-10-18T18:09:06Z",
        "opened_at": "2017-10-18T18:10:06Z",
        "first_resolved_at": "2017-10-18T18:13:06Z",
        "resolved_at": "2017-10-18T18:13:06Z",
        "custom_fields": {
          "level": "vip"
        },
        "_links": {
          "self": {
            "href": "/api/v2/cases/1",
            "class": "case"
          },
          "message": {
            "href": "/api/v2/cases/1/message",
            "class": "message"
          },
          "customer": {
            "href": "/api/v2/customers/1",
            "class": "customer"
          },
          "assigned_user": {
            "href": "/api/v2/users/2",
            "class": "user"
          },
          "assigned_group": {
            "href": "/api/v2/groups/1",
            "class": "group"
          },
          "locked_by": null,
          "replies": {
            "href": "/api/v2/cases/1/replies",
            "class": "reply"
          },
          "draft": {
            "href": "/api/v2/cases/1/replies/draft",
            "class": "reply"
          },
          "notes": {
            "href": "/api/v2/cases/1/notes",
            "class": "note"
          },
          "history": {
            "href": "/api/v2/cases/1/history",
            "class": "history"
          },
          "macro_preview": {
            "href": "/api/v2/cases/1/macros/preview",
            "class": "macro_preview"
          },
          "attachments": {
            "href": "/api/v2/cases/1/attachments",
            "class": "attachment"
          }
        }
      },
      {
        "id": 1,
        "external_id": null,
        "blurb": null,
        "subject": "Help Please!",
        "priority": 5,
        "locked_until": null,
        "description": null,
        "status": "new",
        "type": "email",
        "labels": [

        ],
        "label_ids": [

        ],
        "language": "en_us",
        "created_at": "2017-10-18T18:08:06Z",
        "updated_at": "2017-10-18T18:13:06Z",
        "changed_at": "2017-10-18T18:12:06Z",
        "active_at": "2017-10-18T18:13:06Z",
        "received_at": "2017-10-18T18:08:06Z",
        "first_opened_at": "2017-10-18T18:09:06Z",
        "opened_at": "2017-10-18T18:10:06Z",
        "first_resolved_at": "2017-10-18T18:13:06Z",
        "resolved_at": "2017-10-18T18:13:06Z",
        "custom_fields": {
          "level": "vip"
        },
        "_links": {
          "self": {
            "href": "/api/v2/cases/2",
            "class": "case"
          },
          "message": {
            "href": "/api/v2/cases/1/message",
            "class": "message"
          },
          "customer": {
            "href": "/api/v2/customers/1",
            "class": "customer"
          },
          "assigned_user": {
            "href": "/api/v2/users/2",
            "class": "user"
          },
          "assigned_group": {
            "href": "/api/v2/groups/1",
            "class": "group"
          },
          "locked_by": null,
          "replies": {
            "href": "/api/v2/cases/1/replies",
            "class": "reply"
          },
          "draft": {
            "href": "/api/v2/cases/1/replies/draft",
            "class": "reply"
          },
          "notes": {
            "href": "/api/v2/cases/1/notes",
            "class": "note"
          },
          "history": {
            "href": "/api/v2/cases/1/history",
            "class": "history"
          },
          "macro_preview": {
            "href": "/api/v2/cases/1/macros/preview",
            "class": "macro_preview"
          },
          "attachments": {
            "href": "/api/v2/cases/1/attachments",
            "class": "attachment"
          }
        }
      }
    ]
  }
}