Commit Updates to a Site
/sites/management/api/v1/sites/{id}/updates/{updateId}/commit
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 Name | Description |
site | Site 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 Name | Description |
update | Update 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 Name | Description |
update | Update 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
- application/json
-
id: string
Immutable identifier for the site.
-
updateId: string
Immutable identifier.
Update commit, such as whether to force overwrites when version conflicts occur.
object
-
doForceOverwrite(optional):
boolean
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(optional):
array 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.
{
"doForceOverwrite":"true"
}
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.
object
REST HATEOAS link and related metadata. If responses provide links (for example, a self
link to the resource itself) the links provided will include one or more of the properties defined on this link structure.
-
href(optional):
string
The target resource URI. URI RFC3986 or URI Template RFC6570. If the value is set to URI Template, then the
templated
property must be set totrue
. -
mediaType(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
Valid values are:
-
OPTIONS
- HTTP OPTIONS -
HEAD
- HTTP HEAD -
GET
- HTTP GET -
POST
- HTTP POST -
PUT
- HTTP PUT -
PATCH
- HTTP PATCH -
DELETE
- HTTP DELETE
-
-
profile(optional):
string(uri)
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource.
-
rel(optional):
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details.
-
templated(optional):
boolean
Boolean flag that specifies the
href
property is a URI or URI Template. The property can be assumed to befalse
if the property is not present.
Response
303 Response
400 Response
401 Response
403 Response
-
allOf
SiteOperationForbiddenExceptionDetail
Introduced in release 19.1.5.
-
object
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.
-
object
SiteOperationForbiddenExceptionDetail-allOf[1]
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.
-
detail(optional):
string
Description specific to this occurrence of the problem. The human-readable, potentially multi-line details describing the problem in more details.
-
instance(optional):
string(uri)
URI to the link that provides more detail about the error.
-
o:errorCode(optional):
string
Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the
title
ordetail
. -
o:errorDetails(optional):
array o:errorDetails
Multiple errors can be organized in a hierarchical structure.
-
o:errorPath(optional):
string
XPath or JSON path to indicate where the error occurs.
-
status(optional):
integer(int32)
Corresponding HTTP status code for the error.
-
title(optional):
string
Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the
o:errorCode
for this purpose. -
type(optional):
string(uri)
Absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.
object
-
site(optional):
string
Site on which the operation is being performed.
Introduced in release 19.1.5.
array
Multiple errors can be organized in a hierarchical structure.
-
object
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.
{
"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
-
Cache-Control: string
Directives for caching mechanisms.
-
Content-Length: string
Size of the response body.
-
Content-Type: string
Content type of the response.
-
allOf
SiteUpdateNotFoundExceptionDetail
Introduced in release 21.9.1.
-
object
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.
-
object
SiteUpdateNotFoundExceptionDetail-allOf[1]
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.
-
detail(optional):
string
Description specific to this occurrence of the problem. The human-readable, potentially multi-line details describing the problem in more details.
-
instance(optional):
string(uri)
URI to the link that provides more detail about the error.
-
o:errorCode(optional):
string
Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the
title
ordetail
. -
o:errorDetails(optional):
array o:errorDetails
Multiple errors can be organized in a hierarchical structure.
-
o:errorPath(optional):
string
XPath or JSON path to indicate where the error occurs.
-
status(optional):
integer(int32)
Corresponding HTTP status code for the error.
-
title(optional):
string
Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the
o:errorCode
for this purpose. -
type(optional):
string(uri)
Absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.
object
-
update(optional):
string
Update that does not exist or is not visible to the authenticated user.
Introduced in release 21.9.1.
array
Multiple errors can be organized in a hierarchical structure.
-
object
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.
{
"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
-
allOf
BaseSiteAlreadyUpdatedExceptionDetail
Introduced in release 21.9.1.
-
object
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.
-
object
BaseSiteAlreadyUpdatedExceptionDetail-allOf[1]
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.
-
detail(optional):
string
Description specific to this occurrence of the problem. The human-readable, potentially multi-line details describing the problem in more details.
-
instance(optional):
string(uri)
URI to the link that provides more detail about the error.
-
o:errorCode(optional):
string
Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the
title
ordetail
. -
o:errorDetails(optional):
array o:errorDetails
Multiple errors can be organized in a hierarchical structure.
-
o:errorPath(optional):
string
XPath or JSON path to indicate where the error occurs.
-
status(optional):
integer(int32)
Corresponding HTTP status code for the error.
-
title(optional):
string
Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the
o:errorCode
for this purpose. -
type(optional):
string(uri)
Absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.
object
-
update(optional):
string
Update which failed to merge to base site.
Introduced in release 21.9.1.
array
Multiple errors can be organized in a hierarchical structure.
-
object
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.
{
"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"
}
}