Resource Collections
A resource collection consists of Zendesk Support resource definitions. For example, a resource collection could define two different targets and one ticket field. You specify the resource collection the same way you specify the resource requirements for a Zendesk app.
JSON Format
Resource Collections are represented as JSON objects with the following properties:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
created_at | string | true | false | The time the identity got created |
id | integer | true | false | Automatically assigned upon creation |
updated_at | string | true | false | The time the identity got updated |
Example
{
"created_at": "2011-07-20T22:55:29Z",
"id": 35436,
"updated_at": "2011-07-20T22:55:29Z"
}
List Resource Collections
GET /api/v2/resource_collections
Lists all resource collections that have been created.
Allowed For
- Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/resource_collections.json \
-v -u {email_address}:{password}
Example Response
Status 200 OK
{
"count": 0,
"next_page": null,
"previous_page": null,
"resource_collections": [
{
"created_at": "2015-09-09T01:57:24Z",
"id": 10002,
"updated_at": "2015-09-09T01:57:24Z"
}
]
}
Create a Resource Collection
POST /api/v2/resource_collections
Creates a resource collection with a provided payload. The payload is specified the same way as the content of a requirements.json file in a Zendesk app. See Specifying Apps Requirements in the Zendesk Apps framework docs.
Allowed For
- Admins
Using curl
curl https://{subdomain}.zendesk.com/api/v2/resource_collections.json \
-X POST -d '{"payload": {payload}}' \
-v -u {email_address}:{password} -H "Content-Type: application/json"
Example Response
Status 200 OK
{
"job_status": {
"id": "0a3e49b038c40133d7380242ac110031",
"message": null,
"progress": null,
"results": null,
"status": "queued",
"total": null,
"url": "https://company.zendesk.com/api/v2/job_statuses/0a3e49b038c40133d7380242ac110031.json"
}
}
Retrieve a Resource Collection
GET /api/v2/resource_collections/{resource_collection_id}
Retrieves details of a specified resource collection.
Allowed For
- Admins
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
resource_collection_id | integer | Path | true | The ID of the resource collection |
Using curl
curl https://{subdomain}.zendesk.com/api/v2/resource_collections/{resource_collection_id}.json \
-v -u {email_address}:{password}
Example Response
Status 200 OK
{
"resource_collection": {
"created_at": "2015-09-09T01:57:24Z",
"id": 10002,
"updated_at": "2015-09-09T01:57:24Z"
}
}
Update a Resource Collection
PUT /api/v2/resource_collections/{resource_collection_id}
Updates a resource collection with a provided payload. The payload is specified the same way as the content of a requirements.json file in a Zendesk app. See Specifying Apps Requirements in the Zendesk Apps framework docs.
Allowed For
- Admins
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
resource_collection_id | integer | Path | true | The ID of the resource collection |
Using curl
curl https://{subdomain}.zendesk.com/api/v2/resource_collections/{resource_collection_id}.json \
-X PUT -d '{"payload": {payload}}' \
-v -u {email_address}:{password} -H "Content-Type: application/json"
Example Response
Status 200 OK
{
"job_status": {
"id": "4555831038d20133d7390242ac110031",
"message": null,
"progress": null,
"results": null,
"status": "queued",
"total": null,
"url": "https://company.zendesk.com/api/v2/job_statuses/4555831038d20133d7390242ac110031.json"
}
}
Delete a Resource Collection
DELETE /api/v2/resource_collections/{resource_collection_id}
Allowed For
- Admins
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
resource_collection_id | integer | Path | true | The ID of the resource collection |
Using curl
curl https://{subdomain}.zendesk.com/api/v2/resource_collections/{resource_collection_id}.json \
-v -u {email_address}:{password} -X DELETE
Example Response
Status 200 OK
{
"job_status": {
"id": "2ee570d0398e0133e26e0242ac110017",
"message": null,
"progress": null,
"results": null,
"status": "queued",
"total": null,
"url": "https://company.zendesk.com/api/v2/job_statuses/2ee570d0398e0133e26e0242ac110017.json"
}
}