Skip to navigation

Import Library Resources

Copy components and assets from the site’s installed libraries into the site. Components come with their classes, interactions, and assets.

Pass library IDs in the format library:<libraryId>:<resourceId>, from 1 to 100 in components and assets together. If the site already has a copy of a resource, the import returns that copy. The import is all-or-nothing: when one ID fails, the import adds nothing.

The import runs in the background. Poll Get Library Import Status until status is finished or failed. A finished status lists the site’s copy of each resource.

Requires permission to add library components. To import only assets, permission to manage libraries is also enough.

Required scope | libraries:write

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site

Request

Pass from 1 to 100 IDs in components and assets together.

componentslist of stringsOptional

Library component IDs, in the format library:<libraryId>:<componentId>.

assetslist of stringsOptional

Library asset IDs, in the format library:<libraryId>:<assetId>.

Response headers

LocationstringOptional
URL of Get Library Import Status for this site

Response

The import is queued
statusenum
Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error