{"type":"api","title":"List tags","meta":{"id":"/apps/pubhub/media/000-v7-apis/b9d21f82a20c93e6931de4857ba37b1e86e087b4/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 dashboards) 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.83"},"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. Only static tags will return object 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":"\nThe access level of the tag. The access level determines the label's visibility in the UI and the permissions required to modify it. Accepted values are:\n\n\n* `all`: The tag is visible and editable by any user in the account group with the standard **View tags** or **Edit tags** permission. Default for all user-created tags.\n\n* `partner`: The tag is owned by a specific integration partner. Only that partner can read or modify it. It's hidden from all regular account users and excluded from their GET responses.\n\n* `system`: Reserved for ThousandEyes internal use only. This value may appear in GET responses on internally managed tags but cannot be set by users or integration partners. \n","enum":["all","partner","system"],"example":"all","type":"string","$$ref":"#/components/schemas/AccessType"},"aid":{"description":"The account group ID","example":1234,"format":"int64","readOnly":true,"type":"integer"},"builtIn":{"description":"Indicates whether it is a built-in tag or a user-created (custom) tag.","example":true,"readOnly":true,"type":"boolean"},"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"},"modifiedDate":{"description":"The date and time the tag was last modified.","example":"2022-03-01T23:31:11Z","format":"date-time","nullable":true,"readOnly":true,"type":"string"},"objectType":{"description":"The object type associated with the tag","enum":["test","dashboard","endpoint-test","v-agent","connected-devices-test","endpoint-agent"],"example":"test","type":"string","$$ref":"#/components/schemas/ObjectType"},"type":{"description":"The nature of the tag - whether the tag is dynamically assigned to objects based on a filter rule or statically assigned to specified objects. Currently only `endpoint-agent` object types support dynamic assignment; all other object types (for example, `test`, `agent`) support only static assignment.","enum":["static","dynamic"],"example":"static","type":"string","$$ref":"#/components/schemas/Type"},"value":{"description":"The tag's value","example":"sfo","type":"string"},"matchType":{"description":"Specifies how filters (tag keys) are applied (matched) to objects for tag assignment.\n* `and`: All filters must be matched.\n* `or`: Any of the filters should match.\n\nNote: filtering and matching currently only apply to `endpoint-agent` object types, as these functions are used for dynamic tag assignment.\n","enum":["and","or"],"example":"and","readOnly":false,"type":"string","$$ref":"#/components/schemas/TagMatchType"},"filters":{"description":"The combination of filters (filter keys) dynamically assigned to an `endpoint-agent` as determined by the matching logic (`and` or `or`). For example, if you filter on `bssid` and `ssid` with a matching logic of `and`, both filters are assigned as tags to the `endpoint-agent`; `or` means either filter can be assigned. **Note:** filters currently only apply to `endpoint-agent` object types.","items":{"properties":{"key":{"description":"Type of filter key - the data that will be used to filter.","enum":["agent-id","public-network","local-network","connection","gateway","platform","agent-type","vpn-vendor","vpn-gateway-address","vpn-client-network","vpn-client-address","ip-address-family","ssid","bssid","hostname","username","asn"],"example":"vpn-client-network","type":"string","$$ref":"#/components/schemas/TagFilterType"},"values":{"example":["10.1.1.0/24","192.168.1.0/24"],"items":{"description":"Value depends on the key, and may change in the future.\n\n* `agent-id`: The agent identifiers.\n* `gateway`: The gateway IP to match.\n* `ssid`: A wildcard match on the SSID. Supports `*` for any characters and `?` for any single character.\n* `username`: A wildcard match on the users that use the agent. Supports `*` for any characters and `?` for any single character.\n* `hostname`: A wildcard match on the host name. Supports `*` for any characters\nand `?` for any single character.\n* `bssid`: BSSID for the wifi. Must be lower case, with colons.\n* `platform`: Type of operating system. Supports `Mac`, `Windows`, and `Linux`.\n* `asn`: Integer Autonomous System (AS) number.\n* `public-network`: Network for agent's public IP in CIDR format, or IP for single IP, for example, `192.45.32.0/22`.\n* `local-network`: Network for agent's local IP in CIDR format, or IP for single IP, for example, `10.100.64.0/20`.\n* `connection`: Type of connection. Supports `Ethernet` or `Wireless`.\n* `agent-type`: Type of agent. Supports `endpoint`, `endpoint-pulse` or `endpoint-csc`.\n* `ip-address-family`: `ipv4` or `ipv6`.\n* `vpn-vendor`: Vendor of the VPN software. \n Examples include: \n\n * `cisco-anyconnect`\n * `palo-alto-globalprotect`\n * `ivanti-connect-secure`\n * `zscaler-internet-access`\n * `f5-big-ip`\n* `vpn-gateway-address`: Server-side VPN connection IP address.\n* `vpn-client-network`: Network for the VPN client IP in CIDR format, for example, `10.100.32.128/25`.\n* `vpn-client-address`: The VPN client IP, for example, `10.100.32.165`.\n","example":"10.1.1.0/24","type":"string"},"type":"array"},"mode":{"description":"Type of matching logic applied to the values:\n\n* `in`: The value on the agent must match one of the list of values provided.\n* `not-in`: The value on the agent must not match any of the list of values provided.\n","enum":["in","not-in"],"example":"in","type":"string","$$ref":"#/components/schemas/TagFilterMode"}},"type":"object","$$ref":"#/components/schemas/TagFilter"},"readOnly":false,"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/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"}}