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

Action Groups

How to create an action group

Users can make use of the POST /agents/action-groups API call to create an action group. Before you make this call, you need to get the Action group Id to be used and the S3 paths for the Lambda code and API definitions using the GET /agents/action-groups?action=get_presigned_url API call. The payload for the POST request is as follows:

Sample payload to create an action group
{
"ActionGroupId": "Action group Id",
"ActionGroupName": "Action group name",
"Description": "Action group description",
"LambdaS3Path": "S3 path for lambda code",
"LambdaHandler": "lambda handler",
"ApiDefS3Path": "S3 path for API definitions"
}

ActionGroupId: This is the id of the action group.

ActionGroupName: This is the name of the action group.

Description: Description for the action group.

LambdaS3Path: This is the S3 path where the Lambda code for the action group is stored.

LambdaHandler: This is the handler function to be used for the lambda.

ApiDefS3Path: This is the S3 path where the API definition for the action group is stored.

Listing action groups

To list the agents, users can use the GET /agents/action-groups API.

Getting details of an action group

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

Updating details of an action group

To update an action group, users can make use of the PUT /agents/{id} API. Users can update the Description, LambdaHandler and the AttachedLibraries.

Deleting an action group

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

Adding an action group to an agent

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

Sample payload to add an action-group to an agent
{
"ActionGroups": ["action-group-id"]
}
note

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

Getting list of action groups attached to an agent

To get the list of action groups attached to an agent, users can use the GET /agents/{id}/action-groups API.