{"type":"api","title":"List tags","meta":{"id":"/apps/pubhub/media/000-v7-apis/5f9377954b8d60b90885229291d36b0982d79a4e/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.27"},"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":"This operation returns a list of tags in the specified account group (`aid`).","operationId":"getTags","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":"Optional, to retrieve associated assignments","explode":true,"in":"query","name":"expand","required":false,"schema":{"example":["assignments"],"items":{"enum":["assignments"],"type":"string","$$ref":"#/components/schemas/ExpandTagsOptions"},"type":"array"},"style":"form"}],"responses":{"200":{"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"},"_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/Tags"}}},"description":"OK"},"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":"List tags","tags":["Tags"],"__originalOperationId":"getTags","security":[{"BearerAuth":[]}],"method":"get","path":"/tags"}}