Skip to main content

catalog_entities

Creates, updates, deletes, gets or lists a catalog_entities resource.

Overview

Namecatalog_entities
TypeResource
Iddatadog.catalog.catalog_entities

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringEntity ID.
attributesobjectEntity attributes.
metaobjectEntity metadata.
relationshipsobjectEntity relationships.
typestringEntity.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_catalog_entityselectpage[offset], page[limit], filter[id], filter[ref], filter[name], filter[kind], filter[owner], filter[relation][type], filter[exclude_snapshot], include, include_discoveredGet a list of entities from Software Catalog.
upsert_catalog_entityinsertapi_version, kind, metadataCreate or update entities in Software Catalog.
delete_catalog_entitydeleteentity_idDelete a single entity in Software Catalog.
preview_catalog_entitiesexec

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_idstringUUID or Entity Ref.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
filter[exclude_snapshot]stringFilter entities by excluding snapshotted entities.
filter[id]stringFilter entities by UUID.
filter[kind]stringFilter entities by kind.
filter[name]stringFilter entities by name.
filter[owner]stringFilter entities by owner.
filter[ref]stringFilter entities by reference (example: service:shopping-cart)
filter[relation][type]stringFilter entities by relation type.
includestringInclude relationship data.
include_discoveredbooleanIf true, includes discovered services from APM and USM that do not have entity definitions. (wire: includeDiscovered)
page[limit]integer (int64)Maximum number of entities in the response. (example: 100)
page[offset]integer (int64)Specific offset to use as the beginning of the returned page.

SELECT examples

Get a list of entities from Software Catalog.

SELECT
id,
attributes,
meta,
relationships,
type
FROM datadog.catalog.catalog_entities
WHERE page[offset] = '{{ page[offset] }}'
AND page[limit] = '{{ page[limit] }}'
AND filter[id] = '{{ filter[id] }}'
AND filter[ref] = '{{ filter[ref] }}'
AND filter[name] = '{{ filter[name] }}'
AND filter[kind] = '{{ filter[kind] }}'
AND filter[owner] = '{{ filter[owner] }}'
AND filter[relation][type] = '{{ filter[relation][type] }}'
AND filter[exclude_snapshot] = '{{ filter[exclude_snapshot] }}'
AND include = '{{ include }}'
AND include_discovered = '{{ include_discovered }}'
;

INSERT examples

Create or update entities in Software Catalog.

INSERT INTO datadog.catalog.catalog_entities (
api_version,
datadog,
extensions,
integrations,
kind,
metadata,
spec
)
SELECT
'{{ api_version }}' /* required */,
'{{ datadog }}',
'{{ extensions }}',
'{{ integrations }}',
'{{ kind }}' /* required */,
'{{ metadata }}' /* required */,
'{{ spec }}'
RETURNING
data,
included,
meta
;

DELETE examples

Delete a single entity in Software Catalog.

DELETE FROM datadog.catalog.catalog_entities
WHERE entity_id = '{{ entity_id }}' --required
;

Lifecycle Methods

EXEC variables use wire (API) names.

Accepted

EXEC datadog.catalog.catalog_entities.preview_catalog_entities
;