Create or Replace the Vanity Domain for a Site

put

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

RELATION

Create or replace the vanity domain for a site. By default a site does not have a vanity domain.

Introduced in release 21.5.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

Read the Configuration Status

The vanity domain will immediately be set on the site, but the site will not be accessible using the new vanity domain until configuration has completed. To check whether vanity domain configuration has completed, read the vanity domain and check the value of the configurationStatus field.

For more information, see Read the Vanity Domain for a Site.

Path Alternative Identifiers

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

nameSite Name

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

http://api.example.com/sites/management/api/v1/sites/name:MyNewProduct/vanityDomain

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.

200OK - Set the Vanity Domain on a Site

Set the vanity domain on a site. The vanity domain will immediately be set on the site, if there is an existing vanity domain it will be overridden and the site will no longer be accessible using the old vanity domain. The vanity domain configuration status will initially be processing, and the site will not be accessible using the new vanity domain until configuration has completed.

Request

PUT https://api.example.com/sites/management/api/v1/sites/{id}/vanityDomain

Request Body

{
  "name": "cloud.example.com"
}

Response Body

{
  "name": "cloud.example.com",
  "configurationStatus": "processing"
}

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.

400Bad Request - Invalid Site Vanity Domain

The provided site vanity domain cannot be used because it contains characters that are not allowed.

Error Code

OCE-SITEMGMT-009116

Resolution - Check Characters

The domain name can contain only alphabetical characters (A-Z), numeric characters (0-9), the minus sign (-), and the period (.). If a path is included it must include valid URI characters. See section 2 of RFC 3986.

Exception Detail Fields

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

Field NameDescription
nameInvalid site vanity domain name.

For detailed information about this exception detail type, consult the InvalidSiteVanityDomainExceptionDetail 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": "Invalid Site Vanity Domain",
  "status": "400",
  "detail": "The site vanity domain name cannot be used because it contains characters that are not allowed.",
  "o:errorCode": "OCE-SITEMGMT-009116",
  "name": "example_domain.com"
}

Introduced in release 21.5.1.

403Forbidden - Site Operation Forbidden

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

Error Code

OCE-SITEMGMT-009026

Resolution - Change the Sharing Role

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

Resolution - Change the Application Role

Ensure the user has a Standard User or Enterprise User Application Role.

Exception Detail Fields

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

Field NameDescription
siteSite on which the operation is being performed.

For detailed information about this exception detail type, consult the SiteOperationForbiddenExceptionDetail 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": "Site Operation Forbidden",
  "status": "403",
  "detail": "You do have a sharing role in this site, but your role does not allow you to use this operation.",
  "o:errorCode": "OCE-SITEMGMT-009026",
  "site": {
    "id": "FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
  }
}

Introduced in release 19.1.5.

404Not Found - Site Not Found

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

Error Code

OCE-SITEMGMT-009003

Resolution - Check Identifier

Check that the site identifier is valid.

Resolution - Check Membership

Check that the authenticated user is a member of the site or a site administrator.

Exception Detail Fields

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

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

For detailed information about this exception detail type, consult the SiteNotFoundExceptionDetail 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": "Site Not Found",
  "status": "404",
  "detail": "Site does not exist or has been deleted, or the authenticated user or client application does not have access to the site.",
  "o:errorCode": "OCE-SITEMGMT-009003",
  "site": {
    "id": "FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
  }
}

404Not Found - Relationship Not Found

An attempt to read a relationship has failed because the relationship does not exist. Reading a relationship can fail if the relationship no longer exists or the authenticated identity is not authorized to read the relationship details.

Error Code

PAAS-005027

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Relationship Not Found",
  "status": "404",
  "detail": "Relationship resource not found. There is a relationship to a resource, but the resource at the end of the relationship does not exist, or the authenticated identity cannot see the resource.",
  "o:errorCode": "PAAS-005027"
}

409Conflict - Starter Edition Vanity Domain Not Supported

Starter edition will not allow you to add a site vanity domain.

Error Code

OCE-SITEMGMT-009118

Resolution - Upgrade to Premium

Upgrade to Premium to enable site vanity domain support.

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Starter Edition Vanity Domain Not Supported",
  "status": "409",
  "detail": "Starter edition will not allow you to add a site vanity domain.",
  "o:errorCode": "OCE-SITEMGMT-009118"
}

Introduced in release 21.6.1.

409Conflict - Instance Vanity Domain Conflict

The provided site vanity domain cannot be used because it is being used as the instance level vanity domain.

Error Code

OCE-SITEMGMT-009120

Resolution - Use Alternative

The domain cannot be the same as the instance level vanity domain. Choose an alternative vanity domain name.

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Instance Vanity Domain Conflict",
  "status": "409",
  "detail": "The provided site vanity domain cannot be used because it is being used as the instance level vanity domain.",
  "o:errorCode": "OCE-SITEMGMT-009120"
}

Introduced in release 21.7.1.

409Conflict - Vanity Domain Configuration Not Supported

Vanity domain configuration is not available.

Error Code

