POST https://api.ap1.datadoghq.com/api/v2/catalog/entity/preview https://api.ap2.datadoghq.com/api/v2/catalog/entity/preview https://api.datadoghq.eu/api/v2/catalog/entity/preview https://api.ddog-gov.com/api/v2/catalog/entity/preview https://api.us2.ddog-gov.com/api/v2/catalog/entity/preview https://api.datadoghq.com/api/v2/catalog/entity/preview https://api.us3.datadoghq.com/api/v2/catalog/entity/preview https://api.us5.datadoghq.com/api/v2/catalog/entity/preview
Overview
OAuth apps require the apm_service_catalog_read authorization scope to access this endpoint.
Response Accepted
Response object containing an array of entity data items.
Expand All
Array of entity response data items.
Entity response attributes containing core entity metadata fields.
The API version of the entity schema.
A short description of the entity.
The user-friendly display name of the entity.
The kind of the entity (e.g. service, datastore, queue).
The unique name of the entity within its kind and namespace.
The namespace the entity belongs to.
The owner of the entity, usually a team.
Additional custom properties for the entity.
A set of custom tags assigned to the entity.
Entity unique identifier.
Entity relationships including incidents, oncalls, schemas, and related entities.
Incidents relationship containing a list of incident resources associated with this entity.
List of incident relationship data items.
Incident resource unique identifier.
Incident resource type.
Allowed enum values: incident
default: incident
Oncalls relationship containing a list of oncall resources associated with this entity.
List of oncall relationship data items.
Oncall resource unique identifier.
Oncall resource type.
Allowed enum values: oncall
default: oncall
Raw schema relationship linking an entity to its raw schema resource.
Raw schema relationship data containing the raw schema resource identifier and type.
Raw schema unique identifier.
Raw schema resource type.
Allowed enum values: rawSchema
default: rawSchema
Related entities relationship containing a list of entity references related to this entity.
List of related entity relationship data items.
Related entity unique identifier.
Related entity resource type.
Allowed enum values: relatedEntity
default: relatedEntity
Schema relationship linking an entity to its associated schema resource.
Schema relationship data containing the schema resource identifier and type.
Entity schema unique identifier.
Schema resource type.
Allowed enum values: schema
default: schema
Entity resource type.
Allowed enum values: entity
default: entity
{
"data" : [
{
"attributes" : {
"apiVersion" : "string" ,
"description" : "string" ,
"displayName" : "string" ,
"kind" : "string" ,
"name" : "string" ,
"namespace" : "string" ,
"owner" : "string" ,
"properties" : {},
"tags" : []
},
"id" : "string" ,
"relationships" : {
"incidents" : {
"data" : [
{
"id" : "" ,
"type" : "incident"
}
]
},
"oncalls" : {
"data" : [
{
"id" : "" ,
"type" : "oncall"
}
]
},
"rawSchema" : {
"data" : {
"id" : "" ,
"type" : "rawSchema"
}
},
"relatedEntities" : {
"data" : [
{
"id" : "" ,
"type" : "relatedEntity"
}
]
},
"schema" : {
"data" : {
"id" : "" ,
"type" : "schema"
}
}
},
"type" : "entity"
}
]
} Too many requests
{
"errors" : [
"Bad Request"
]
} Code Example Copy
# Curl command curl -X POST "https://api.ap1.datadoghq.com "https://api.ap2.datadoghq.com "https://api.datadoghq.eu "https://api.ddog-gov.com "https://api.us2.ddog-gov.com "https://api.datadoghq.com "https://api.us3.datadoghq.com "https://api.us5.datadoghq.com /api/v2/catalog/entity/preview " \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY} " \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY} "
"""
Preview catalog entities returns "Accepted" response
"""
from datadog_api_client import ApiClient , Configuration
from datadog_api_client.v2.api.software_catalog_api import SoftwareCatalogApi
configuration = Configuration ()
with ApiClient ( configuration ) as api_client :
api_instance = SoftwareCatalogApi ( api_client )
response = api_instance . preview_catalog_entities ()
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 us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" python3 "example.py"
# Preview catalog entities returns "Accepted" response
require "datadog_api_client"
api_instance = DatadogAPIClient :: V2 :: SoftwareCatalogAPI . new
p api_instance . preview_catalog_entities ()
Instructions First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" rb "example.rb"
// Preview catalog entities returns "Accepted" 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 ())
configuration := datadog . NewConfiguration ()
apiClient := datadog . NewAPIClient ( configuration )
api := datadogV2 . NewSoftwareCatalogApi ( apiClient )
resp , r , err := api . PreviewCatalogEntities ( ctx )
if err != nil {
fmt . Fprintf ( os . Stderr , "Error when calling `SoftwareCatalogApi.PreviewCatalogEntities`: %v\n" , err )
fmt . Fprintf ( os . Stderr , "Full HTTP response: %v\n" , r )
}
responseContent , _ := json . MarshalIndent ( resp , "" , " " )
fmt . Fprintf ( os . Stdout , "Response from `SoftwareCatalogApi.PreviewCatalogEntities`:\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 us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" go run "main.go"
// Preview catalog entities returns "Accepted" 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.EntityResponseArray ;
public class Example {
public static void main ( String [] args ) {
ApiClient defaultClient = ApiClient . getDefaultApiClient ();
SoftwareCatalogApi apiInstance = new SoftwareCatalogApi ( defaultClient );
try {
EntityResponseArray result = apiInstance . previewCatalogEntities ();
System . out . println ( result );
} catch ( ApiException e ) {
System . err . println ( "Exception when calling SoftwareCatalogApi#previewCatalogEntities" );
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 us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" java "Example.java"
// Preview catalog entities returns "Accepted" response
use datadog_api_client ::datadog ;
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 . preview_catalog_entities (). 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 us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" cargo run
/**
* Preview catalog entities returns "Accepted" response
*/
import { client , v2 } from "@datadog/datadog-api-client" ;
const configuration = client . createConfiguration ();
const apiInstance = new v2 . SoftwareCatalogApi ( configuration );
apiInstance
. previewCatalogEntities ()
. then (( data : v2.EntityResponseArray ) => {
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 us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" tsc "example.ts"