Introduction
Efficiently managing tasks and their associated assets is a critical requirement in workflows involving digital asset management systems. This guide demonstrates how to automate the process of finding tasks with a status that is not “Completed” and retrieving their corresponding assets by their IDs. By following these examples, you can streamline your task and asset management processes and integrate them into your existing workflows. Authentication is a critical step in interacting with the Mudstack API. Each request requires an authorization token, which is obtained using your API key and secret. Additionally, thex-workspace-id
and x-account-id
headers must be included in every request to ensure proper scoping.
This example is particularly useful for scenarios such as:
- Identifying tasks that require immediate attention.
- Automating the retrieval of assets associated with pending tasks.
- Integrating task and asset management with other systems or workflows.
- Authenticate and retrieve an authorization token.
- Retrieve tasks using the
/tasks
endpoint. - Filter tasks with a status that is not “Completed”.
- Retrieve the corresponding assets for the filtered tasks using the
/workspaces/assets/{asset_id}
endpoint.
Steps
Step 1: Authenticate and Retrieve an Authorization Token
Use the/auth/token
endpoint to retrieve an authorization token. Replace <your_account_id>
, <your_key>
, and <your_secret>
with your account ID, API key, and secret, respectively.
Step 2: Retrieve Tasks
Use the/tasks
endpoint to retrieve tasks. Replace <your_token>
, <workspace_id>
, and <account_id>
with your authorization token, workspace ID, and account ID, respectively.
Step 3: Filter Tasks with Status Not “Completed”
Filter the tasks to exclude those with a status of “Completed”.Step 4: Retrieve Corresponding Assets
For each filtered task, retrieve the corresponding asset using the/workspaces/assets/{asset_id}
endpoint.