1. Admin Settings API

PATCH settings

A PATCH query to the settings endpoint lets you use a JSON patch format for operations and content-type headers specified in RFC6902.

Relative Route/settings
HTTP VerbPATCH

Headers

The following header is required:

NameValue
Content-Typeapplication/json-patch+json

Body

The body structure is as follows:


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

The replace operation is the only one allowed.

Patch settings

The settings available for patching are as follows:

  • Content cache time to live: cache duration of a piece of content. Value format: timespan.

    [
      {
        "op":"replace",
        "path":"/contentcachettl",
        "value":"`00:15`:00"
      }
    ]
  • Media cache time to live: cache duration of media resources. Value format: timespan.

    [
      {
        "op":"replace",
        "path":"/mediacachettl",
        "value":"`00:15`:00"
      }
    ]
  • Content cache auto-clear: auto-clear content-specific caches on publishing end. Value format: boolean.

    [
      {
        "op":"replace",
        "path":"/contentcacheautoclear",
        "value":true
      }
    ]
  • Media cache auto-clear: auto-clear media caches on publishing end. Value format: boolean.

    [
      {
        "op":"replace",
        "path":"/mediacacheautoclear",
        "value":true
      }
    ]
  • Tenant cache auto-clear: auto-clear entire cache on publishing end. Value format: boolean.

    [
      {
        "op":"replace",
        "path":"/tenantcacheautoclear",
        "value":true
      }
    ]

Response

A PATCH query returns the tenant settings structured as follow:

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

A successful query returns the OK status code (200).

If you have suggestions for improving this article, let us know!