Export a Component

post

/sites/management/api/v1/components/{id}/export

EXTENDED OPERATION

Export a component as a component package. The component artifacts are exported to a component package file and stored as a file under the users home folder. The location of this file defaults to the home folder of the authenticated user, but a explicit folder can be specified. If an explicit folder is specified the authenticated user or client application must have permission to create files in that folder. The name of the exported component package file is the component name with a zip file extension. Repeated calls to export the same component will create new revisions of the file; the latest revision being the latest request to export the component.

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
  • Contributor
  • Downloader

Importing a Component

An exported component can be imported by providing the exported component package file.

For more information, see Import a Component.

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/export

Introduced in release 19.4.1.

Request Body Alternative Identifiers

The request body references resources that support alternative identifiers. These alternative identifiers can be used instead of using the default resource identifier.

pathFolder Path

The default identifier for a Folder resource is the Item Identifier.

Instead of the folder identifier the folder path can be used to identify a folder. A path is built up using the names of the parent folder (relative to the user's home folder), joined by /. Folder paths can only be used for personal folders, shared folders cannot be referenced by path. Folder and file names are case insensitive.

path:folder1/folder2

Introduced in release 19.4.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 - Home Folder

Export the component into the home folder of the authenticated user.

Request

POST https://api.example.com/sites/management/api/v1/components/{id}/export

303See Other - Explicit Folder

Export the component into the folder packages\\components under the authenticated user's home folder.

Request

POST https://api.example.com/sites/management/api/v1/components/{id}/export

Request Body

"path:packages/components"

303See Other - Explicit Folder Identifier

Export the component into a folder identified by the folder identifier.

Request

POST https://api.example.com/sites/management/api/v1/components/{id}/export

Request Body

"F04703DB9F17EECBD1C41A4EF6C3FF17C1177A968060"

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 Folder

A folder identified with an identifier cannot be found.

Error Code

OCE-DOCS-001003

Resolution - Check Folder Exists

Check that the folder identifier is valid.

Resolution - Check Sharing Role in Folder

Check that the authenticated user or client application has a role for the folder.

Exception Detail Fields

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

Field NameDescription
folderFolder that does not exist.

For detailed information about this exception detail type, consult the InvalidFolderExceptionDetail 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 Folder",
  "status": "400",
  "detail": "Folder does not exist or the authenticated user or client application does not have access to the folder.",
  "o:errorCode": "OCE-DOCS-001003",
  "folder": {
    "id": "FC274A0A4E18CD651C0EDD7DT0000DEFAULT00000000"
  }
}

Introduced in release 19.4.1.

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.

Exception Detail Fields

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

Field NameDescription
componentComponent 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.

Exception Detail Fields

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

Field NameDescription
usedStorage used, in GB.
limitStorage 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 - Quota Size Exceeded

Quota limit has been reached. Limits have been set by the system administrator.

Error Code

OCE-SITEMGMT-009142

Resolution - Increase Quota

Get a system administrator to increase the user's quota.

Exception Detail Fields

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

Field NameDescription
usedUsed quota, in Bytes.
totalQuota limit, in Bytes.

For detailed information about this exception detail type, consult the QuotaSizeExceededExceptionDetail 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": "Quota Size Exceeded",
  "status": "403",
  "detail": "Quota size exceeded.",
  "o:errorCode": "OCE-SITEMGMT-009142",
  "used": 1234567890,
  "total": 1234567890
}

Introduced in release 22.8.2.

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.

Exception Detail Fields

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

Field NameDescription
componentComponent 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.

Exception Detail Fields

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

Field NameDescription
componentComponent 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

Supported Media Types
Path Parameters
Query Parameters
  • 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 the includeDeleted 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.

Body ()

Specify a folder the authenticated user or client application owns or a folder the authenticated user or client application is a member of with the manager or contributor role. If no folder is specified then the component file is written into the home folder of the authenticated user or client application.

Root Schema : schema
Type: string
Example:
"path:packages/components"
Back to Top

Response

303 Response

See Other
Headers

400 Response

Bad Request
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : InvalidFolderExceptionDetail
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 : InvalidFolderExceptionDetail-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 Folder)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Invalid Folder",
    "status":"400",
    "detail":"Folder does not exist or the authenticated user or client application does not have access to the folder.",
    "o:errorCode":"OCE-DOCS-001003",
    "folder":{
        "id":"FC274A0A4E18CD651C0EDD7DT0000DEFAULT00000000"
    }
}

401 Response

Unauthorized

403 Response

Forbidden
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : ComponentOperationForbiddenExceptionDetail
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 : ComponentOperationForbiddenExceptionDetail-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 (Component Operation Forbidden)
{
    "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"
    }
}
Example Response (Storage Limit Reached)
{
    "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
}
Example Response (Quota Size Exceeded)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Quota Size Exceeded",
    "status":"403",
    "detail":"Quota size exceeded.",
    "o:errorCode":"OCE-SITEMGMT-009142",
    "used":1234567890,
    "total":1234567890
}

404 Response

Not Found
Headers
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : ComponentNotFoundExceptionDetail
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 : ComponentNotFoundExceptionDetail-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 (Component Not Found)
{
    "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

Conflict
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : ComponentDeletedExceptionDetail
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 : ComponentDeletedExceptionDetail-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 (Component Deleted)
{
    "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"
    }
}

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