entity_tags
Creates, updates, deletes, gets or lists an entity_tags resource.
Overview
| Name | entity_tags |
| Type | Resource |
| Id | pagerduty.tags.entity_tags |
Fields
The following fields are returned by SELECT queries:
- list
An array of tags.
| Name | Datatype | Description |
|---|---|---|
id | string | |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
label | string | The label of the tag. |
self | string (url) | the API show URL at which the object is accessible |
summary | string | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier. |
type | string | A string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | entity_type, id | limit, offset, total | Get related tags for Users, Teams or Escalation Policies.<br /><br />A Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.<br /><br />For more information see the [API Concepts Document](https://developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#tags)<br /><br />Scoped OAuth requires: tags.read<br /> |
change_tags | exec | entity_type, id | Assign existing or new tags.<br /><br />A Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.<br /><br />For more information see the [API Concepts Document](https://developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#tags)<br /><br />Scoped OAuth requires: tags.write<br /> |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
entity_type | string | Type of entity related with the tag |
id | string | The ID of the resource. |
limit | integer | The number of results per page. |
offset | integer | Offset to start pagination search results. |
total | boolean | By default the total field in pagination responses is set to null to provide the fastest possible response times. Set total to true for this field to be populated. See our [Pagination Docs](https://developer.pagerduty.com/docs/rest-api-v2/pagination/) for more information. |
SELECT examples
- list
Get related tags for Users, Teams or Escalation Policies.<br /><br />A Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.<br /><br />For more information see the [API Concepts Document](https://developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#tags)<br /><br />Scoped OAuth requires: tags.read<br />
SELECT
id,
html_url,
label,
self,
summary,
type
FROM pagerduty.tags.entity_tags
WHERE entity_type = '{{ entity_type }}' -- required
AND id = '{{ id }}' -- required
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
;
Lifecycle Methods
- change_tags
Assign existing or new tags.<br /><br />A Tag is applied to Escalation Policies, Teams or Users and can be used to filter them.<br /><br />For more information see the [API Concepts Document](https://developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#tags)<br /><br />Scoped OAuth requires: tags.write<br />
EXEC pagerduty.tags.entity_tags.change_tags
@entity_type='{{ entity_type }}' --required,
@id='{{ id }}' --required
@@json=
'{
"add": "{{ add }}",
"remove": "{{ remove }}"
}'
;