Soft Delete a Theme

delete

/sites/management/api/v1/themes/{id}

SINGULAR

Soft delete the theme. The folder that corresponds to the soft-deleted theme will be moved to the trash folder of the owner of the theme. A theme that has been soft deleted can be restored or hard deleted.

Introduced in release 19.4.1.

Authorization

To invoke this operation, the authenticated user or client application must have been shared with the resource and have one of the following sharing roles:

  • Owner
  • Manager

In Use Themes

You cannot delete a theme if it is used by a template, site or site update, including templates, sites or updates in the trash.

Restoring a Deleted Theme

A soft-deleted theme can be restored by the owner or the user that deleted the theme.

For more information, see Undelete a Soft-Deleted Theme.

Permanently Deleting a Theme

A soft-deleted theme can be permanently deleted using a hard delete.

For more information, see Hard Delete a Theme.

Path Alternative Identifiers

The default identifier for a Theme resource is the Theme Identifier. The Theme resource supports alternative identifiers.

nameTheme Name

Instead of the theme identifier, the theme name can be used to uniquely identify a theme in the resource path. The default resource path parameter for a theme is the theme identifier, but when working with themes the human-readable theme name is sometimes easier.

http://api.example.com/sites/management/api/v1/themes/name:LearnTheme

Introduced in release 19.4.1.

Successful Response Examples

This operation responds with the following success (2xx) responses. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation.

204No Content - Soft Deleted

When the resource is deleted a 204 status code is returned.

Client Error Response Examples

This operation responds with following client error (4xx) responses with exception details in the response body. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation.

403Forbidden - Theme Operation Forbidden

Your sharing role within the theme does not allow you to perform the operation.

Error Code

OCE-SITEMGMT-009054

Resolution - Change the Sharing Role

Change the sharing role given to the authenticated user to the required role or higher.

Exception Detail Fields

This error type includes the following fields/values in the response:

Field NameDescription
themeTheme on which the operation is being performed.

For detailed information about this exception detail type, consult the ThemeOperationForbiddenExceptionDetail schema in the definitions section of the swagger document.

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Theme Operation Forbidden",
  "status": "403",
  "detail": "You do have a sharing role in this theme, but your role does not allow you to use this operation.",
  "o:errorCode": "OCE-SITEMGMT-009054",
  "theme": {
    "id": "FFA7758925559C7F6FC394910D5DDCD9211A3DB216EC"
  }
}

Introduced in release 19.4.1.

404Not Found - Theme Not Found

The site theme does not exist or has been deleted, or the authenticated user or client application does not have access to the theme.

Error Code

OCE-SITEMGMT-009041

Resolution - Check Identifier

Check that the theme identifier is valid.

Resolution - Check Membership

Check that the authenticated user is a member of the theme.

Exception Detail Fields

This error type includes the following fields/values in the response:

Field NameDescription
themeTheme that does not exist or is not visible to the authenticated user.

For detailed information about this exception detail type, consult the ThemeNotFoundExceptionDetail schema in the definitions section of the swagger document.

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Theme Not Found",
  "status": "404",
  "detail": "Theme does not exist or has been deleted, or the authenticated user or client application does not have access to the theme.",
  "o:errorCode": "OCE-SITEMGMT-009041",
  "theme": {
    "id": "FFA7758925559C7F6FC394910D5DDCD9211A3DB216EC"
  }
}

Introduced in release 19.4.1.

409Conflict - Theme In Use

The theme is in use by one of more sites or template and cannot be deleted.

Error Code

OCE-SITEMGMT-009056

Resolution - Hard Delete Site

Hard delete the site that is associated with the theme.

Resolution - Hard Delete Template

Hard delete the template that is associated with the theme.

Exception Detail Fields

This error type includes the following fields/values in the response:

Field NameDescription
themeTheme that cannot be deleted because it is in use.
templatesTemplates that use the theme.
sitesSites that use the theme.
usedBySite resources that are using the theme.
sitePlansSite plans that use the theme.

For detailed information about this exception detail type, consult the ThemeInUseExceptionDetail schema in the definitions section of the swagger document.

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Theme In Use",
  "status": "409",
  "detail": "Theme cannot be deleted because it is being used by one or more sites, site plans or templates.",
  "o:errorCode": "OCE-SITEMGMT-009056",
  "theme": {
    "id": "FFA7758925559C7F6FC394910D5DDCD9211A3DB216EC"
  },
  "templates": [
      {
        "id": "F30F08EB205D44AD20B5A48D1B1B3DD7D74F45978AB6"
      }
  ],
  "sites": [
      {
        "id": "FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
      }
  ],
  "usedBy": {
    "sites": [
        {
          "name": "MyNewProduct",
          "site": {
            "id": "FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
          }
        }
    ],
    "templates": [
        {
          "name": "CafeSupremo",
          "template": {
            "id": "F30F08EB205D44AD20B5A48D1B1B3DD7D74F45978AB6"
          }
        }
    ],
    "types": [
        {
          "name": "value",
          "type": {
            "name": "Video"
          }
        }
    ],
    "translationConnectors": [
        {
          "name": "value"
        }
    ],
    "sitePlans": [
        {
          "name": "value"
        }
    ]
  },
  "sitePlans": [
      "value"
  ]
}

Introduced in release 19.4.1.

Request

Path Parameters
Back to Top

Response

204 Response

No Content
Headers

400 Response

Bad Request

401 Response

