Admin API

Abstract

Describes the Admin API for administering your Experience Edge for XM tenant.

The Admin API is a REST API that enables you to administer your Experience Edge for XM tenant.

The base URL for the Admin API is: https://edge.sitecorecloud.io/api/admin/v1.

All endpoints use bearer authorization.

Headers

The following header is required:

Name

Format

Purpose

Authorization

Bearer {Token}

A JSON web token (JWT). Request a JWT for Experience Edge XM using OAuth.

The Admin API has the following endpoints:

ClearCacheForTenant

Clears the entire cache for a given tenant.

Relative route

/cache

HTTP verb

DELETE

Response format

Accepted status code (202)

ClearCacheByIdentifier

Clears the cache by identifier.

Relative route

/cache/{identifier}

HTTP verb

DELETE

Response format

Accepted status code (202)

DeleteContent

Removes tenant data from the data storage.

Relative route

/content

HTTP verb

DELETE

Example

https://edge.sitecorecloud.io/api/admin/v1/content

Response format

Accepted status code (202)

GetSettings

Lists all available settings for a tenant.

Relative route

/settings

HTTP verb

GET

Example

https://edge.sitecorecloud.io/api/admin/v1/settings

Response format

The settings for the tenant.

{
    "contentCacheTtl": "04:00:00",
    "contentCacheAutoClear": true,
    "mediaCacheTtl": "04:00:00",
    "mediaCacheAutoClear": true,
    "tenantCacheAutoClear": true
}

UpdateSettings

Updates all available settings for a tenant.

Relative route

/settings

HTTP verb

PUT

Example

https://edge.sitecorecloud.io/api/admin/v1/settings

Body format

{
    "contentCacheTtl": "04:00:00",
    "contentCacheAutoClear": true,
    "mediaCacheTtl": "04:00:00",
    "mediaCacheAutoClear": true,
    "tenantCacheAutoClear": true
}

Response status code

Accepted (202)

PatchSettings

Updates a setting for a tenant using a Patch operation or multiple Patch operations. Uses JSON patch format for operations and content-type headers as specified in https://tools.ietf.org/html/rfc6902.

Relative route

/settings

HTTP verb

PATCH

Example

https://edge.sitecorecloud.io/api/admin/v1/settings

Headers

Content-Type: application/json-patch+json

Body format

A settings operation. Only replace operations are allowed. For more information, see https://tools.ietf.org/html/rfc6902#section-4.3.

[
    {
        "op":"replace",
        "path":"/contentcacheautoclear",
        "value":true
    },
    {
        "op":"replace",
        "path":"/contentcachettl",
        "value":"00:15:00"
    }
]

Response format

The settings for the tenant.

{
    "contentCacheTtl": "04:00:00",
    "contentCacheAutoClear": true,
    "mediaCacheTtl": "04:00:00",
    "mediaCacheAutoClear": true,
    "tenantCacheAutoClear": true
}

Response status code

OK (200)

CreateWebhook

Creates a new webhook.

Relative route

/webhooks

HTTP verb

POST

Body format

A webhook structure.

{
    "label": "My new webhook",
    "createdBy": "anco",
    "uri": "https://localhost",
    "method": "GET",
    "headers": {
        "X-Custom-Header1":"foo"
    },
    "body": "bar"
}

Response format

A webhook structure.

{
    "id": "12345",
    "tenantId": "test-tenant",
    "label": "My new webhook",
    "uri": "https://localhost/",
    "method": "GET",
    "headers": {
        "X-Custom-Header1": "foo"
    },
    "body": "bar",
    "createdBy": "anco",
    "created": "2021-03-26T11:31:23.894452+00:00"
}

Response header

Returns the location of the new webhook. For example:

Location: https://edge.sitecorecloud.io/api/admin/v1/webhooks/12345

Response status code

Created (201)

UpdateWebhook

Updates an existing webhook.

Relative route

/webhooks/{id}

HTTP verb

PUT

Body format

A webhook structure.

{
    "label": "My existing webhook",
    "createdBy": "anco",
    "uri": "https://localhost",
    "method": "GET",
    "headers": {
        "X-Custom-Header1":"foo"
    },
    "body": "bar"
}

Response status code

No content (204)

DeleteWebhook

Deletes a specific webhook.

Relative route

/webhooks/{id}

HTTP verb

DELETE

Example

https://edge.sitecorecloud.io/api/admin/v1/webhooks/789

Response status

No content (204)

ListWebhooks

Lists all webhooks for a tenant.

Relative route

/webhooks

HTTP verb

GET

Example

https://edge.sitecorecloud.io/api/admin/v1/webhooks

Response format

An array of webhooks.

[
  {
      "id": "1234",
      "tenantId": "test-tenant",
      "label": "webhook 92",
      "uri": "https://localhost/",
      "method": "POST",
      "body": "This is my optional body content",
      "created": "2021-03-26T10:44:04.6107312+00:00"
  },
  {
    "id": "5678",
    "tenantId": "test-tenant",
    "label": "webhook 29",
    "uri": "https://localhost/",
    "method": "POST",
    "headers": {
        "x-header": "bar"
    },
    "createdBy": "anco",
    "created": "2021-03-26T10:44:04.6107312+00:00"
  }
]

GetWebhookById

Gets a specific tenant webhook by ID.

Relative route

/webhooks/{id}

HTTP verb

GET

Example

https://edge.sitecorecloud.io/api/admin/v1/webhooks/789

Response format

{
      "id": "1234",
      "tenantId": "test-tenant",
      "label": "webhook 92",
      "uri": "https://localhost/",
      "method": "POST",
      "headers": {
          "x-header": "foo"
      },
      "body": "Optional body content",
      "createdBy": "adn",
      "created": "2021-03-26T10:44:04.6107312+00:00"
  }