Skip to content

Libraries API

Manage component libraries - collections of reusable components.

Create a Library

Create a new component library.

Endpoint: POST /api/v1/library

Request Body:

json
{
  "title": "My Component Library",
  "description": "A collection of reusable components"
}

Example Request:

bash
curl -X POST "https://access.flatnode.io/api/v1/library" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My Component Library",
    "description": "A collection of reusable components"
  }'

Response: 201 Created

json
{
  "data": {
    "Id": 101
  }
}

Get a Library

Retrieve a library by ID.

Endpoint: GET /api/v1/library/{id}

Example Request:

bash
curl -X GET "https://access.flatnode.io/api/v1/library/101" \
  -H "Authorization: Bearer your-token-here"

Response: 200 OK

Returns library details and associated components.

List Libraries

Get all libraries (if supported).

Endpoint: GET /api/v1/library

Example Request:

bash
curl -X GET "https://access.flatnode.io/api/v1/library" \
  -H "Authorization: Bearer your-token-here"

Response: 200 OK

Update a Library

Update library metadata.

Endpoint: PATCH /api/v1/library/{id} or PUT /api/v1/library/{id}

Request Body:

json
{
  "title": "Updated Library Title",
  "description": "Updated description"
}

Example Request:

bash
curl -X PATCH "https://access.flatnode.io/api/v1/library/101" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Library Title"
  }'

Response: 200 OK

Delete a Library

Delete a library.

Endpoint: DELETE /api/v1/library/{id}

Example Request:

bash
curl -X DELETE "https://access.flatnode.io/api/v1/library/101" \
  -H "Authorization: Bearer your-token-here"

Response: 200 OK or 204 No Content