Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Export a project component to the library

Exports a project component to the workspace library, making it available for reuse across all projects. The exported component includes all nested data (items, questions, todos, test cases, conditions) with ID references automatically updated. The component is placed at the end of the library with an optional custom name. Requires both Projects.manageComponents and ProjectComponentsLibrary.edit permissions.

POST/projects/{projectId}/components/{id}/export
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired

Project UUID

idstringrequired

Component UUID to export

Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Request body
requiredapplication/json
namestring

Custom name for the library component. If not provided, uses original component name.

Responses
201

Component exported to library successfully

idstringrequired

UUID of the created library component

400

Invalid projectId or component id format

401

Unauthorized - Invalid or missing authentication token

403

Insufficient permissions to manage components or edit library, or no access to project

404

Component not found, deleted, or does not belong to the specified project

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/components/e57dc37b-7693-4d06-b49c-17084b773aff/export" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Authentication Module Template"
}'
Response
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}