libraries

Restore a library from trash

Restores a previously-trashed library so it reappears in default list/search results. Works as long as the library row still exists — once get_library returns 404 the row is gone and restore is no longer possible. If the background drain has already started purging assets, restore succeeds but recovers only the assets the drain hasn't gotten to yet.

Pairs with trash_library. To restore individual trashed assets within an untrashed library, use restore_assets instead.

post/api/libraries/{library_id}/restore

Path parameters

library_idstring required

Library ID (with lib_ prefix) of the trashed library to restore.

Library ID (with lib_ prefix) of the trashed library to restore.

Response

Successful Response

idstring required

Unique library identifier with 'lib_' prefix

namestring required

Display name of the library

descriptionstring nullable

Optional description text for the library

user_idstring required

ID of the user who owns this library

asset_countinteger required

Total number of assets in this library

storage_used_bytesinteger required

Bytes of assets currently stored in this library

storage_limit_bytesinteger nullable

Maximum bytes this library may store, or null if no per-library limit applies

created_atstring date-time required

When this library was created

updated_atstring date-time required

When this library was last updated

Changes

Changed in 4 of the 79 revisions of this API.18

    • response property detail list-of-types was widened by adding types string to media type application/json of response 422

      response-property-list-of-types-widened

    • the response property detail became required for the status 422

      response-property-became-required

    • added the media type application/json for the response with the status 404

      response-media-type-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • added the optional property storage_limit_bytes to the response with the 200 status

      response-optional-property-added

    • added the required property storage_used_bytes to the response with the 200 status

      response-required-property-added

    • endpoint added

      endpoint-added