{"type":"api","title":"Create multiple tags","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":"Creates multiple tags. Note the response includes a `statuses` array. This array provides status information for each tag object, indexed 1:1 with the `tags` array. ","operationId":"createTags","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"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"tags":{"items":{"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"},"readOnly":true,"type":"array"},"accessType":{"description":"The access level of the tag. The access level impacts the visibility of the label in UI and the permissions to modify the label.","enum":["all","partner","system"],"example":"all","type":"string","$$ref":"#/components/schemas/AccessType"},"aid":{"description":"The account group ID","example":1234,"readOnly":true,"type":"integer"},"color":{"description":"Tag color","example":"#FF0000","type":"string"},"createDate":{"description":"Tag creation date","example":"2022-03-01T23:31:11Z","format":"yyyy-MM-ddTHH:mm[:ss]Z","readOnly":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"description":{"description":"The tag's description.","example":"To tag assets in San Francisco","nullable":true,"type":"string"},"id":{"description":"The tag ID","example":"5aeab5d5-0d34-4d44-a7ac-fb440185295c","format":"uuid","readOnly":true,"type":"string"},"key":{"description":"The tags's key","example":"branch","type":"string"},"legacyId":{"nullable":true,"readOnly":true,"type":"number"},"objectType":{"description":"The object type associated with the tag","enum":["test","dashboard","endpoint-test","v-agent"],"example":"test","type":"string","$$ref":"#/components/schemas/ObjectType"},"value":{"description":"The tag's value","example":"sfo","type":"string"},"_links":{"description":"A links object containing the self link.","properties":{"self":{"description":"A hyperlink from the containing resource to a URI.","properties":{"href":{"description":"Its value is either a URI [RFC3986] or a URI template [RFC6570].","example":"https://api.thousandeyes.com/v7/link/to/resource/id","type":"string"},"templated":{"description":"Should be true when the link object's \"href\" property is a URI template.","type":"boolean"},"type":{"description":"Used as a hint to indicate the media type expected when dereferencing the target resource.","type":"string"},"deprecation":{"description":"Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.","type":"string"},"name":{"description":"Its value may be used as a secondary key for selecting link objects that share the same relation type.","type":"string"},"profile":{"description":"A URI that hints about the profile of the target resource.","type":"string"},"title":{"description":"Intended for labelling the link with a human-readable identifier","type":"string"},"hreflang":{"description":"Indicates the language of the target resource","type":"string"}},"required":["href"],"type":"object","$$ref":"#/components/schemas/Link"}},"readOnly":true,"type":"object","$$ref":"#/components/schemas/SelfLinks"}},"type":"object","$$ref":"#/components/schemas/Tag"},"type":"array"},"errors":{"items":{"properties":{"tag":{"additionalProperties":{"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"},"readOnly":true,"type":"array"},"accessType":{"description":"The access level of the tag. The access level impacts the visibility of the label in UI and the permissions to modify the label.","enum":["all","partner","system"],"example":"all","type":"string","$$ref":"#/components/schemas/AccessType"},"aid":{"description":"The account group ID","example":1234,"readOnly":true,"type":"integer"},"color":{"description":"Tag color","example":"#FF0000","type":"string"},"createDate":{"description":"Tag creation date","example":"2022-03-01T23:31:11Z","format":"yyyy-MM-ddTHH:mm[:ss]Z","readOnly":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"description":{"description":"The tag's description.","example":"To tag assets in San Francisco","nullable":true,"type":"string"},"id":{"description":"The tag ID","example":"5aeab5d5-0d34-4d44-a7ac-fb440185295c","format":"uuid","readOnly":true,"type":"string"},"key":{"description":"The tags's key","example":"branch","type":"string"},"legacyId":{"nullable":true,"readOnly":true,"type":"number"},"objectType":{"description":"The object type associated with the tag","enum":["test","dashboard","endpoint-test","v-agent"],"example":"test","type":"string","$$ref":"#/components/schemas/ObjectType"},"value":{"description":"The tag's value","example":"sfo","type":"string"}},"type":"object","$$ref":"#/components/schemas/TagInfo"},"type":"object"},"responseCode":{"description":"HTTP response code","example":200,"type":"integer"},"message":{"description":"Status / error message","example":"Object successfully created","type":"string"}},"type":"object","$$ref":"#/components/schemas/TagBulkCreateError"},"readOnly":true,"type":"array"}},"type":"object","$$ref":"#/components/schemas/BulkTagResponse"}}},"description":"Tag resource"},"responses":{"207":{"content":{"application/json":{"schema":{"properties":{"tags":{"items":{"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"},"readOnly":true,"type":"array"},"accessType":{"description":"The access level of the tag. The access level impacts the visibility of the label in UI and the permissions to modify the label.","enum":["all","partner","system"],"example":"all","type":"string","$$ref":"#/components/schemas/AccessType"},"aid":{"description":"The account group ID","example":1234,"readOnly":true,"type":"integer"},"color":{"description":"Tag color","example":"#FF0000","type":"string"},"createDate":{"description":"Tag creation date","example":"2022-03-01T23:31:11Z","format":"yyyy-MM-ddTHH:mm[:ss]Z","readOnly":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"description":{"description":"The tag's description.","example":"To tag assets in San Francisco","nullable":true,"type":"string"},"id":{"description":"The tag ID","example":"5aeab5d5-0d34-4d44-a7ac-fb440185295c","format":"uuid","readOnly":true,"type":"string"},"key":{"description":"The tags's key","example":"branch","type":"string"},"legacyId":{"nullable":true,"readOnly":true,"type":"number"},"objectType":{"description":"The object type associated with the tag","enum":["test","dashboard","endpoint-test","v-agent"],"example":"test","type":"string","$$ref":"#/components/schemas/ObjectType"},"value":{"description":"The tag's value","example":"sfo","type":"string"},"_links":{"description":"A links object containing the self link.","properties":{"self":{"description":"A hyperlink from the containing resource to a URI.","properties":{"href":{"description":"Its value is either a URI [RFC3986] or a URI template [RFC6570].","example":"https://api.thousandeyes.com/v7/link/to/resource/id","type":"string"},"templated":{"description":"Should be true when the link object's \"href\" property is a URI template.","type":"boolean"},"type":{"description":"Used as a hint to indicate the media type expected when dereferencing the target resource.","type":"string"},"deprecation":{"description":"Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.","type":"string"},"name":{"description":"Its value may be used as a secondary key for selecting link objects that share the same relation type.","type":"string"},"profile":{"description":"A URI that hints about the profile of the target resource.","type":"string"},"title":{"description":"Intended for labelling the link with a human-readable identifier","type":"string"},"hreflang":{"description":"Indicates the language of the target resource","type":"string"}},"required":["href"],"type":"object","$$ref":"#/components/schemas/Link"}},"readOnly":true,"type":"object","$$ref":"#/components/schemas/SelfLinks"}},"type":"object","$$ref":"#/components/schemas/Tag"},"type":"array"},"errors":{"items":{"properties":{"tag":{"additionalProperties":{"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"},"readOnly":true,"type":"array"},"accessType":{"description":"The access level of the tag. The access level impacts the visibility of the label in UI and the permissions to modify the label.","enum":["all","partner","system"],"example":"all","type":"string","$$ref":"#/components/schemas/AccessType"},"aid":{"description":"The account group ID","example":1234,"readOnly":true,"type":"integer"},"color":{"description":"Tag color","example":"#FF0000","type":"string"},"createDate":{"description":"Tag creation date","example":"2022-03-01T23:31:11Z","format":"yyyy-MM-ddTHH:mm[:ss]Z","readOnly":true,"type":"string"},"icon":{"nullable":true,"type":"string"},"description":{"description":"The tag's description.","example":"To tag assets in San Francisco","nullable":true,"type":"string"},"id":{"description":"The tag ID","example":"5aeab5d5-0d34-4d44-a7ac-fb440185295c","format":"uuid","readOnly":true,"type":"string"},"key":{"description":"The tags's key","example":"branch","type":"string"},"legacyId":{"nullable":true,"readOnly":true,"type":"number"},"objectType":{"description":"The object type associated with the tag","enum":["test","dashboard","endpoint-test","v-agent"],"example":"test","type":"string","$$ref":"#/components/schemas/ObjectType"},"value":{"description":"The tag's value","example":"sfo","type":"string"}},"type":"object","$$ref":"#/components/schemas/TagInfo"},"type":"object"},"responseCode":{"description":"HTTP response code","example":200,"type":"integer"},"message":{"description":"Status / error message","example":"Object successfully created","type":"string"}},"type":"object","$$ref":"#/components/schemas/TagBulkCreateError"},"readOnly":true,"type":"array"}},"type":"object","$$ref":"#/components/schemas/BulkTagResponse"}}},"description":"Item created"},"400":{"content":{"application/problem+json":{"example":{"type":"about:blank","title":"Request validation failed. There are invalid or missing fields","status":400,"detail":"Your request object contains invalid fields.","instance":"/v7","errors":[{"code":"AM-5432","field":"firstName","message":"firstName cannot have fancy characters"},{"code":"DASH-5622","field":"password","message":"Password cannot be blank"}]},"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"},"errors":{"description":"(Optional) When multiple errors occur, the details for each error are listed.","items":{"properties":{"code":{"description":"(Optional) A unique error type/code that can be referenced in the documentation for further details.","type":"string"},"field":{"description":"Identifies the field that triggered this particular error.","type":"string"},"message":{"description":"A short, human-readable summary of the error.","type":"string"}},"type":"object","$$ref":"#/components/schemas/ValidationErrorItem"},"nullable":true,"type":"array"}},"type":"object","$$ref":"#/components/schemas/ValidationError"}}},"description":"Bad Request"},"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"},"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":"Create multiple tags","tags":["Tags"],"__originalOperationId":"createTags","security":[{"BearerAuth":[]}],"method":"post","path":"/tags/bulk"}}