The response returned when listing facets for unified hosts.
Expand All
Field
Type
Description
data [required]
[object]
The list of available facets for unified hosts.
attributes [required]
object
Attributes of an agentless host facet.
bounded [required]
boolean
Whether the facet has a bounded set of allowed values. true indicates a fixed value set and false indicates free-form values.
bundled [required]
boolean
Whether the facet is bundled as part of the default facet set. true indicates bundled and false indicates custom.
bundledAndUsed [required]
boolean
Whether the facet is both bundled and actively used. true indicates in use; false indicates unused.
defaultValues [required]
[string]
The list of default filter values for the facet.
description [required]
string
A human-readable description of what the facet represents.
editable [required]
boolean
Whether the facet can be edited by users. true indicates editable; false indicates read-only.
facetType [required]
string
The UI display type for the facet, such as list.
groups [required]
[string]
The list of UI groups that this facet belongs to.
name [required]
string
The display name of the facet.
path [required]
string
The field path used when filtering by this facet.
source [required]
string
The data source that provides the facet values.
type [required]
string
The data type of the facet values.
values [required]
[string]
The list of allowed filter values for bounded facets. Empty for unbounded facets.
id [required]
string
The identifier of the facet, corresponding to the field path.
type [required]
enum
The JSON:API type for unified host facet resources. The value should always be unified_host_facet.
Allowed enum values: unified_host_facet
default: unified_host_facet
{"data":[{"attributes":{"bounded":true,"bundled":true,"bundledAndUsed":true,"defaultValues":[[]],"description":"The cloud provider of the resource","editable":false,"facetType":"list","groups":["agentless"],"name":"Cloud Provider","path":"cloud_provider","source":"core","type":"string","values":["aws","gcp"]},"id":"cloud_provider","type":"unified_host_facet"}]}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List unified host facets returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.listCSMUnifiedHostFacets"]=true;constapiInstance=newv2.CSMSettingsApi(configuration);apiInstance.listCSMUnifiedHostFacets().then((data: v2.CsmUnifiedHostFacetsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));