Retrieve Actions
The retrieval of an action with a TaskingAI client SDK is straightforward.
You can use the list_actions
method to retrieve all actions in a project. Or, you can use the get_action
method with the action_id
to retrieve a specific action.
import taskingai
actions = taskingai.tool.list_actions()
action_id = actions[0].action_id
action = taskingai.tool.get_action(action_id=action_id)
list_actions
function is enhanced with pagination capabilities, featuring parameters such as order
, limit
, after
, and before
.
If after
and before
are not specified, the function will return the first limit
number of records in the collection, sorted in descending order of creation time by default. When one of after or before is specified, the function will return the next limit
number of records in the collection, sorted in ascending or descending order, respectively.
Note that only one of after
or before
can be specified at a time.