Library

Manage all resources for

HOST: https://api.compasai.com/api/enterprise

PS: Always append back slash

Libraries are used to store resources. Here is an example of a resource object

Create a new library

POST /library/

Headers

Content-Type

application/json

Authorization

Bearer <token>

Body

name

string

Name of the library

required

enterprise

int

Enterprise ID

required

tag

string

Unique classification of the library

optional

description

string

A brief summary of the library

optional

Response


Fetch a Library

GET /library/<id>/

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response


Delete Library

DELETE /library/<id>/

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response


Add resources to a library

POST /add_resources/

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

library_id

number

ID of Library

resources

ResourceObject

List of all the resources with it's data (ResourceObject) to be added to the library

enterprise

int

Enterprise ID

Response


Update resources in a Library

PATCH /resource/<id>/

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

resource

ResourceObject

Updated Resource data (all of it)

Response


Delete Resources in a Library

DELETE /resource/<id>/

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response

Last updated