OCE-SITEMGMT-009127

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Vanity Domain Configuration Not Supported",
  "status": "409",
  "detail": "Vanity domain configuration is only available in OCI-N environments.",
  "o:errorCode": "OCE-SITEMGMT-009127"
}

Introduced in release 21.9.1.

This resource represents the relationship between a Site and Vanity Domain resource. If the Vanity Domain has been deleted or the authenticated user is not authorized to read the resource then the response status code will be 404 Not Found and a Relationship Not Found error will be returned in the response body.

Request

Supported Media Types
Path Parameters
Body ()

Vanity domain to set.

Root Schema : schema
Type: object
Show Source
  • links
  • The vanity domain for this site.

    Introduced in release 21.5.1.
Example:
{
    "name":"cloud.example.com"
}
Back to Top

Response

Supported Media Types

200 Response

OK
Headers
Body ()
Root Schema : schema
Match All
Show Source
  • VanityDomain

    Defines a vanity domain for a site. Once configured, a vanity domain may be used in place of the site domain to access the site.

    Introduced in release 21.5.1.
Nested Schema : VanityDomain

Defines a vanity domain for a site. Once configured, a vanity domain may be used in place of the site domain to access the site.

Introduced in release 21.5.1.
Match All
Show Source
  • SingularResource

    All singular resources include the properties of the singular resource definition. A singular resource includes a list of links that provide relationships to other resources, or in the case of the self link the resource itself.

  • VanityDomain-allOf[1]
Nested Schema : SingularResource
Type: object

All singular resources include the properties of the singular resource definition. A singular resource includes a list of links that provide relationships to other resources, or in the case of the self link the resource itself.

Show Source
  • links
Nested Schema : VanityDomain-allOf[1]
Type: object
Show Source
  • The configuration status of this vanity domain. The domain is not immediately available to users once set, configuration to make it available may take up to 60 mins to complete.

    Valid values are:

    • processing - Vanity domain configuration is in process
    • completed - Vanity domain configuration has completed
    • failed - Vanity domain configuration has failed

    Introduced in release 21.5.1.
  • The vanity domain for this site.

    Introduced in release 21.5.1.
Example Response (Set the Vanity Domain on a Site)
{
    "name":"cloud.example.com",
    "configurationStatus":"processing"
}

400 Response

Bad Request
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : InvalidSiteVanityDomainExceptionDetail
Introduced in release 21.5.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 : InvalidSiteVanityDomainExceptionDetail-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 (Invalid Site Vanity Domain)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Invalid Site Vanity Domain",
    "status":"400",
    "detail":"The site vanity domain name cannot be used because it contains characters that are not allowed.",
    "o:errorCode":"OCE-SITEMGMT-009116",
    "name":"example_domain.com"
}

401 Response

Unauthorized

403 Response

Forbidden
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : SiteOperationForbiddenExceptionDetail
Introduced in release 19.1.5.
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 : SiteOperationForbiddenExceptionDetail-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 (Site Operation Forbidden)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Site Operation Forbidden",
    "status":"403",
    "detail":"You do have a sharing role in this site, but your role does not allow you to use this operation.",
    "o:errorCode":"OCE-SITEMGMT-009026",
    "site":{
        "id":"FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
    }
}

404 Response

Not Found
Headers
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : SiteNotFoundExceptionDetail
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 : SiteNotFoundExceptionDetail-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 (Site Not Found)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Site Not Found",
    "status":"404",
    "detail":"Site does not exist or has been deleted, or the authenticated user or client application does not have access to the site.",
    "o:errorCode":"OCE-SITEMGMT-009003",
    "site":{
        "id":"FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
    }
}
Example Response (Relationship Not Found)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Relationship Not Found",
    "status":"404",
    "detail":"Relationship resource not found. There is a relationship to a resource, but the resource at the end of the relationship does not exist, or the authenticated identity cannot see the resource.",
    "o:errorCode":"PAAS-005027"
}

406 Response

Not Acceptable

409 Response

Conflict
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : StarterEditionVanityDomainNotSupportedExceptionDetail
Introduced in release 21.6.1.
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 : 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 : 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 (Starter Edition Vanity Domain Not Supported)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Starter Edition Vanity Domain Not Supported",
    "status":"409",
    "detail":"Starter edition will not allow you to add a site vanity domain.",
    "o:errorCode":"OCE-SITEMGMT-009118"
}
Example Response (Instance Vanity Domain Conflict)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Instance Vanity Domain Conflict",
    "status":"409",
    "detail":"The provided site vanity domain cannot be used because it is being used as the instance level vanity domain.",
    "o:errorCode":"OCE-SITEMGMT-009120"
}
Example Response (Vanity Domain Configuration Not Supported)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Vanity Domain Configuration Not Supported",
    "status":"409",
    "detail":"Vanity domain configuration is only available in OCI-N environments.",
    "o:errorCode":"OCE-SITEMGMT-009127"
}

413 Response

Payload Too Large

415 Response

Unsupported Media Type

416 Response

Range Not Satisfiable

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