Tag assignments

Use this endpoint to apply tags to or remove tags from assets in a customer workspace.

TAG APIS

To create, retrieve, update, and delete tags programmatically, refer to our Environment management API documentation.

Rate limits

The tag assignments resource has the following rate limit:

TypeResourceLimit
AllAll Tag assignments endpoints1,000 requests per minute

Quick reference

TypeResourceDescription
POST/api/v2/managed_users/:managed_user_id/tags_assignmentsApply tags to or remove tags from assets in a customer workspace.

Manage tag assignments

Applies or removes tags from assets in a customer workspace. Assets that can be tagged through this endpoint include recipes and connections. You can assign one or more tags to these assets or remove existing tags.

bash
POST https://YOUR_DATA_CENTER/api/v2/managed_users/:managed_user_id/tags_assignments

URL parameters

NameTypeDescription
managed_user_idstring
required
Embedded customer ID/external ID. The External ID must be URL encoded and prefixed with an E (for example, EA2300).

Payload

NameTypeDescription
add_tagsarray of strings
optional
An array of tag handles to be added. Each handle represents a tag to be applied to the specified assets.
remove_tagsarray of strings
optional
An array of tag handles to be removed. Each handle represents a tag to be removed from the specified assets.
recipe_idsarray of integers
conditional
An array of recipe IDs to tag or untag. Required if connection_ids is not provided.
connection_idsarray of integers
conditional
An array of connection IDs to tag or untag. Required if recipe_ids is not provided.

RETRIEVE TAG HANDLES WITH THE LIST TAGS ENDPOINT

Use the List tags (GET /api/v2/managed_users/:managed_user_id/tags) endpoint to retrieve the handles of the tags you plan to apply or remove.

Sample request

This request adds the Accounting tag with the handle tag-ANgdXgTF-bANz3H to both a connection and a recipe in Workato.

shell
curl  -X POST "https://YOUR_DATA_CENTER/api/v2/managed_users/:managed_user_id/tags_assignments" \
      -H "Authorization: Bearer <api_token>" \
      -H "Content-Type: application/json" \
      -d '{
            "add_tags": [":tag_handle"],
            "recipe_ids": [:recipe_id],
            "connection_ids": [:connection_id]
          }'

Response

If the request returns a 200 OK status, the tag has been successfully added to or removed from the asset. No content is returned in the response body.

Last updated: