엔터티 목록 받기
https://api.datadoghq.com/api/v2/catalog/entityhttps://api.us3.datadoghq.com/api/v2/catalog/entityhttps://api.us5.datadoghq.com/api/v2/catalog/entityhttps://api.datadoghq.eu/api/v2/catalog/entityhttps://api.ap1.datadoghq.com/api/v2/catalog/entityhttps://api.ap2.datadoghq.com/api/v2/catalog/entityhttps://api.uk1.datadoghq.com/api/v2/catalog/entityhttps://api.ddog-gov.com/api/v2/catalog/entityhttps://api.us2.ddog-gov.com/api/v2/catalog/entity개요
Software Catalog에서 엔터티 목록을 가져옵니다.
OAuth apps require the apm_service_catalog_read authorization scope to access this endpoint.
인수
쿼리 문자열
page[offset]Specific offset to use as the beginning of the returned page.
0page[limit]Maximum number of entities in the response.
100filter[id]Filter entities by UUID.
filter[ref]Filter entities by reference
filter[name]Filter entities by name.
filter[kind]Filter entities by kind.
filter[owner]Filter entities by owner.
filter[relation][type]Filter entities by relation type.
RelationTypeOwns, RelationTypeOwnedBy, RelationTypeDependsOn, RelationTypeDependencyOf, RelationTypePartsOf, RelationTypeHasPart, RelationTypeOtherOwns, RelationTypeOtherOwnedBy, RelationTypeImplementedBy, RelationTypeImplementsfilter[exclude_snapshot]Filter entities by excluding snapshotted entities.
includeInclude relationship data.
schema, raw_schema, oncall, incident, relationincludeDiscoveredIf true, includes discovered services from APM and USM that do not have entity definitions.
false응답
OK
List entity response.
dataList of entity data.
attributesEntity attributes.
apiVersionThe API version.
descriptionThe description.
displayNameThe display name.
kindThe kind.
nameThe name.
namespaceThe namespace.
ownerThe owner.
tagsThe tags.
idEntity ID.
metaEntity metadata.
createdAtThe creation time.
ingestionSourceThe ingestion source.
modifiedAtThe modification time.
originThe origin.
relationshipsEntity relationships.
incidentsEntity to incidents relationship.
dataRelationships.
idAssociated data ID.
typeRelationship type.
oncallEntity to oncalls relationship.
dataRelationships.
idAssociated data ID.
typeRelationship type.
rawSchemaEntity to raw schema relationship.
dataRelationship entry.
idAssociated data ID.
typeRelationship type.
relatedEntitiesEntity to related entities relationship.
dataRelationships.
idAssociated data ID.
typeRelationship type.
schemaEntity to detail schema relationship.
dataRelationship entry.
idAssociated data ID.
typeRelationship type.
typeEntity.
includedList entity response included.
<type=schema>Included detail entity schema.
attributesIncluded schema.
schemaEntity schema v3.
<kind=service>Schema for service entities.
apiVersion [required]The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version.
v3, v2.2, v2.1, v2datadogDatadog product integrations for the service entity.
codeLocationsSchema for mapping source code locations to an entity.
pathsThe paths (glob) to the source code of the service.
repositoryURLThe repository path of the source code of the entity.
eventsEvents associations.
nameThe name of the query.
queryThe query to run.
logsLogs association.
nameThe name of the query.
queryThe query to run.
performanceDataPerformance stats association.
tagsA list of APM entity tags that associates the APM Stats data with the entity.
pipelinesCI Pipelines association.
fingerprintsA list of CI Fingerprints that associate CI Pipelines with the entity.
extensionsCustom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.
integrationsA base schema for defining third-party integrations.
opsgenieAn Opsgenie integration schema.
regionThe region for the Opsgenie integration.
serviceURL [required]The service URL for the Opsgenie integration.
pagerdutyA PagerDuty integration schema.
serviceURL [required]The service URL for the PagerDuty integration.
kind [required]The definition of Entity V3 Service Kind object.
servicemetadata [required]The definition of Entity V3 Metadata object.
additionalOwnersThe additional owners of the entity, usually a team.
name [required]Team name.
typeTeam type.
contactsA list of contacts for the entity.
contact [required]Contact value.
nameContact name.
type [required]Contact type.
descriptionShort description of the entity. The UI can leverage the description for display.
displayNameUser friendly name of the entity. The UI can leverage the display name for display.
idA read-only globally unique identifier for the entity generated by Datadog. User supplied values are ignored.
inheritFromThe entity reference from which to inherit metadata
linksA list of links for the entity.
name [required]Link name.
providerLink provider.
type [required]Link type.
otherurl [required]Link URL.
managedA read-only set of Datadog managed attributes generated by Datadog. User supplied values are ignored.
name [required]Unique name given to an entity under the kind/namespace.
namespaceNamespace is a part of unique identifier. It has a default value of 'default'.
ownerThe owner of the entity, usually a team.
tagsA set of custom tags.
specThe definition of Entity V3 Service Spec object.
componentOfA list of components the service is a part of
dependsOnA list of components the service depends on.
languagesThe service's programming language.
lifecycleThe lifecycle state of the component.
tierThe importance of the component.
typeThe type of service.
<kind=datastore>Schema for datastore entities.
apiVersion [required]The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version.
v3, v2.2, v2.1, v2datadogDatadog product integrations for the datastore entity.
eventsEvents associations.
nameThe name of the query.
queryThe query to run.
logsLogs association.
nameThe name of the query.
queryThe query to run.
performanceDataPerformance stats association.
tagsA list of APM entity tags that associates the APM Stats data with the entity.
extensionsCustom extensions. This is the free-formed field to send client side metadata. No Datadog features are affected by this field.
integrationsA base schema for defining third-party integrations.
opsgenieAn Opsgenie integration schema.
regionThe region for the Opsgenie integration.
serviceURL [required]The service URL for the Opsgenie integration.
pagerdutyA PagerDuty integration schema.
serviceURL [required]The service URL for the PagerDuty integration.
kind [required]The definition of Entity V3 Datastore Kind object.
datastoremetadata [required]The definition of Entity V3 Metadata object.
additionalOwnersThe additional owners of the entity, usually a team.
name [required]Team name.
typeTeam type.
contactsA list of contacts for the entity.
contact [required]Contact value.
nameContact name.
type [required]Contact type.
descriptionShort description of the entity. The UI can leverage the description for display.
displayNameUser friendly name of the entity. The UI can leverage the display name for display.
idA read-only globally unique identifier for the entity generated by Datadog. User supplied values are ignored.
inheritFromThe entity reference from which to inherit metadata
linksA list of links for the entity.
name [required]Link name.
providerLink provider.
type [required]Link type.
otherurl [required]Link URL.
managedA read-only set of Datadog managed attributes generated by Datadog. User supplied values are ignored.
name [required]Unique name given to an entity under the kind/namespace.
namespaceNamespace is a part of unique identifier. It has a default value of 'default'.
ownerThe owner of the entity, usually a team.
tagsA set of custom tags.
specThe definition of Entity V3 Datastore Spec object.
componentOfA list of components the datastore is a part of
lifecycleThe lifecycle state of the datastore.
tierThe importance of the datastore.
typeThe type of datastore.
<kind=queue>Schema for queue entities.
apiVersion [required]The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version.
v3, v2.2, v2.1, v2datadogDatadog product integrations for the datastore entity.
eventsEvents associations.
nameThe name of the query.
queryThe query to run.
logsLogs association.
nameThe name of the query.
queryThe query to run.
performanceDataPerformance stats association.
tagsA list of APM entity tags that associates the APM Stats data with the entity.
extensionsCustom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.
integrationsA base schema for defining third-party integrations.
opsgenieAn Opsgenie integration schema.
regionThe region for the Opsgenie integration.
serviceURL [required]The service URL for the Opsgenie integration.
pagerdutyA PagerDuty integration schema.
serviceURL [required]The service URL for the PagerDuty integration.
kind [required]The definition of Entity V3 Queue Kind object.
queuemetadata [required]The definition of Entity V3 Metadata object.
additionalOwnersThe additional owners of the entity, usually a team.
name [required]Team name.
typeTeam type.
contactsA list of contacts for the entity.
contact [required]Contact value.
nameContact name.
type [required]Contact type.
descriptionShort description of the entity. The UI can leverage the description for display.
displayNameUser friendly name of the entity. The UI can leverage the display name for display.
idA read-only globally unique identifier for the entity generated by Datadog. User supplied values are ignored.
inheritFromThe entity reference from which to inherit metadata
linksA list of links for the entity.
name [required]Link name.
providerLink provider.
type [required]Link type.
otherurl [required]Link URL.
managedA read-only set of Datadog managed attributes generated by Datadog. User supplied values are ignored.
name [required]Unique name given to an entity under the kind/namespace.
namespaceNamespace is a part of unique identifier. It has a default value of 'default'.
ownerThe owner of the entity, usually a team.
tagsA set of custom tags.
specThe definition of Entity V3 Queue Spec object.
componentOfA list of components the queue is a part of
lifecycleThe lifecycle state of the queue.
tierThe importance of the queue.
typeThe type of queue.
<kind=system>Schema for system entities.
apiVersion [required]The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version.
v3, v2.2, v2.1, v2datadogDatadog product integrations for the service entity.
eventsEvents associations.
nameThe name of the query.
queryThe query to run.
logsLogs association.
nameThe name of the query.
queryThe query to run.
performanceDataPerformance stats association.
tagsA list of APM entity tags that associates the APM Stats data with the entity.
pipelinesCI Pipelines association.
fingerprintsA list of CI Fingerprints that associate CI Pipelines with the entity.
extensionsCustom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.
integrationsA base schema for defining third-party integrations.
opsgenieAn Opsgenie integration schema.
regionThe region for the Opsgenie integration.
serviceURL [required]The service URL for the Opsgenie integration.
pagerdutyA PagerDuty integration schema.
serviceURL [required]The service URL for the PagerDuty integration.
kind [required]The definition of Entity V3 System Kind object.
systemmetadata [required]The definition of Entity V3 Metadata object.
additionalOwnersThe additional owners of the entity, usually a team.
name [required]Team name.
typeTeam type.
contactsA list of contacts for the entity.
contact [required]Contact value.
nameContact name.
type [required]Contact type.
descriptionShort description of the entity. The UI can leverage the description for display.
displayNameUser friendly name of the entity. The UI can leverage the display name for display.
idA read-only globally unique identifier for the entity generated by Datadog. User supplied values are ignored.
inheritFromThe entity reference from which to inherit metadata
linksA list of links for the entity.
name [required]Link name.
providerLink provider.
type [required]Link type.
otherurl [required]Link URL.
managedA read-only set of Datadog managed attributes generated by Datadog. User supplied values are ignored.
name [required]Unique name given to an entity under the kind/namespace.
namespaceNamespace is a part of unique identifier. It has a default value of 'default'.
ownerThe owner of the entity, usually a team.
tagsA set of custom tags.
specThe definition of Entity V3 System Spec object.
componentsA list of components belongs to the system.
lifecycleThe lifecycle state of the component.
tierAn entity reference to the owner of the component.
<kind=api>Schema for API entities.
apiVersion [required]The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version.
v3, v2.2, v2.1, v2datadogDatadog product integrations for the API entity.
codeLocationsSchema for mapping source code locations to an entity.
pathsThe paths (glob) to the source code of the service.
repositoryURLThe repository path of the source code of the entity.
eventsEvents associations.
nameThe name of the query.
queryThe query to run.
logsLogs association.
nameThe name of the query.
queryThe query to run.
performanceDataPerformance stats association.
tagsA list of APM entity tags that associates the APM Stats data with the entity.
pipelinesCI Pipelines association.
fingerprintsA list of CI Fingerprints that associate CI Pipelines with the entity.
extensionsCustom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.
integrationsA base schema for defining third-party integrations.
opsgenieAn Opsgenie integration schema.
regionThe region for the Opsgenie integration.
serviceURL [required]The service URL for the Opsgenie integration.
pagerdutyA PagerDuty integration schema.
serviceURL [required]The service URL for the PagerDuty integration.
kind [required]The definition of Entity V3 API Kind object.
apimetadata [required]The definition of Entity V3 Metadata object.
additionalOwnersThe additional owners of the entity, usually a team.
name [required]Team name.
typeTeam type.
contactsA list of contacts for the entity.
contact [required]Contact value.
nameContact name.
type [required]Contact type.
descriptionShort description of the entity. The UI can leverage the description for display.
displayNameUser friendly name of the entity. The UI can leverage the display name for display.
idA read-only globally unique identifier for the entity generated by Datadog. User supplied values are ignored.
inheritFromThe entity reference from which to inherit metadata
linksA list of links for the entity.
name [required]Link name.
providerLink provider.
type [required]Link type.
otherurl [required]Link URL.
managedA read-only set of Datadog managed attributes generated by Datadog. User supplied values are ignored.
name [required]Unique name given to an entity under the kind/namespace.
namespaceNamespace is a part of unique identifier. It has a default value of 'default'.
ownerThe owner of the entity, usually a team.
tagsA set of custom tags.
specThe definition of Entity V3 API Spec object.
implementedByServices which implemented the API.
interfaceThe API definition.
Object 1The definition of EntityV3APISpecInterfaceFileRef object.
fileRefThe reference to the API definition file.
Object 2The definition of EntityV3APISpecInterfaceDefinition object.
definitionThe API definition.
lifecycleThe lifecycle state of the component.
tierThe importance of the component.
typeThe type of API.
idEntity ID.
typeSchema type.
schema<type=rawSchema>Included raw schema.
attributesIncluded raw schema attributes.
rawSchemaSchema from user input in base64 encoding.
idRaw schema ID.
typeRaw schema type.
rawSchema<type=relatedEntity>Included related entity.
attributesRelated entity attributes.
kindEntity kind.
nameEntity name.
namespaceEntity namespace.
typeEntity relation type to the associated entity.
idEntity UUID.
metaIncluded related entity meta.
createdAtEntity creation time.
defined_byEntity relation defined by.
modifiedAtEntity modification time.
sourceEntity relation source.
typeRelated entity.
relatedEntity<type=oncall>Included oncall.
attributesIncluded related oncall attributes.
escalationsOncall escalations.
emailOncall email.
escalationLevelOncall level.
nameOncall name.
providerOncall provider.
idOncall ID.
typeOncall type.
oncall<type=incident>Included incident.
attributesIncident attributes.
createdAtIncident creation time.
htmlURLIncident URL.
providerIncident provider.
statusIncident status.
titleIncident title.
idIncident ID.
typeIncident description.
incidentlinksList entity response links.
nextNext link.
previousPrevious link.
selfCurrent link.
metaEntity metadata.
countTotal entities count.
includeCountTotal included data count.
{
"data": [
{
"attributes": {
"apiVersion": "string",
"description": "string",
"displayName": "string",
"kind": "string",
"name": "string",
"namespace": "string",
"owner": "string",
"tags": []
},
"id": "string",
"meta": {
"createdAt": "string",
"ingestionSource": "string",
"modifiedAt": "string",
"origin": "string"
},
"relationships": {
"incidents": {
"data": [
{
"id": "string",
"type": "string"
}
]
},
"oncall": {
"data": [
{
"id": "string",
"type": "string"
}
]
},
"rawSchema": {
"data": {
"id": "string",
"type": "string"
}
},
"relatedEntities": {
"data": [
{
"id": "string",
"type": "string"
}
]
},
"schema": {
"data": {
"id": "string",
"type": "string"
}
}
},
"type": "string"
}
],
"included": [
{
"attributes": {
"schema": {
"apiVersion": "v3",
"datadog": {
"codeLocations": [
{
"paths": [],
"repositoryURL": "string"
}
],
"events": [
{
"name": "string",
"query": "string"
}
],
"logs": [
{
"name": "string",
"query": "string"
}
],
"performanceData": {
"tags": []
},
"pipelines": {
"fingerprints": []
}
},
"extensions": {},
"integrations": {
"opsgenie": {
"region": "string",
"serviceURL": "https://www.opsgenie.com/service/shopping-cart"
},
"pagerduty": {
"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"
}
},
"kind": "service",
"metadata": {
"additionalOwners": [
{
"name": "",
"type": "string"
}
],
"contacts": [
{
"contact": "https://slack/",
"name": "string",
"type": "slack"
}
],
"description": "string",
"displayName": "string",
"id": "4b163705-23c0-4573-b2fb-f6cea2163fcb",
"inheritFrom": "application:default/myapp",
"links": [
{
"name": "mylink",
"provider": "string",
"type": "link",
"url": "https://mylink"
}
],
"managed": {},
"name": "myService",
"namespace": "default",
"owner": "string",
"tags": [
"this:tag",
"that:tag"
]
},
"spec": {
"componentOf": [],
"dependsOn": [],
"languages": [],
"lifecycle": "string",
"tier": "string",
"type": "string"
}
}
},
"id": "string",
"type": "string"
}
],
"links": {
"next": "string",
"previous": "string",
"self": "string"
},
"meta": {
"count": "integer",
"includeCount": "integer"
}
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}코드 예시
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/catalog/entity" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"// Get a list of entities returns "OK" response
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewSoftwareCatalogApi(apiClient)
resp, r, err := api.ListCatalogEntity(ctx, *datadogV2.NewListCatalogEntityOptionalParameters())
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SoftwareCatalogApi.ListCatalogEntity`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `SoftwareCatalogApi.ListCatalogEntity`:\n%s\n", responseContent)
}
Instructions
First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// Get a list of entities returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SoftwareCatalogApi;
import com.datadog.api.client.v2.model.ListEntityCatalogResponse;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
SoftwareCatalogApi apiInstance = new SoftwareCatalogApi(defaultClient);
try {
ListEntityCatalogResponse result = apiInstance.listCatalogEntity();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SoftwareCatalogApi#listCatalogEntity");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Instructions
First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
Get a list of entities returns "OK" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.software_catalog_api import SoftwareCatalogApi
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
api_instance = SoftwareCatalogApi(api_client)
response = api_instance.list_catalog_entity()
print(response)
Instructions
First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"# Get a list of entities returns "OK" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::SoftwareCatalogAPI.new
p api_instance.list_catalog_entity()
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"// Get a list of entities returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_software_catalog::ListCatalogEntityOptionalParams;
use datadog_api_client::datadogV2::api_software_catalog::SoftwareCatalogAPI;
#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = SoftwareCatalogAPI::with_config(configuration);
let resp = api
.list_catalog_entity(ListCatalogEntityOptionalParams::default())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Instructions
First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us3.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run/**
* Get a list of entities returns "OK" response
*/
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
const apiInstance = new v2.SoftwareCatalogApi(configuration);
apiInstance
.listCatalogEntity()
.then((data: v2.ListEntityCatalogResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Instructions
First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"