{"type":"api","title":"Assign tag to multiple objects","meta":{"id":"/apps/pubhub/media/000-v7-apis/5b3454a4300b838cc17f7b2cdc0690fdd15058d5/81883e57-5d5f-3830-b256-d77607d487be","info":{"description":"The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`.\n\nThis feature provides:\n\n* Support for automation.\n* Powerful and flexible reports/dashboards.\n* Support for third-party integrations.\n\nThings to note with the ThousandEyes Tags API:\n\n* Tags are backwards-compatible with existing labels.\n* Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field.\n* Tags are defined in a single table so that they can be represented using a single model - `Tag`.\n","title":"Tags API","version":"7.0.34"},"security":[{"BearerAuth":[]}],"tags":[{"description":"Tag CRUD Operations","name":"Tags"},{"description":"Assign tags to other objects","name":"Tag Assignment"}],"openapi":"3.0.1","servers":[{"description":"ThousandEyes API production URL","url":"https://api.thousandeyes.com/v7"}],"securitySchemes":{"BearerAuth":{"description":"Bearer authentication token","scheme":"bearer","type":"http"}}},"spec":{"description":"Assigns a tag to one or more objects. This operation has cumulative behavior: The tag is assigned to the specified objects, and the previous assignments persist. No unassignment takes place.","operationId":"assignTag","parameters":[{"description":"A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.","in":"query","name":"aid","required":false,"schema":{"example":"1234","type":"string"}},{"description":"Tag ID","example":"c6b78e57-81a2-4c5f-a11a-d96c3c664d55","explode":false,"in":"path","name":"id","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"assignments":{"items":{"properties":{"id":{"description":"Object Id","example":"123","type":"string"},"type":{"enum":["test","v-agent","endpoint-test","dashboard"],"type":"string","$$ref":"#/components/schemas/AssignmentType"}},"type":"object","$$ref":"#/components/schemas/Assignment"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/TagAssignment"}}},"required":true,"$$ref":"#/components/requestBodies/assignRequest"},"responses":{"207":{"content":{"application/json":{"schema":{"properties":{"tagId":{"description":"The ID of the tag to assign","example":"c6b78e57-81a2-4c5f-a11a-d96c3c664d55","format":"uuid","type":"string"},"assignments":{"items":{"properties":{"id":{"description":"Object Id","example":"123","type":"string"},"type":{"enum":["test","v-agent","endpoint-test","dashboard"],"type":"string","$$ref":"#/components/schemas/AssignmentType"}},"type":"object","$$ref":"#/components/schemas/Assignment"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/BulkTagAssignment"}}},"description":"Assignment created"},"401":{"content":{"application/problem+json":{"schema":{"properties":{"error":{"example":"invalid_token","type":"string"},"error_description":{"example":"Invalid access token","type":"string"}},"type":"object","$$ref":"#/components/schemas/UnauthorizedError"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions to query endpoint"},"404":{"content":{"application/problem+json":{"example":{"type":"about:blank","title":"URI Resource Not Found","status":404,"detail":"Details explaining if the 404 error is related to an invalid URI or a wrong ID","instance":"/v7"},"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Exhausted rate limit for the organization"},"500":{"content":{"application/json":{"schema":{"properties":{"timestamp":{"example":1679677853573,"format":"int64","type":"integer"},"status":{"example":500,"type":"integer"},"errors":{"example":"Internal Server Error","type":"string"},"path":{"example":"https://api.thousandeyes.com/v7/request/path","format":"url","type":"string"}},"type":"object","$$ref":"#/components/schemas/ApiError"}}},"description":"Internal Server Error"}},"summary":"Assign tag to multiple objects","tags":["Tag Assignment"],"__originalOperationId":"assignTag","security":[{"BearerAuth":[]}],"method":"post","path":"/tags/{id}/assign"}}