Commit Updates to a Site

post

/sites/management/api/v1/sites/{id}/updates/{updateId}/commit

EXTENDED OPERATION

Commit the changes in an update to the base site. If the site is online then the edits will be publicly visible after a publish operation. Otherwise the edits will be publicly after the site is (re)published and brought online.

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

Publishing a Site

Once a site update has been committed the changes can be published to the online site.

For more information, see Publish Updates to a Site.

Path Alternative Identifiers

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

nameSite Update Name

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

http://api.example.com/sites/management/api/v1/sites/{id}/updates/name:MyEdits/commit

Introduced in release 21.9.1.

Redirection Response Examples

This operation responds with the following redirection (3xx) responses. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation. Note: Depending on the client technology used to invoke this operation a 2xx response may be returned if the redirection is followed automatically.

303See Other - Force a Full Publish

Do a full publish of all the site files. The default is for the publish to be an incremental publish, only publishing changed files.

Request

POST https://api.example.com/sites/management/api/v1/sites/{id}/updates/{updateId}/commit

Request Body

{
  "doForceOverwrite": "true"
}

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 - 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 Update Not Found

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

Error Code

OCE-SITEMGMT-009122

Resolution - Check Identifier

Check that the site identifier is valid.

Resolution - Check Membership

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

Exception Detail Fields

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

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

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

Introduced in release 21.9.1.

409Conflict - Site Update Not Found

The merge of the update into the base site has failed due to a clash with content in a previously applied update.

Error Code

OCE-SITEMGMT-009127

Exception Detail Fields

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

Field NameDescription
updateUpdate which failed to merge to base site.

For detailed information about this exception detail type, consult the BaseSiteAlreadyUpdatedExceptionDetail 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 Update Not Found",
  "status": "409",
  "detail": "The merge of the update into the base site has failed due to a clash with content in a previously applied update.",
  "o:errorCode": "OCE-SITEMGMT-009127",
  "update": {
    "id": "FC274A0A4E18CD651C0EDD7DT0000DEFAULT00000000"
  }
}

Introduced in release 21.9.1.

Request

Supported Media Types
Path Parameters
Body ()

Update commit, such as whether to force overwrites when version conflicts occur.

Root Schema : schema
Type: object
Show Source
  • If present and set to true, this option will force changes to be committed irrespective of possible version conflict.

    Introduced in release 21.9.1.
  • links

    HATEOS link to related resources and actions or actions on this resource. Must include at least a 'self' link that contains a link to the canonical representation of the resource.

Example:
{
    "doForceOverwrite":"true"
}
Nested Schema : links
Type: array

HATEOS link to related resources and actions or actions on this resource. Must include at least a 'self' link that contains a link to the canonical representation of the resource.

Show Source
Nested Schema : items
Match All
Show Source
  • Link
Back to Top

Response

303 Response

See Other
Headers

400 Response

Bad Request

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 : SiteUpdateNotFoundExceptionDetail
Introduced in release 21.9.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 : SiteUpdateNotFoundExceptionDetail-allOf[1]
Type: object
Show Source
  • Update that does not exist or is not visible to the authenticated user.

    Introduced in release 21.9.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 (Site Update Not Found)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Site Update Not Found",
    "status":"404",
    "detail":"Update does not exist or has been deleted, or the authenticated user or client application does not have access to the update.",
    "o:errorCode":"OCE-SITEMGMT-009122",
    "update":{
        "id":"FC274A0A4E18CD651C0EDD7DT0000DEFAULT00000000"
    }
}

409 Response

Conflict
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : BaseSiteAlreadyUpdatedExceptionDetail
Introduced in release 21.9.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 : BaseSiteAlreadyUpdatedExceptionDetail-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 Update Not Found)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Site Update Not Found",
    "status":"409",
    "detail":"The merge of the update into the base site has failed due to a clash with content in a previously applied update.",
    "o:errorCode":"OCE-SITEMGMT-009127",
    "update":{
        "id":"FC274A0A4E18CD651C0EDD7DT0000DEFAULT00000000"
    }
}

413 Response

Payload Too Large

415 Response

Unsupported Media Type

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