Publish Updates Made to a Component
/sites/management/api/v1/components/{id}/publish
Publish the latest updates made by a site developer to the component to any site using that component. If the site is online then the updates will be publicly accessible after the publish operation completes. If the site is offline then the updates are published so that when the site is activated and brought online those updates will be publicly accessible.
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
Asynchronous Processing
This operation supports both asynchronous and synchronous processing. The client can specify a preferred interaction mode by adding a Prefer
header with a value of respond-async
. The server may change an asynchronous request to synchronous so the client should be prepared to handle both cases. An accepted response will include a Location
header, which provides the location of a status resource that can be polled to obtain information about the asynchronous processing.
For more information about reading the status see Get the Progress of a Site Related Job.
Path Alternative Identifiers
The default identifier for a Component resource is the Component Identifier. The Component resource supports alternative identifiers.
nameComponent Name
Instead of the component identifier, the component name can be used to uniquely identify a component in the resource path. The default resource path parameter for a component is the component identifier, but when working with components the human-readable component name is sometimes easier.
http://api.example.com/sites/management/api/v1/components/name:FooterBar/publish
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.
202Accepted - Publish By Name Asynchronously
Publish the FooterBar component asynchronously. This example uses the name
alternative identifier to publish a component by name.
Request
POST https://api.example.com/sites/management/api/v1/components/name:FooterBar/publish
Request Headers
Prefer=respond-async
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 - Publish By Name
Publish the FooterBar component. This example uses the name
alternative identifier to publish a component by name.
Request
POST https://api.example.com/sites/management/api/v1/components/name:FooterBar/publish
Client Error Response Examples
This operation responds with the following client error (4xx) responses, with exception details in the response body or reported through the asynchronous job. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation.
403Forbidden - Component Operation Forbidden
Your sharing role within the component does not allow you to perform the operation.
Error Code
OCE-SITEMGMT-009055
Resolution - Change the Sharing Role
Change the role given to the authenticated user to the required role or higher.
Where This Error Can be Returned
- This error can be returned in the response body.
- This error will not be returned in the asynchronous job status.
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
component | Component on which the operation is being performed. |
For detailed information about this exception detail type, consult the ComponentOperationForbiddenExceptionDetail 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": "Component Operation Forbidden", "status": "403", "detail": "You do have a sharing role in this component, but your role does not allow you to use this operation.", "o:errorCode": "OCE-SITEMGMT-009055", "component": { "id": "F40B9BE3E69F6DC440559A1F033BB2482DB740ECB2D8" } }
Introduced in release 19.4.1.
403Forbidden - Storage Limit Reached
Storage transfer limit has been reached. Billing limits have been set on the amount of storage available by the system administrator.
Error Code
OCE-SITEMGMT-009098
Resolution - Increase Storage Limit
Get a system administrator to increase the storage limit.
Where This Error Can be Returned
- This error can be returned in the response body.
- This error will not be returned in the asynchronous job status.
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
used | Storage used, in GB. |
limit | Storage limit, in GB. |
For detailed information about this exception detail type, consult the StorageLimitReachedExceptionDetail 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": "Storage Limit Reached", "status": "403", "detail": "Storage limit has been reached.", "o:errorCode": "OCE-SITEMGMT-009098", "used": 1.23456789, "limit": 1.23456789 }
Introduced in release 20.3.1.
403Forbidden - Outbound Data Limit Reached
Outbound data limit has been reached. Limits have been set by the system administrator on the amount of outbound data.
Error Code
OCE-SITEMGMT-009100
Resolution - Increase Outbound Data Limit
Get a system administrator to increase the outbound data limit.
Where This Error Can be Returned
- This error can be returned in the response body.
- This error will not be returned in the asynchronous job status.
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
used | Outbound data used, in GB. |
limit | Outbound data limit, in GB. |
For detailed information about this exception detail type, consult the OutboundDataLimitReachedExceptionDetail 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": "Outbound Data Limit Reached", "status": "403", "detail": "Outbound data limit has been reached.", "o:errorCode": "OCE-SITEMGMT-009100", "used": 1.23456789, "limit": 1.23456789 }
Introduced in release 20.3.1.
404Not Found - Component Not Found
The site component does not exist or has been deleted, or the authenticated user or client application does not have access to the component.
Error Code
OCE-SITEMGMT-009045
Resolution - Check Identifier
Check that the component identifier is valid.
Resolution - Check Membership
Check that the authenticated user is a member of the component.
Where This Error Can be Returned
- This error can be returned in the response body.
- This error will not be returned in the asynchronous job status.
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
component | Component that does not exist or is not visible to the authenticated user. |
For detailed information about this exception detail type, consult the ComponentNotFoundExceptionDetail 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": "Component Not Found", "status": "404", "detail": "Component does not exist or has been deleted, or the authenticated user or client application does not have access to the component.", "o:errorCode": "OCE-SITEMGMT-009045", "component": { "id": "F40B9BE3E69F6DC440559A1F033BB2482DB740ECB2D8" } }
Introduced in release 19.4.1.
409Conflict - Component Deleted
The operation cannot be performed on a soft deleted component. This error can only occur when the includeDeleted
query parameter set to true
Error Code
OCE-SITEMGMT-009060
Resolution - Restore Component
Restore the component and then try the operation again.
Where This Error Can be Returned
- This error can be returned in the response body.
- This error will not be returned in the asynchronous job status.
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
component | Component that is soft deleted. |
For detailed information about this exception detail type, consult the ComponentDeletedExceptionDetail 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": "Component Deleted", "status": "409", "detail": "The operation cannot be performed as the component has been soft deleted.", "o:errorCode": "OCE-SITEMGMT-009060", "component": { "id": "F40B9BE3E69F6DC440559A1F033BB2482DB740ECB2D8" } }
Introduced in release 19.4.1.
Request
-
id: string
Immutable identifier for the component.
-
includeDeleted(optional): boolean
Resources that have been marked for deletion can be read, modified, and support extended operations as long this query parameter is set to
true
. When theincludeDeleted
query parameter is not sent then the response to read, modification, and extended operations will be identical to that which would be returned if the resource was permanently deleted.
-
Prefer(optional): string
Request asynchronous processing of the request using a
respond-async
header value.
Response
202 Response
303 Response
400 Response
401 Response
403 Response
-
allOf
ComponentOperationForbiddenExceptionDetail
Introduced in release 19.4.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
ComponentOperationForbiddenExceptionDetail-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
-
component(optional):
string
Component on which the operation is being performed.
Introduced in release 19.4.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":"Component Operation Forbidden",
"status":"403",
"detail":"You do have a sharing role in this component, but your role does not allow you to use this operation.",
"o:errorCode":"OCE-SITEMGMT-009055",
"component":{
"id":"F40B9BE3E69F6DC440559A1F033BB2482DB740ECB2D8"
}
}
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Storage Limit Reached",
"status":"403",
"detail":"Storage limit has been reached.",
"o:errorCode":"OCE-SITEMGMT-009098",
"used":1.23456789,
"limit":1.23456789
}
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Outbound Data Limit Reached",
"status":"403",
"detail":"Outbound data limit has been reached.",
"o:errorCode":"OCE-SITEMGMT-009100",
"used":1.23456789,
"limit":1.23456789
}
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
ComponentNotFoundExceptionDetail
Introduced in release 19.4.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
ComponentNotFoundExceptionDetail-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
-
component(optional):
string
Component that does not exist or is not visible to the authenticated user.
Introduced in release 19.4.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":"Component Not Found",
"status":"404",
"detail":"Component does not exist or has been deleted, or the authenticated user or client application does not have access to the component.",
"o:errorCode":"OCE-SITEMGMT-009045",
"component":{
"id":"F40B9BE3E69F6DC440559A1F033BB2482DB740ECB2D8"
}
}
409 Response
-
allOf
ComponentDeletedExceptionDetail
Introduced in release 19.4.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
ComponentDeletedExceptionDetail-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
-
component(optional):
string
Component that is soft deleted.
Introduced in release 19.4.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":"Component Deleted",
"status":"409",
"detail":"The operation cannot be performed as the component has been soft deleted.",
"o:errorCode":"OCE-SITEMGMT-009060",
"component":{
"id":"F40B9BE3E69F6DC440559A1F033BB2482DB740ECB2D8"
}
}