Admin REST API
The Admin REST API serves two primary functions: managing Experience Edge configuration and webhooks.
Authorization and API access
For the base URL and authorization, see Authorization and API access options.
Time to live (TTL)
Time to live (TTL) determines the maximum duration that content and media items are retained in the Experience Edge cache. The TTL values for content (contentCacheTtl) and media items (mediaCacheTtl) are included as response parameters returned by several Admin REST API endpoints. The default value of both parameters is four hours:
To set or update TTL values, use a string with the following notation:
Examples:
"720.00:00:00"sets the value to 720 days."00:15:00"sets the value to 15 minutes.
Endpoints for managing Experience Edge configuration
GetSettings
Lists all available settings for an environment.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/settings - HTTP verb:
GET - Response format: The settings for the environment.
UpdateSettings
Updates all available settings for an environment.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/settings - HTTP verb:
PUT - Body format:
- Response status code:
Accepted (202)
PatchSettings
Updates a setting using a patch operation or multiple patch operations. This endpoint uses the JSON patch format for operations and content-type headers as specified in RFC 6902.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/settings - HTTP verb:
PATCH - Headers:
Content-Type: application/json-patch+json - Body format: A settings operation. Only replace operations are allowed. For more information, see RFC 6902 section 4.3. The following example updates the
contentcachettlsetting to 15 minutes:
- Response format: The settings for the environment.
- Response status code:
OK (200)
ClearCacheForTenant
Clears the entire cache for a given environment.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/cache - HTTP verb:
DELETE - Response format:
Accepted status code (202)
DeleteContent
Removes environment data from the data storage.
This action instantly wipes all environment data from Experience Edge and can impact live availability of content.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/content - HTTP verb:
DELETE - Response format:
Accepted status code (202)
Endpoints for managing webhooks
CreateWebhook
Creates a new webhook.
When creating a webhook, you must use an HTTPS URI. HTTP is not supported.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/webhooks - HTTP verb:
POST - Body format: A webhook structure. Refer to Webhook objects to learn more about the various JSON objects used within the webhooks endpoint of the Admin REST API.
- Response format: A webhook structure. Refer to Webhook objects to learn more about the various JSON objects used within the webhooks endpoint of the Admin REST API.
- Response header: Returns the location of the new webhook. Example location:
https://edge.sitecorecloud.io/api/admin/v1/webhooks/12345 - Response status code:
Created (201)
ListWebhooks
Lists all webhooks for an environment.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/webhooks - HTTP verb:
GET - Example:
https://edge.sitecorecloud.io/api/admin/v1/webhooks - Response format: An array of webhooks. Refer to Webhook objects to learn more about the various JSON objects used within the webhooks endpoint of the Admin REST API.
GetWebhookById
Gets a specific environment webhook by ID.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/webhooks/<WEBHOOK_ID> - HTTP verb:
GET - Example:
https://edge.sitecorecloud.io/api/admin/v1/webhooks/789 - Response format:
UpdateWebhook
Updates an existing webhook.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/webhooks/<WEBHOOK_ID> - HTTP verb:
PUT - Body format: A webhook structure. Refer to Webhook objects to learn more about the various JSON objects used within the webhooks endpoint of the Admin REST API.
- Response status code:
No content (204)
DeleteWebhook
Deletes a specific webhook.
- Route:
https://edge.sitecorecloud.io/api/admin/v1/webhooks/<WEBHOOK_ID> - HTTP verb:
DELETE - Example:
https://edge.sitecorecloud.io/api/admin/v1/webhooks/1234 - Response status:
No content (204)