Trash API
List trash
Section titled “List trash”List all trash items for an account:
GET /trashResponse
Section titled “Response”Status: 200 OK[ { "id": 6, "created_at": "2018-07-05T05:01:42-05:00", "trashed_by": { "id": 6, "name": "Howard Tanner", "account": { "id": "pro-product", "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
Section titled “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 .
Filtering
Section titled “Filtering”Filtering is available for the following fields :
id
created_at
Sorting
Section titled “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
Section titled “Get a single trash item”GET /trash/:idResponse
Section titled “Response”Status: 200 OK{ "id": 6, "created_at": "2018-07-05T05:01:42-05:00", "trashed_by": { "id": 6, "name": "Howard Tanner", "account": { "id": "pro-product", "name": "Widget International" } }, "trashed": "request", "request": { "id": 70394, "href": "/requests/70394", "display_name": "70394 Windows password reset required" }}The response contains these fields .
Fields
Section titled “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.