Trash API

List trash

List all trash items for an account:

GET /trash

Response

Status: 200 OK
[
  {
    "id": 6,
    "created_at": "2018-07-05T05:01:42-05:00",
    "trashed_by": {
      "id": 6,
      "name": "Howard Tanner",
      "account": {
        "id": "widget",
        "name": "Widget International"
      }
    },
    "trashed": "request",
    "request": {
      "id": 70394,
      "href": "/requests/70394",
      "display_name": "70394 Windows password reset required"
    }
  },
  "..."
]

The response contains these fields by default. Filtering and pagination are available to reduce/limit the trash collection.

Collection Fields

By default the following fields will appear in collections of trash:

id created_at trashed_by trashed

Obtain a different set of fields using the ?fields= parameter.

Sorting

By default a collection of trash is sorted descending by created_at.

The following fields are accepted by the ?sort= parameter:

id created_at

Get a single trash item

GET /trash/:id

Response

Status: 200 OK
{
  "id": 6,
  "created_at": "2018-07-05T05:01:42-05:00",
  "trashed_by": {
    "id": 6,
    "name": "Howard Tanner",
    "account": {
      "id": "widget",
      "name": "Widget International"
    }
  },
  "trashed": "request",
  "request": {
    "id": 70394,
    "href": "/requests/70394",
    "display_name": "70394 Windows password reset required"
  }
}

The response contains these fields.

Fields

created_at
Readonly datetime — The date and time at which the trash was created.
id
Readonly integer — The unique ID of the trash.
trashed
Readonly string (max 80) — The Trashed field contains the record type of the trashed record, e.g. request. A field with this name is added that contains the reference to the trashed record.
trashed_by
Readonly reference to Person — The Trashed by field is used to select the person who trashed the record.