Unauthorized

403 Response

Forbidden
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : ThemeOperationForbiddenExceptionDetail
Introduced in release 19.4.1.
Match All
Show Source
Nested Schema : ExceptionDetail
Type: object

In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Show Source
Nested Schema : ThemeOperationForbiddenExceptionDetail-allOf[1]
Type: object
Show Source
Nested Schema : o:errorDetails
Type: array

Multiple errors can be organized in a hierarchical structure.

Show Source
Nested Schema : items
Match All
Show Source
  • ExceptionDetail

    In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Example Response (Theme Operation Forbidden)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Theme Operation Forbidden",
    "status":"403",
    "detail":"You do have a sharing role in this theme, but your role does not allow you to use this operation.",
    "o:errorCode":"OCE-SITEMGMT-009054",
    "theme":{
        "id":"FFA7758925559C7F6FC394910D5DDCD9211A3DB216EC"
    }
}

404 Response

Not Found
Headers
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : ThemeNotFoundExceptionDetail
Introduced in release 19.4.1.
Match All
Show Source
Nested Schema : ExceptionDetail
Type: object

In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Show Source
Nested Schema : ThemeNotFoundExceptionDetail-allOf[1]
Type: object
Show Source
  • Theme that does not exist or is not visible to the authenticated user.

    Introduced in release 19.4.1.
Nested Schema : o:errorDetails
Type: array

Multiple errors can be organized in a hierarchical structure.

Show Source
Nested Schema : items
Match All
Show Source
  • ExceptionDetail

    In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Example Response (Theme Not Found)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Theme Not Found",
    "status":"404",
    "detail":"Theme does not exist or has been deleted, or the authenticated user or client application does not have access to the theme.",
    "o:errorCode":"OCE-SITEMGMT-009041",
    "theme":{
        "id":"FFA7758925559C7F6FC394910D5DDCD9211A3DB216EC"
    }
}

409 Response

Conflict
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : ThemeInUseExceptionDetail
Introduced in release 19.4.1.
Match All
Show Source
Nested Schema : ExceptionDetail
Type: object

In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Show Source
Nested Schema : ThemeInUseExceptionDetail-allOf[1]
Type: object
Show Source
Nested Schema : o:errorDetails
Type: array

Multiple errors can be organized in a hierarchical structure.

Show Source
Nested Schema : items
Match All
Show Source
  • ExceptionDetail

    In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Nested Schema : sitePlans
Type: array

Site plans that use the theme.

Introduced in release 23.6.1.
Show Source
Nested Schema : sites
Type: array

Sites that use the theme.

Introduced in release 19.4.1.
Show Source
Nested Schema : templates
Type: array

Templates that use the theme.

Introduced in release 19.4.1.
Show Source
Nested Schema : usedBy
Type: object

Site resources that are using the theme.

Introduced in release 22.6.2.
Show Source
Nested Schema : sitePlans
Type: array

Site plans.

Introduced in release 23.6.1.
Show Source
Nested Schema : sites
Type: array

Sites

Introduced in release 22.6.2.
Show Source
Nested Schema : templates
Type: array

Templates

Introduced in release 22.6.2.
Show Source
Nested Schema : translationConnectors
Type: array

Translation connectors.

Introduced in release 22.8.2.
Show Source
Nested Schema : types
Type: array

Content Types.

Introduced in release 22.6.2.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
  • Maximum Length: 242

    Site name

    Introduced in release 22.6.2.
  • Associated site resource.

    Introduced in release 22.6.2.
Nested Schema : items
Type: object
Show Source
  • Maximum Length: 242

    Template name

    Introduced in release 22.6.2.
  • Associated template resource.

    Introduced in release 22.6.2.
Nested Schema : items
Type: object
Show Source
  • Tranlsation connector name.

    Introduced in release 22.8.2.
Nested Schema : items
Type: object
Show Source
  • Content type name.

    Introduced in release 22.7.2.
  • Associated content type resource.

    Introduced in release 22.7.2.
Example Response (Theme In Use)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Theme In Use",
    "status":"409",
    "detail":"Theme cannot be deleted because it is being used by one or more sites, site plans or templates.",
    "o:errorCode":"OCE-SITEMGMT-009056",
    "theme":{
        "id":"FFA7758925559C7F6FC394910D5DDCD9211A3DB216EC"
    },
    "templates":[
        {
            "id":"F30F08EB205D44AD20B5A48D1B1B3DD7D74F45978AB6"
        }
    ],
    "sites":[
        {
            "id":"FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
        }
    ],
    "usedBy":{
        "sites":[
            {
                "name":"MyNewProduct",
                "site":{
                    "id":"FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
                }
            }
        ],
        "templates":[
            {
                "name":"CafeSupremo",
                "template":{
                    "id":"F30F08EB205D44AD20B5A48D1B1B3DD7D74F45978AB6"
                }
            }
        ],
        "types":[
            {
                "name":"value",
                "type":{
                    "name":"Video"
                }
            }
        ],
        "translationConnectors":[
            {
                "name":"value"
            }
        ],
        "sitePlans":[
            {
                "name":"value"
            }
        ]
    },
    "sitePlans":[
        "value"
    ]
}

413 Response

Payload Too Large

429 Response

Too Many Requests

500 Response

Internal Server Error

501 Response

Not Implemented

502 Response

Bad Gateway

503 Response

Service Unavailable

504 Response

Gateway Timeout
Back to Top