Federated Search - External Content Source API
This API is for managing external sources. The sources defined here can be used for filtering search results in the Help Center front end. Sources refer to the origin of a record. For example: forum, issue tracker, learning management system. Use descriptive names that will help your users understand and navigate your content.
Important: The External Content API is in early access. This API is subject to change and should not be used in a production environment. Visit the Federated Search EAP forum for more information and to provide feedback.
Allowed for:
- Help Center managers
JSON Format
Sources are represented as JSON objects with the following properties:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
created_at | string | false | false | ISO-8601 compliant date-time reflecting the time the event was created. If not set, the API sets the value when it receives the event |
id | string | true | false | Universally Unique Lexicographically Sortable Identifier. More info: https://github.com/ulid/spec |
name | string | false | true | The name of the source that will be displayed in the Help Center frontend. |
updated_at | string | false | false | ISO-8601 compliant date-time reflecting the time the event was last updated. |
Lists external sources
GET /api/v2/guide/external_content/sources
Returns a list of the external sources that have been created for this account
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
page | object | Query | false | Paginate query |
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/sources" \
-u {email_address}:{password}
curl -g "https://{subdomain}.zendesk.com/api/v2/guide/external_content/sources?page[after]={after_cursor}" \
-u {email_address}:{password}
curl -g "https://{subdomain}.zendesk.com/api/v2/guide/external_content/sources?page[before]={before_cursor}" \
-u {email_address}:{password}
Example Response
Status 200 OK
{
"meta": {
"after_cursor": "MG",
"before_cursor": "MQ",
"has_more": true
},
"sources": [
{
"created_at": "2020-05-01T09:12:20Z",
"id": "01E77R4513SKX3AE8H20Q0KJ1K",
"name": "My Library",
"updated_at": "2020-05-26T09:11:30Z"
}
]
}
Creates an external content source
POST /api/v2/guide/external_content/sources
Creates an external content source
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
page | object | Query | false | Paginate query |
Example Body
{
"source": {
"name": "My Library"
}
}
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/sources" -d '{"source": { "name": "My Library" }}' \
-u {email_address}:{password}
Example Response
Status 201 Created
{
"source": {
"created_at": "2020-05-01T09:12:20Z",
"id": "01E77R4513SKX3AE8H20Q0KJ1K",
"name": "My Library",
"updated_at": "2020-05-26T09:11:30Z"
}
}
Get an external source
GET /api/v2/guide/external_content/sources/{id}
Get a single source for a given account with a given id
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
id | string | Path | true | A unique identifier for the source |
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/sources/{id}" \
-u {email_address}:{password}
Example Response
Status 200 OK
{
"source": {
"created_at": "2020-05-01T09:12:20Z",
"id": "01E77R4513SKX3AE8H20Q0KJ1K",
"name": "My Library",
"updated_at": "2020-05-26T09:11:30Z"
}
}
Updates a source
PUT /api/v2/guide/external_content/sources/{id}
Updates the source identified by the given ID with the request body.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
id | string | Path | true | A unique identifier for the source |
Example Body
{
"source": {
"name": "My Library"
}
}
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/{id}" -X PUT -d '{"source": { "name": "My Library" }}'\
-u {email_address}:{password}
Example Response
Status 200 OK
{
"source": {
"created_at": "2020-05-01T09:12:20Z",
"id": "01E77R4513SKX3AE8H20Q0KJ1K",
"name": "My Library",
"updated_at": "2020-05-26T09:11:30Z"
}
}
Deletes a source
DELETE /api/v2/guide/external_content/sources/{id}
Deletes a source
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
id | string | Path | true | A unique identifier for the source |
Using curl
curl "https://{subdomain}.zendesk.com/api/v2/guide/external_content/{id} -X DELETE \
-u {email_address}:{password}
Example Response
Status 204 No Content