Skip to main content

entity_tags

Creates, updates, deletes, gets or lists an entity_tags resource.

Overview

Nameentity_tags
TypeResource
Idpagerduty.tags.entity_tags

Fields

The following fields are returned by SELECT queries:

An array of tags.

NameDatatypeDescription
idstring
html_urlstring (url)a URL at which the entity is uniquely displayed in the Web app
labelstringThe label of the tag.
selfstring (url)the API show URL at which the object is accessible
summarystringA 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.
typestringA 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:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectentity_type, idlimit, offset, totalGet 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_tagsexecentity_type, idAssign 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.

NameDatatypeDescription
entity_typestringType of entity related with the tag
idstringThe ID of the resource.
limitintegerThe number of results per page.
offsetintegerOffset to start pagination search results.
totalbooleanBy 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

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

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 }}"
}'
;