Skip to main content
info
This documentation is for version v2.4 of the product.
For the latest version(v2.7) documentation click here
Version: v2.4 print this page

Libraries

Libraries let users upload the packages that they want to use in their action groups. Once a library is created, users have to attach it to an action group for it to be used. A library can be reused and attached to multiple action groups.

How to create a library

Users can make use of the POST /agents/libraries API call to create a library. The payload for the POST request is as follows:

Sample payload to create a library
{
"LibraryName": "Library name",
"Description": "Library description"
}

To upload packages to a library, users first have to make a PUT /agents/libraries/{id}?action=get_presigned_url API call. The response to this will contain a PresignedURL and an UploadPath. Users have to then upload the file to the presigned url and then make the PUT /agents/libraries/{id} call. The payload for this request is as follows:

Sample payload to update a library
{
"Packages": [
"s3 path of your uploaded package"
]
}

Listing libraries

To list the agents, users can use the GET /agents/libraries API.

Getting details of a library

To get the details of an action group, users can use the GET /agents/libraries/{id} API.

Deleting an action group

To delete an action group, users can use the DELETE /agents/libraries/{id} API.

Adding a library to an action group

To add a library to an action group, users can make use of the PUT /agents/action-groups/{id} API. The payload for the request is as follows:

Sample payload to add a library to an action group
{
"AttachedLibraries": ["library-id"]
}
note

When adding libraries to an action group which already has some libraries attached to it, the list sent should include the existing library Ids too. If not, the existing ones will get removed from the action group.