Datadog App Builder provides a low-code solution to rapidly develop and integrate secure, customized applications into your monitoring stack that are built to accelerate remediation at scale. These API endpoints allow you to create, read, update, delete, and publish apps.
List all apps, with optional filters and sorting. This endpoint is paginated. Only basic app information such as the app ID, name, and description is returned by this endpoint.
This endpoint requires the apps_run permission.
Argumentos
Cadenas de consulta
Nombre
Tipo
Descripción
limit
integer
The number of apps to return per page.
page
integer
The page number to return.
filter[user_name]
string
Filter apps by the app creator. Usually the user’s email.
filter[user_uuid]
string
Filter apps by the app creator’s UUID.
filter[name]
string
Filter by app name.
filter[query]
string
Filter apps by the app name or the app creator.
filter[deployed]
boolean
Filter apps by whether they are published.
filter[tags]
string
Filter apps by tags.
filter[favorite]
boolean
Filter apps by whether you have added them to your favorites.
filter[self_service]
boolean
Filter apps by whether they are enabled for self-service.
A paginated list of apps matching the specified filters and sorting.
Expand All
Campo
Tipo
Descripción
data
[object]
An array of app definitions.
attributes [required]
object
Basic information about the app such as name, description, and tags.
description
string
A human-readable description for the app.
favorite
boolean
Whether the app is marked as a favorite by the current user.
name
string
The name of the app.
selfService
boolean
Whether the app is enabled for use in the Datadog self-service hub.
tags
[string]
A list of tags for the app, which can be used to filter apps.
id [required]
uuid
The ID of the app.
meta
object
Metadata of an app.
created_at
date-time
Timestamp of when the app was created.
deleted_at
date-time
Timestamp of when the app was deleted.
org_id
int64
The Datadog organization ID that owns the app.
updated_at
date-time
Timestamp of when the app was last updated.
updated_since_deployment
boolean
Whether the app was updated since it was last published. Published apps are pinned to a specific version and do not automatically update when the app is updated.
user_id
int64
The ID of the user who created the app.
user_name
string
The name (or email address) of the user who created the app.
user_uuid
uuid
The UUID of the user who created the app.
version
int64
The version number of the app. This starts at 1 and increments with each update.
relationships
object
The app's publication information.
deployment
object
Information pointing to the app's publication status.
data
object
Data object containing the deployment ID.
id
uuid
The deployment ID.
type
enum
The deployment type.
Allowed enum values: deployment
default: deployment
meta
object
Metadata object containing the publication creation information.
created_at
date-time
Timestamp of when the app was published.
user_id
int64
The ID of the user who published the app.
user_name
string
The name (or email address) of the user who published the app.
user_uuid
uuid
The UUID of the user who published the app.
type [required]
enum
The app definition type.
Allowed enum values: appDefinitions
default: appDefinitions
included
[object]
Data on the version of the app that was published.
attributes
object
The attributes object containing the version ID of the published app.
app_version_id
uuid
The version ID of the app that was published. For an unpublished app, this is always the nil UUID (00000000-0000-0000-0000-000000000000).
id
uuid
The deployment ID.
meta
object
Metadata object containing the publication creation information.
created_at
date-time
Timestamp of when the app was published.
user_id
int64
The ID of the user who published the app.
user_name
string
The name (or email address) of the user who published the app.
user_uuid
uuid
The UUID of the user who published the app.
type
enum
The deployment type.
Allowed enum values: deployment
default: deployment
meta
object
Pagination metadata.
page
object
Information on the total number of apps, to be used for pagination.
totalCount
int64
The total number of apps under the Datadog organization, disregarding any filters applied.
totalFilteredCount
int64
The total number of apps that match the specified filters.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* List Apps returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.listApps"]=true;constapiInstance=newv2.AppBuilderApi(configuration);apiInstance.listApps().then((data: v2.ListAppsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
App definition attributes such as name, description, and components.
components
[object]
The UI components that make up the app.
events
[object]
Events to listen for on the grid component.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id
string
The ID of the grid component. This property is deprecated; use name to identify individual components instead.
name [required]
string
A unique identifier for this grid component. This name is also visible in the app editor.
properties [required]
object
Properties of a grid component.
backgroundColor
string
The background color of the grid.
default: default
children
[object]
The child components of the grid.
events
[object]
Events to listen for on the UI component.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id
string
The ID of the UI component. This property is deprecated; use name to identify individual components instead.
name [required]
string
A unique identifier for this UI component. This name is also visible in the app editor.
properties [required]
object
Properties of a UI component. Different component types can have their own additional unique properties. See the components documentation for more detail on each component type and its properties.
children
[object]
The child components of the UI component.
isVisible
<oneOf>
Whether the UI component is visible. If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
type [required]
enum
The UI component type.
Allowed enum values: table,textInput,textArea,button,text,select,modal,schemaForm,checkbox,tabs,vegaChart,radioButtons,numberInput,fileInput,jsonInput,gridCell,dateRangePicker,search,container,calloutValue
isVisible
<oneOf>
Whether the grid component and its children are visible. If a string, it must be a valid JavaScript expression that evaluates to a boolean.
Option 1
string
Option 2
boolean
default: true
type [required]
enum
The grid component type.
Allowed enum values: grid
default: grid
description
string
A human-readable description for the app.
name
string
The name of the app.
queries
[ <oneOf>]
An array of queries, such as external actions and state variables, that the app uses.
Option 1
object
An action query. This query type is used to trigger an action, such as sending a HTTP request.
events
[object]
Events to listen for downstream of the action query.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id [required]
uuid
The ID of the action query.
name [required]
string
A unique identifier for this action query. This name is also used to access the query's result throughout the app.
properties [required]
object
The properties of the action query.
condition
<oneOf>
Whether to run this query. If specified, the query will only run if this condition evaluates to true in JavaScript and all other conditions are also met.
Option 1
boolean
Option 2
string
debounceInMs
<oneOf>
The minimum time in milliseconds that must pass before the query can be triggered again. This is useful for preventing accidental double-clicks from triggering the query multiple times.
Option 1
double
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a number.
mockedOutputs
<oneOf>
The mocked outputs of the action query. This is useful for testing the app without actually running the action.
Option 1
string
Option 2
object
The mocked outputs of the action query.
enabled [required]
<oneOf>
Whether to enable the mocked outputs for testing.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
outputs
string
The mocked outputs of the action query, serialized as JSON.
onlyTriggerManually
<oneOf>
Determines when this query is executed. If set to false, the query will run when the app loads and whenever any query arguments change. If set to true, the query will only run when manually triggered from elsewhere in the app.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
outputs
string
The post-query transformation function, which is a JavaScript function that changes the query's .outputs property after the query's execution.
pollingIntervalInMs
<oneOf>
If specified, the app will poll the query at the specified interval in milliseconds. The minimum polling interval is 15 seconds. The query will only poll when the app's browser tab is active.
Option 1
double
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a number.
requiresConfirmation
<oneOf>
Whether to prompt the user to confirm this query before it runs.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
showToastOnError
<oneOf>
Whether to display a toast to the user when the query returns an error.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
spec [required]
<oneOf>
The definition of the action query.
Option 1
string
Option 2
object
The action query spec object.
connectionGroup
object
The connection group to use for an action query.
id
uuid
The ID of the connection group.
tags
[string]
The tags of the connection group.
connectionId
string
The ID of the custom connection to use for this action query.
fqn [required]
string
The fully qualified name of the action type.
inputs
<oneOf>
The inputs to the action query. These are the values that are passed to the action when it is triggered.
Option 1
string
Option 2
object
The inputs to the action query. See the Actions Catalog for more detail on each action and its inputs.
type [required]
enum
The action query type.
Allowed enum values: action
default: action
Option 2
object
A data transformer, which is custom JavaScript code that executes and transforms data when its inputs change.
id [required]
uuid
The ID of the data transformer.
name [required]
string
A unique identifier for this data transformer. This name is also used to access the transformer's result throughout the app.
properties [required]
object
The properties of the data transformer.
outputs
string
A JavaScript function that returns the transformed data.
type [required]
enum
The data transform type.
Allowed enum values: dataTransform
default: dataTransform
Option 3
object
A variable, which can be set and read by other components in the app.
id [required]
uuid
The ID of the state variable.
name [required]
string
A unique identifier for this state variable. This name is also used to access the variable's value throughout the app.
properties [required]
object
The properties of the state variable.
defaultValue
The default value of the state variable.
type [required]
enum
The state variable type.
Allowed enum values: stateVariable
default: stateVariable
rootInstanceName
string
The name of the root component of the app. This must be a grid component that contains all other components.
tags
[string]
A list of tags for the app, which can be used to filter apps.
type [required]
enum
The app definition type.
Allowed enum values: appDefinitions
default: appDefinitions
{"data":{"type":"appDefinitions","attributes":{"rootInstanceName":"grid0","components":[{"name":"grid0","type":"grid","properties":{"children":[{"type":"gridCell","name":"gridCell0","properties":{"children":[{"name":"text0","type":"text","properties":{"content":"# Cat Facts","contentType":"markdown","textAlign":"left","verticalAlign":"top","isVisible":true},"events":[]}],"isVisible":"true","layout":{"default":{"x":0,"y":0,"width":4,"height":5}}},"events":[]},{"type":"gridCell","name":"gridCell2","properties":{"children":[{"name":"table0","type":"table","properties":{"data":"${fetchFacts?.outputs?.body?.data}","columns":[{"dataPath":"fact","header":"fact","isHidden":false,"id":"0ae2ae9e-0280-4389-83c6-1c5949f7e674"},{"dataPath":"length","header":"length","isHidden":true,"id":"c9048611-0196-4a00-9366-1ef9e3ec0408"},{"id":"8fa9284b-7a58-4f13-9959-57b7d8a7fe8f","dataPath":"Due Date","header":"Unused Old Column","disableSortBy":false,"formatter":{"type":"formatted_time","format":"LARGE_WITHOUT_TIME"},"isDeleted":true}],"summary":true,"pageSize":"${pageSize?.value}","paginationType":"server_side","isLoading":"${fetchFacts?.isLoading}","rowButtons":[],"isWrappable":false,"isScrollable":"vertical","isSubRowsEnabled":false,"globalFilter":false,"isVisible":true,"totalCount":"${fetchFacts?.outputs?.body?.total}"},"events":[]}],"isVisible":"true","layout":{"default":{"x":0,"y":5,"width":12,"height":96}}},"events":[]},{"type":"gridCell","name":"gridCell1","properties":{"children":[{"name":"text1","type":"text","properties":{"content":"## Random Fact\n\n${randomFact?.outputs?.fact}","contentType":"markdown","textAlign":"left","verticalAlign":"top","isVisible":true},"events":[]}],"isVisible":"true","layout":{"default":{"x":0,"y":101,"width":12,"height":16}}},"events":[]},{"type":"gridCell","name":"gridCell3","properties":{"children":[{"name":"button0","type":"button","properties":{"label":"Increase Page Size","level":"default","isPrimary":true,"isBorderless":false,"isLoading":false,"isDisabled":false,"isVisible":true,"iconLeft":"angleUp","iconRight":""},"events":[{"variableName":"pageSize","value":"${pageSize?.value + 1}","name":"click","type":"setStateVariableValue"}]}],"isVisible":"true","layout":{"default":{"x":10,"y":134,"width":2,"height":4}}},"events":[]},{"type":"gridCell","name":"gridCell4","properties":{"children":[{"name":"button1","type":"button","properties":{"label":"Decrease Page Size","level":"default","isPrimary":true,"isBorderless":false,"isLoading":false,"isDisabled":false,"isVisible":true,"iconLeft":"angleDown","iconRight":""},"events":[{"variableName":"pageSize","value":"${pageSize?.value - 1}","name":"click","type":"setStateVariableValue"}]}],"isVisible":"true","layout":{"default":{"x":10,"y":138,"width":2,"height":4}}},"events":[]}],"backgroundColor":"default"},"events":[]}],"queries":[{"id":"92ff0bb8-553b-4f31-87c7-ef5bd16d47d5","type":"action","name":"fetchFacts","events":[],"properties":{"spec":{"fqn":"com.datadoghq.http.request","connectionId":"5e63f4a8-4ce6-47de-ba11-f6617c1d54f3","inputs":{"verb":"GET","url":"https://catfact.ninja/facts","urlParams":[{"key":"limit","value":"${pageSize.value.toString()}"},{"key":"page","value":"${(table0.pageIndex + 1).toString()}"}]}}}},{"type":"stateVariable","name":"pageSize","properties":{"defaultValue":"${20}"},"id":"afd03c81-4075-4432-8618-ba09d52d2f2d"},{"type":"dataTransform","name":"randomFact","properties":{"outputs":"${(() => {const facts = fetchFacts.outputs.body.data\nreturn facts[Math.floor(Math.random()*facts.length)]\n})()}"},"id":"0fb22859-47dc-4137-9e41-7b67d04c525c"}],"name":"Example Cat Facts Viewer","description":"This is a slightly complicated example app that fetches and displays cat facts"}}}
// Create App returns "Created" response
packagemainimport("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")funcmain(){body:=datadogV2.CreateAppRequest{Data:&datadogV2.CreateAppRequestData{Attributes:&datadogV2.CreateAppRequestDataAttributes{Components:[]datadogV2.ComponentGrid{{Events:[]datadogV2.AppBuilderEvent{},Name:"grid0",Properties:datadogV2.ComponentGridProperties{Children:[]datadogV2.Component{{Events:[]datadogV2.AppBuilderEvent{},Name:"gridCell0",Properties:datadogV2.ComponentProperties{Children:[]datadogV2.Component{{Events:[]datadogV2.AppBuilderEvent{},Name:"calloutValue0",Properties:datadogV2.ComponentProperties{IsVisible:&datadogV2.ComponentPropertiesIsVisible{Bool:datadog.PtrBool(true)},},Type:datadogV2.COMPONENTTYPE_CALLOUTVALUE,},},IsVisible:&datadogV2.ComponentPropertiesIsVisible{String:datadog.PtrString("true")},},Type:datadogV2.COMPONENTTYPE_GRIDCELL,},},},Type:datadogV2.COMPONENTGRIDTYPE_GRID,},},Description:datadog.PtrString("This is a simple example app"),Queries:[]datadogV2.Query{},Name:datadog.PtrString("Example App"),RootInstanceName:datadog.PtrString("grid0"),},Type:datadogV2.APPDEFINITIONTYPE_APPDEFINITIONS,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.CreateApp",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAppBuilderApi(apiClient)resp,r,err:=api.CreateApp(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AppBuilderApi.CreateApp`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AppBuilderApi.CreateApp`:\n%s\n",responseContent)}
// Create App returns "Created" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AppBuilderApi;importcom.datadog.api.client.v2.model.AppDefinitionType;importcom.datadog.api.client.v2.model.Component;importcom.datadog.api.client.v2.model.ComponentGrid;importcom.datadog.api.client.v2.model.ComponentGridProperties;importcom.datadog.api.client.v2.model.ComponentGridType;importcom.datadog.api.client.v2.model.ComponentProperties;importcom.datadog.api.client.v2.model.ComponentPropertiesIsVisible;importcom.datadog.api.client.v2.model.ComponentType;importcom.datadog.api.client.v2.model.CreateAppRequest;importcom.datadog.api.client.v2.model.CreateAppRequestData;importcom.datadog.api.client.v2.model.CreateAppRequestDataAttributes;importcom.datadog.api.client.v2.model.CreateAppResponse;importjava.util.Collections;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.createApp",true);AppBuilderApiapiInstance=newAppBuilderApi(defaultClient);CreateAppRequestbody=newCreateAppRequest().data(newCreateAppRequestData().attributes(newCreateAppRequestDataAttributes().components(Collections.singletonList(newComponentGrid().name("grid0").properties(newComponentGridProperties().children(Collections.singletonList(newComponent().name("gridCell0").properties(newComponentProperties().children(Collections.singletonList(newComponent().name("calloutValue0").properties(newComponentProperties().isVisible(newComponentPropertiesIsVisible(true))).type(ComponentType.CALLOUTVALUE))).isVisible(newComponentPropertiesIsVisible("true"))).type(ComponentType.GRIDCELL)))).type(ComponentGridType.GRID))).description("This is a simple example app").name("Example App").rootInstanceName("grid0")).type(AppDefinitionType.APPDEFINITIONS));try{CreateAppResponseresult=apiInstance.createApp(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AppBuilderApi#createApp");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
# Create App returns "Created" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.create_app".to_sym]=trueendapi_instance=DatadogAPIClient::V2::AppBuilderAPI.newbody=DatadogAPIClient::V2::CreateAppRequest.new({data:DatadogAPIClient::V2::CreateAppRequestData.new({attributes:DatadogAPIClient::V2::CreateAppRequestDataAttributes.new({components:[DatadogAPIClient::V2::ComponentGrid.new({events:[],name:"grid0",properties:DatadogAPIClient::V2::ComponentGridProperties.new({children:[DatadogAPIClient::V2::Component.new({events:[],name:"gridCell0",properties:DatadogAPIClient::V2::ComponentProperties.new({children:[DatadogAPIClient::V2::Component.new({events:[],name:"calloutValue0",properties:DatadogAPIClient::V2::ComponentProperties.new({is_visible:true,}),type:DatadogAPIClient::V2::ComponentType::CALLOUTVALUE,}),],is_visible:"true",}),type:DatadogAPIClient::V2::ComponentType::GRIDCELL,}),],}),type:DatadogAPIClient::V2::ComponentGridType::GRID,}),],description:"This is a simple example app",queries:[],name:"Example App",root_instance_name:"grid0",}),type:DatadogAPIClient::V2::AppDefinitionType::APPDEFINITIONS,}),})papi_instance.create_app(body)
// Create App returns "Created" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;usedatadog_api_client::datadogV2::model::AppDefinitionType;usedatadog_api_client::datadogV2::model::Component;usedatadog_api_client::datadogV2::model::ComponentGrid;usedatadog_api_client::datadogV2::model::ComponentGridProperties;usedatadog_api_client::datadogV2::model::ComponentGridType;usedatadog_api_client::datadogV2::model::ComponentProperties;usedatadog_api_client::datadogV2::model::ComponentPropertiesIsVisible;usedatadog_api_client::datadogV2::model::ComponentType;usedatadog_api_client::datadogV2::model::CreateAppRequest;usedatadog_api_client::datadogV2::model::CreateAppRequestData;usedatadog_api_client::datadogV2::model::CreateAppRequestDataAttributes;#[tokio::main]asyncfnmain(){letbody=CreateAppRequest::new().data(CreateAppRequestData::new(AppDefinitionType::APPDEFINITIONS).attributes(CreateAppRequestDataAttributes::new().components(vec![ComponentGrid::new("grid0".to_string(),ComponentGridProperties::new().children(vec![Component::new("gridCell0".to_string(),ComponentProperties::new().children(vec![Component::new("calloutValue0".to_string(),ComponentProperties::new().is_visible(ComponentPropertiesIsVisible::Bool(true)),ComponentType::CALLOUTVALUE,).events(vec![])]).is_visible(ComponentPropertiesIsVisible::String("true".to_string())),ComponentType::GRIDCELL,).events(vec![])]),ComponentGridType::GRID,).events(vec![])]).description("This is a simple example app".to_string()).name("Example App".to_string()).queries(vec![]).root_instance_name("grid0".to_string()),),);letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.CreateApp",true);letapi=AppBuilderAPI::with_config(configuration);letresp=api.create_app(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Create App returns "Created" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.createApp"]=true;constapiInstance=newv2.AppBuilderApi(configuration);constparams: v2.AppBuilderApiCreateAppRequest={body:{data:{attributes:{components:[{events:[],name:"grid0",properties:{children:[{events:[],name:"gridCell0",properties:{children:[{events:[],name:"calloutValue0",properties:{isVisible: true,},type:"calloutValue",},],isVisible:"true",},type:"gridCell",},],},type:"grid",},],description:"This is a simple example app",queries:[],name:"Example App",rootInstanceName:"grid0",},type:"appDefinitions",},},};apiInstance.createApp(params).then((data: v2.CreateAppResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
// Delete Multiple Apps returns "OK" response
packagemainimport("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""github.com/google/uuid")funcmain(){// there is a valid "app" in the system
AppDataID:=uuid.MustParse(os.Getenv("APP_DATA_ID"))body:=datadogV2.DeleteAppsRequest{Data:[]datadogV2.DeleteAppsRequestDataItems{{Id:AppDataID,Type:datadogV2.APPDEFINITIONTYPE_APPDEFINITIONS,},},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.DeleteApps",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAppBuilderApi(apiClient)resp,r,err:=api.DeleteApps(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AppBuilderApi.DeleteApps`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AppBuilderApi.DeleteApps`:\n%s\n",responseContent)}
// Delete Multiple Apps returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AppBuilderApi;importcom.datadog.api.client.v2.model.AppDefinitionType;importcom.datadog.api.client.v2.model.DeleteAppsRequest;importcom.datadog.api.client.v2.model.DeleteAppsRequestDataItems;importcom.datadog.api.client.v2.model.DeleteAppsResponse;importjava.util.Collections;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.deleteApps",true);AppBuilderApiapiInstance=newAppBuilderApi(defaultClient);// there is a valid "app" in the systemUUIDAPP_DATA_ID=null;try{APP_DATA_ID=UUID.fromString(System.getenv("APP_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}DeleteAppsRequestbody=newDeleteAppsRequest().data(Collections.singletonList(newDeleteAppsRequestDataItems().id(APP_DATA_ID).type(AppDefinitionType.APPDEFINITIONS)));try{DeleteAppsResponseresult=apiInstance.deleteApps(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AppBuilderApi#deleteApps");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Delete Multiple Apps returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.app_builder_apiimportAppBuilderApifromdatadog_api_client.v2.model.app_definition_typeimportAppDefinitionTypefromdatadog_api_client.v2.model.delete_apps_requestimportDeleteAppsRequestfromdatadog_api_client.v2.model.delete_apps_request_data_itemsimportDeleteAppsRequestDataItems# there is a valid "app" in the systemAPP_DATA_ID=environ["APP_DATA_ID"]body=DeleteAppsRequest(data=[DeleteAppsRequestDataItems(id=APP_DATA_ID,type=AppDefinitionType.APPDEFINITIONS,),],)configuration=Configuration()configuration.unstable_operations["delete_apps"]=TruewithApiClient(configuration)asapi_client:api_instance=AppBuilderApi(api_client)response=api_instance.delete_apps(body=body)print(response)
# Delete Multiple Apps returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.delete_apps".to_sym]=trueendapi_instance=DatadogAPIClient::V2::AppBuilderAPI.new# there is a valid "app" in the systemAPP_DATA_ID=ENV["APP_DATA_ID"]body=DatadogAPIClient::V2::DeleteAppsRequest.new({data:[DatadogAPIClient::V2::DeleteAppsRequestDataItems.new({id:APP_DATA_ID,type:DatadogAPIClient::V2::AppDefinitionType::APPDEFINITIONS,}),],})papi_instance.delete_apps(body)
// Delete Multiple Apps returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;usedatadog_api_client::datadogV2::model::AppDefinitionType;usedatadog_api_client::datadogV2::model::DeleteAppsRequest;usedatadog_api_client::datadogV2::model::DeleteAppsRequestDataItems;#[tokio::main]asyncfnmain(){// there is a valid "app" in the system
letapp_data_id=uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");letbody=DeleteAppsRequest::new().data(vec![DeleteAppsRequestDataItems::new(app_data_id.clone(),AppDefinitionType::APPDEFINITIONS,)]);letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.DeleteApps",true);letapi=AppBuilderAPI::with_config(configuration);letresp=api.delete_apps(body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete Multiple Apps returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.deleteApps"]=true;constapiInstance=newv2.AppBuilderApi(configuration);// there is a valid "app" in the system
constAPP_DATA_ID=process.env.APP_DATA_IDasstring;constparams: v2.AppBuilderApiDeleteAppsRequest={body:{data:[{id: APP_DATA_ID,type:"appDefinitions",},],},};apiInstance.deleteApps(params).then((data: v2.DeleteAppsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Get the full definition of an app.
This endpoint requires
all
of the following permissions:
apps_run
connections_read
Argumentos
Parámetros de ruta
Nombre
Tipo
Descripción
app_id [required]
string
The ID of the app to retrieve.
Cadenas de consulta
Nombre
Tipo
Descripción
version
string
The version number of the app to retrieve. If not specified, the latest version is returned. Version numbers start at 1 and increment with each update. The special values latest and deployed can be used to retrieve the latest version or the published version, respectively.
The app definition attributes, such as name, description, and components.
components
[object]
The UI components that make up the app.
events
[object]
Events to listen for on the grid component.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id
string
The ID of the grid component. This property is deprecated; use name to identify individual components instead.
name [required]
string
A unique identifier for this grid component. This name is also visible in the app editor.
properties [required]
object
Properties of a grid component.
backgroundColor
string
The background color of the grid.
default: default
children
[object]
The child components of the grid.
events
[object]
Events to listen for on the UI component.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id
string
The ID of the UI component. This property is deprecated; use name to identify individual components instead.
name [required]
string
A unique identifier for this UI component. This name is also visible in the app editor.
properties [required]
object
Properties of a UI component. Different component types can have their own additional unique properties. See the components documentation for more detail on each component type and its properties.
children
[object]
The child components of the UI component.
isVisible
<oneOf>
Whether the UI component is visible. If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
type [required]
enum
The UI component type.
Allowed enum values: table,textInput,textArea,button,text,select,modal,schemaForm,checkbox,tabs,vegaChart,radioButtons,numberInput,fileInput,jsonInput,gridCell,dateRangePicker,search,container,calloutValue
isVisible
<oneOf>
Whether the grid component and its children are visible. If a string, it must be a valid JavaScript expression that evaluates to a boolean.
Option 1
string
Option 2
boolean
default: true
type [required]
enum
The grid component type.
Allowed enum values: grid
default: grid
description
string
A human-readable description for the app.
favorite
boolean
Whether the app is marked as a favorite by the current user.
name
string
The name of the app.
queries
[ <oneOf>]
An array of queries, such as external actions and state variables, that the app uses.
Option 1
object
An action query. This query type is used to trigger an action, such as sending a HTTP request.
events
[object]
Events to listen for downstream of the action query.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id [required]
uuid
The ID of the action query.
name [required]
string
A unique identifier for this action query. This name is also used to access the query's result throughout the app.
properties [required]
object
The properties of the action query.
condition
<oneOf>
Whether to run this query. If specified, the query will only run if this condition evaluates to true in JavaScript and all other conditions are also met.
Option 1
boolean
Option 2
string
debounceInMs
<oneOf>
The minimum time in milliseconds that must pass before the query can be triggered again. This is useful for preventing accidental double-clicks from triggering the query multiple times.
Option 1
double
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a number.
mockedOutputs
<oneOf>
The mocked outputs of the action query. This is useful for testing the app without actually running the action.
Option 1
string
Option 2
object
The mocked outputs of the action query.
enabled [required]
<oneOf>
Whether to enable the mocked outputs for testing.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
outputs
string
The mocked outputs of the action query, serialized as JSON.
onlyTriggerManually
<oneOf>
Determines when this query is executed. If set to false, the query will run when the app loads and whenever any query arguments change. If set to true, the query will only run when manually triggered from elsewhere in the app.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
outputs
string
The post-query transformation function, which is a JavaScript function that changes the query's .outputs property after the query's execution.
pollingIntervalInMs
<oneOf>
If specified, the app will poll the query at the specified interval in milliseconds. The minimum polling interval is 15 seconds. The query will only poll when the app's browser tab is active.
Option 1
double
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a number.
requiresConfirmation
<oneOf>
Whether to prompt the user to confirm this query before it runs.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
showToastOnError
<oneOf>
Whether to display a toast to the user when the query returns an error.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
spec [required]
<oneOf>
The definition of the action query.
Option 1
string
Option 2
object
The action query spec object.
connectionGroup
object
The connection group to use for an action query.
id
uuid
The ID of the connection group.
tags
[string]
The tags of the connection group.
connectionId
string
The ID of the custom connection to use for this action query.
fqn [required]
string
The fully qualified name of the action type.
inputs
<oneOf>
The inputs to the action query. These are the values that are passed to the action when it is triggered.
Option 1
string
Option 2
object
The inputs to the action query. See the Actions Catalog for more detail on each action and its inputs.
type [required]
enum
The action query type.
Allowed enum values: action
default: action
Option 2
object
A data transformer, which is custom JavaScript code that executes and transforms data when its inputs change.
id [required]
uuid
The ID of the data transformer.
name [required]
string
A unique identifier for this data transformer. This name is also used to access the transformer's result throughout the app.
properties [required]
object
The properties of the data transformer.
outputs
string
A JavaScript function that returns the transformed data.
type [required]
enum
The data transform type.
Allowed enum values: dataTransform
default: dataTransform
Option 3
object
A variable, which can be set and read by other components in the app.
id [required]
uuid
The ID of the state variable.
name [required]
string
A unique identifier for this state variable. This name is also used to access the variable's value throughout the app.
properties [required]
object
The properties of the state variable.
defaultValue
The default value of the state variable.
type [required]
enum
The state variable type.
Allowed enum values: stateVariable
default: stateVariable
rootInstanceName
string
The name of the root component of the app. This must be a grid component that contains all other components.
tags
[string]
A list of tags for the app, which can be used to filter apps.
id [required]
uuid
The ID of the app.
type [required]
enum
The app definition type.
Allowed enum values: appDefinitions
default: appDefinitions
included
[object]
Data on the version of the app that was published.
attributes
object
The attributes object containing the version ID of the published app.
app_version_id
uuid
The version ID of the app that was published. For an unpublished app, this is always the nil UUID (00000000-0000-0000-0000-000000000000).
id
uuid
The deployment ID.
meta
object
Metadata object containing the publication creation information.
created_at
date-time
Timestamp of when the app was published.
user_id
int64
The ID of the user who published the app.
user_name
string
The name (or email address) of the user who published the app.
user_uuid
uuid
The UUID of the user who published the app.
type
enum
The deployment type.
Allowed enum values: deployment
default: deployment
meta
object
Metadata of an app.
created_at
date-time
Timestamp of when the app was created.
deleted_at
date-time
Timestamp of when the app was deleted.
org_id
int64
The Datadog organization ID that owns the app.
updated_at
date-time
Timestamp of when the app was last updated.
updated_since_deployment
boolean
Whether the app was updated since it was last published. Published apps are pinned to a specific version and do not automatically update when the app is updated.
user_id
int64
The ID of the user who created the app.
user_name
string
The name (or email address) of the user who created the app.
user_uuid
uuid
The UUID of the user who created the app.
version
int64
The version number of the app. This starts at 1 and increments with each update.
relationship
object
The app's publication relationship and custom connections.
connections
[object]
Array of custom connections used by the app.
attributes
object
The custom connection attributes.
name
string
The name of the custom connection.
onPremRunner
object
Information about the Private Action Runner used by the custom connection, if the custom connection is associated with a Private Action Runner.
id
string
The Private Action Runner ID.
url
string
The URL of the Private Action Runner.
id
uuid
The ID of the custom connection.
type
enum
The custom connection type.
Allowed enum values: custom_connections
default: custom_connections
deployment
object
Information pointing to the app's publication status.
data
object
Data object containing the deployment ID.
id
uuid
The deployment ID.
type
enum
The deployment type.
Allowed enum values: deployment
default: deployment
meta
object
Metadata object containing the publication creation information.
created_at
date-time
Timestamp of when the app was published.
user_id
int64
The ID of the user who published the app.
user_name
string
The name (or email address) of the user who published the app.
"""
Get App returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.app_builder_apiimportAppBuilderApi# there is a valid "app" in the systemAPP_DATA_ID=environ["APP_DATA_ID"]configuration=Configuration()configuration.unstable_operations["get_app"]=TruewithApiClient(configuration)asapi_client:api_instance=AppBuilderApi(api_client)response=api_instance.get_app(app_id=APP_DATA_ID,)print(response)
# Get App returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.get_app".to_sym]=trueendapi_instance=DatadogAPIClient::V2::AppBuilderAPI.new# there is a valid "app" in the systemAPP_DATA_ID=ENV["APP_DATA_ID"]papi_instance.get_app(APP_DATA_ID)
// Get App returns "OK" response
packagemainimport("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""github.com/google/uuid")funcmain(){// there is a valid "app" in the system
AppDataID:=uuid.MustParse(os.Getenv("APP_DATA_ID"))ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.GetApp",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAppBuilderApi(apiClient)resp,r,err:=api.GetApp(ctx,AppDataID,*datadogV2.NewGetAppOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AppBuilderApi.GetApp`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AppBuilderApi.GetApp`:\n%s\n",responseContent)}
// Get App returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AppBuilderApi;importcom.datadog.api.client.v2.model.GetAppResponse;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.getApp",true);AppBuilderApiapiInstance=newAppBuilderApi(defaultClient);// there is a valid "app" in the systemUUIDAPP_DATA_ID=null;try{APP_DATA_ID=UUID.fromString(System.getenv("APP_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}try{GetAppResponseresult=apiInstance.getApp(APP_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AppBuilderApi#getApp");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get App returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;usedatadog_api_client::datadogV2::api_app_builder::GetAppOptionalParams;#[tokio::main]asyncfnmain(){// there is a valid "app" in the system
letapp_data_id=uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.GetApp",true);letapi=AppBuilderAPI::with_config(configuration);letresp=api.get_app(app_data_id.clone(),GetAppOptionalParams::default()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Get App returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.getApp"]=true;constapiInstance=newv2.AppBuilderApi(configuration);// there is a valid "app" in the system
constAPP_DATA_ID=process.env.APP_DATA_IDasstring;constparams: v2.AppBuilderApiGetAppRequest={appId: APP_DATA_ID,};apiInstance.getApp(params).then((data: v2.GetAppResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
The data object containing the new app definition. Any fields not included in the request remain unchanged.
attributes
object
App definition attributes to be updated, such as name, description, and components.
components
[object]
The new UI components that make up the app. If this field is set, all existing components are replaced with the new components under this field.
events
[object]
Events to listen for on the grid component.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id
string
The ID of the grid component. This property is deprecated; use name to identify individual components instead.
name [required]
string
A unique identifier for this grid component. This name is also visible in the app editor.
properties [required]
object
Properties of a grid component.
backgroundColor
string
The background color of the grid.
default: default
children
[object]
The child components of the grid.
events
[object]
Events to listen for on the UI component.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id
string
The ID of the UI component. This property is deprecated; use name to identify individual components instead.
name [required]
string
A unique identifier for this UI component. This name is also visible in the app editor.
properties [required]
object
Properties of a UI component. Different component types can have their own additional unique properties. See the components documentation for more detail on each component type and its properties.
children
[object]
The child components of the UI component.
isVisible
<oneOf>
Whether the UI component is visible. If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
type [required]
enum
The UI component type.
Allowed enum values: table,textInput,textArea,button,text,select,modal,schemaForm,checkbox,tabs,vegaChart,radioButtons,numberInput,fileInput,jsonInput,gridCell,dateRangePicker,search,container,calloutValue
isVisible
<oneOf>
Whether the grid component and its children are visible. If a string, it must be a valid JavaScript expression that evaluates to a boolean.
Option 1
string
Option 2
boolean
default: true
type [required]
enum
The grid component type.
Allowed enum values: grid
default: grid
description
string
The new human-readable description for the app.
name
string
The new name of the app.
queries
[ <oneOf>]
The new array of queries, such as external actions and state variables, that the app uses. If this field is set, all existing queries are replaced with the new queries under this field.
Option 1
object
An action query. This query type is used to trigger an action, such as sending a HTTP request.
events
[object]
Events to listen for downstream of the action query.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id [required]
uuid
The ID of the action query.
name [required]
string
A unique identifier for this action query. This name is also used to access the query's result throughout the app.
properties [required]
object
The properties of the action query.
condition
<oneOf>
Whether to run this query. If specified, the query will only run if this condition evaluates to true in JavaScript and all other conditions are also met.
Option 1
boolean
Option 2
string
debounceInMs
<oneOf>
The minimum time in milliseconds that must pass before the query can be triggered again. This is useful for preventing accidental double-clicks from triggering the query multiple times.
Option 1
double
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a number.
mockedOutputs
<oneOf>
The mocked outputs of the action query. This is useful for testing the app without actually running the action.
Option 1
string
Option 2
object
The mocked outputs of the action query.
enabled [required]
<oneOf>
Whether to enable the mocked outputs for testing.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
outputs
string
The mocked outputs of the action query, serialized as JSON.
onlyTriggerManually
<oneOf>
Determines when this query is executed. If set to false, the query will run when the app loads and whenever any query arguments change. If set to true, the query will only run when manually triggered from elsewhere in the app.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
outputs
string
The post-query transformation function, which is a JavaScript function that changes the query's .outputs property after the query's execution.
pollingIntervalInMs
<oneOf>
If specified, the app will poll the query at the specified interval in milliseconds. The minimum polling interval is 15 seconds. The query will only poll when the app's browser tab is active.
Option 1
double
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a number.
requiresConfirmation
<oneOf>
Whether to prompt the user to confirm this query before it runs.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
showToastOnError
<oneOf>
Whether to display a toast to the user when the query returns an error.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
spec [required]
<oneOf>
The definition of the action query.
Option 1
string
Option 2
object
The action query spec object.
connectionGroup
object
The connection group to use for an action query.
id
uuid
The ID of the connection group.
tags
[string]
The tags of the connection group.
connectionId
string
The ID of the custom connection to use for this action query.
fqn [required]
string
The fully qualified name of the action type.
inputs
<oneOf>
The inputs to the action query. These are the values that are passed to the action when it is triggered.
Option 1
string
Option 2
object
The inputs to the action query. See the Actions Catalog for more detail on each action and its inputs.
type [required]
enum
The action query type.
Allowed enum values: action
default: action
Option 2
object
A data transformer, which is custom JavaScript code that executes and transforms data when its inputs change.
id [required]
uuid
The ID of the data transformer.
name [required]
string
A unique identifier for this data transformer. This name is also used to access the transformer's result throughout the app.
properties [required]
object
The properties of the data transformer.
outputs
string
A JavaScript function that returns the transformed data.
type [required]
enum
The data transform type.
Allowed enum values: dataTransform
default: dataTransform
Option 3
object
A variable, which can be set and read by other components in the app.
id [required]
uuid
The ID of the state variable.
name [required]
string
A unique identifier for this state variable. This name is also used to access the variable's value throughout the app.
properties [required]
object
The properties of the state variable.
defaultValue
The default value of the state variable.
type [required]
enum
The state variable type.
Allowed enum values: stateVariable
default: stateVariable
rootInstanceName
string
The new name of the root component of the app. This must be a grid component that contains all other components.
tags
[string]
The new list of tags for the app, which can be used to filter apps. If this field is set, any existing tags not included in the request are removed.
id
uuid
The ID of the app to update. The app ID must match the ID in the URL path.
type [required]
enum
The app definition type.
Allowed enum values: appDefinitions
The response object after an app is successfully updated.
Expand All
Campo
Tipo
Descripción
data
object
The data object containing the updated app definition.
attributes [required]
object
The updated app definition attributes, such as name, description, and components.
components
[object]
The UI components that make up the app.
events
[object]
Events to listen for on the grid component.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id
string
The ID of the grid component. This property is deprecated; use name to identify individual components instead.
name [required]
string
A unique identifier for this grid component. This name is also visible in the app editor.
properties [required]
object
Properties of a grid component.
backgroundColor
string
The background color of the grid.
default: default
children
[object]
The child components of the grid.
events
[object]
Events to listen for on the UI component.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id
string
The ID of the UI component. This property is deprecated; use name to identify individual components instead.
name [required]
string
A unique identifier for this UI component. This name is also visible in the app editor.
properties [required]
object
Properties of a UI component. Different component types can have their own additional unique properties. See the components documentation for more detail on each component type and its properties.
children
[object]
The child components of the UI component.
isVisible
<oneOf>
Whether the UI component is visible. If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
type [required]
enum
The UI component type.
Allowed enum values: table,textInput,textArea,button,text,select,modal,schemaForm,checkbox,tabs,vegaChart,radioButtons,numberInput,fileInput,jsonInput,gridCell,dateRangePicker,search,container,calloutValue
isVisible
<oneOf>
Whether the grid component and its children are visible. If a string, it must be a valid JavaScript expression that evaluates to a boolean.
Option 1
string
Option 2
boolean
default: true
type [required]
enum
The grid component type.
Allowed enum values: grid
default: grid
description
string
The human-readable description for the app.
favorite
boolean
Whether the app is marked as a favorite by the current user.
name
string
The name of the app.
queries
[ <oneOf>]
An array of queries, such as external actions and state variables, that the app uses.
Option 1
object
An action query. This query type is used to trigger an action, such as sending a HTTP request.
events
[object]
Events to listen for downstream of the action query.
name
enum
The triggering action for the event.
Allowed enum values: pageChange,tableRowClick,_tableRowButtonClick,change,submit,click,toggleOpen,close,open,executionFinished
type
enum
The response to the event.
Allowed enum values: custom,setComponentState,triggerQuery,openModal,closeModal,openUrl,downloadFile,setStateVariableValue
id [required]
uuid
The ID of the action query.
name [required]
string
A unique identifier for this action query. This name is also used to access the query's result throughout the app.
properties [required]
object
The properties of the action query.
condition
<oneOf>
Whether to run this query. If specified, the query will only run if this condition evaluates to true in JavaScript and all other conditions are also met.
Option 1
boolean
Option 2
string
debounceInMs
<oneOf>
The minimum time in milliseconds that must pass before the query can be triggered again. This is useful for preventing accidental double-clicks from triggering the query multiple times.
Option 1
double
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a number.
mockedOutputs
<oneOf>
The mocked outputs of the action query. This is useful for testing the app without actually running the action.
Option 1
string
Option 2
object
The mocked outputs of the action query.
enabled [required]
<oneOf>
Whether to enable the mocked outputs for testing.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
outputs
string
The mocked outputs of the action query, serialized as JSON.
onlyTriggerManually
<oneOf>
Determines when this query is executed. If set to false, the query will run when the app loads and whenever any query arguments change. If set to true, the query will only run when manually triggered from elsewhere in the app.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
outputs
string
The post-query transformation function, which is a JavaScript function that changes the query's .outputs property after the query's execution.
pollingIntervalInMs
<oneOf>
If specified, the app will poll the query at the specified interval in milliseconds. The minimum polling interval is 15 seconds. The query will only poll when the app's browser tab is active.
Option 1
double
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a number.
requiresConfirmation
<oneOf>
Whether to prompt the user to confirm this query before it runs.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
showToastOnError
<oneOf>
Whether to display a toast to the user when the query returns an error.
Option 1
boolean
Option 2
string
If this is a string, it must be a valid JavaScript expression that evaluates to a boolean.
spec [required]
<oneOf>
The definition of the action query.
Option 1
string
Option 2
object
The action query spec object.
connectionGroup
object
The connection group to use for an action query.
id
uuid
The ID of the connection group.
tags
[string]
The tags of the connection group.
connectionId
string
The ID of the custom connection to use for this action query.
fqn [required]
string
The fully qualified name of the action type.
inputs
<oneOf>
The inputs to the action query. These are the values that are passed to the action when it is triggered.
Option 1
string
Option 2
object
The inputs to the action query. See the Actions Catalog for more detail on each action and its inputs.
type [required]
enum
The action query type.
Allowed enum values: action
default: action
Option 2
object
A data transformer, which is custom JavaScript code that executes and transforms data when its inputs change.
id [required]
uuid
The ID of the data transformer.
name [required]
string
A unique identifier for this data transformer. This name is also used to access the transformer's result throughout the app.
properties [required]
object
The properties of the data transformer.
outputs
string
A JavaScript function that returns the transformed data.
type [required]
enum
The data transform type.
Allowed enum values: dataTransform
default: dataTransform
Option 3
object
A variable, which can be set and read by other components in the app.
id [required]
uuid
The ID of the state variable.
name [required]
string
A unique identifier for this state variable. This name is also used to access the variable's value throughout the app.
properties [required]
object
The properties of the state variable.
defaultValue
The default value of the state variable.
type [required]
enum
The state variable type.
Allowed enum values: stateVariable
default: stateVariable
rootInstanceName
string
The name of the root component of the app. This must be a grid component that contains all other components.
tags
[string]
A list of tags for the app, which can be used to filter apps.
id [required]
uuid
The ID of the updated app.
type [required]
enum
The app definition type.
Allowed enum values: appDefinitions
default: appDefinitions
included
[object]
Data on the version of the app that was published.
attributes
object
The attributes object containing the version ID of the published app.
app_version_id
uuid
The version ID of the app that was published. For an unpublished app, this is always the nil UUID (00000000-0000-0000-0000-000000000000).
id
uuid
The deployment ID.
meta
object
Metadata object containing the publication creation information.
created_at
date-time
Timestamp of when the app was published.
user_id
int64
The ID of the user who published the app.
user_name
string
The name (or email address) of the user who published the app.
user_uuid
uuid
The UUID of the user who published the app.
type
enum
The deployment type.
Allowed enum values: deployment
default: deployment
meta
object
Metadata of an app.
created_at
date-time
Timestamp of when the app was created.
deleted_at
date-time
Timestamp of when the app was deleted.
org_id
int64
The Datadog organization ID that owns the app.
updated_at
date-time
Timestamp of when the app was last updated.
updated_since_deployment
boolean
Whether the app was updated since it was last published. Published apps are pinned to a specific version and do not automatically update when the app is updated.
user_id
int64
The ID of the user who created the app.
user_name
string
The name (or email address) of the user who created the app.
user_uuid
uuid
The UUID of the user who created the app.
version
int64
The version number of the app. This starts at 1 and increments with each update.
relationship
object
The app's publication relationship and custom connections.
connections
[object]
Array of custom connections used by the app.
attributes
object
The custom connection attributes.
name
string
The name of the custom connection.
onPremRunner
object
Information about the Private Action Runner used by the custom connection, if the custom connection is associated with a Private Action Runner.
id
string
The Private Action Runner ID.
url
string
The URL of the Private Action Runner.
id
uuid
The ID of the custom connection.
type
enum
The custom connection type.
Allowed enum values: custom_connections
default: custom_connections
deployment
object
Information pointing to the app's publication status.
data
object
Data object containing the deployment ID.
id
uuid
The deployment ID.
type
enum
The deployment type.
Allowed enum values: deployment
default: deployment
meta
object
Metadata object containing the publication creation information.
created_at
date-time
Timestamp of when the app was published.
user_id
int64
The ID of the user who published the app.
user_name
string
The name (or email address) of the user who published the app.
// Update App returns "OK" response
packagemainimport("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""github.com/google/uuid")funcmain(){// there is a valid "app" in the system
AppDataID:=uuid.MustParse(os.Getenv("APP_DATA_ID"))body:=datadogV2.UpdateAppRequest{Data:&datadogV2.UpdateAppRequestData{Attributes:&datadogV2.UpdateAppRequestDataAttributes{Name:datadog.PtrString("Updated Name"),RootInstanceName:datadog.PtrString("grid0"),},Id:&AppDataID,Type:datadogV2.APPDEFINITIONTYPE_APPDEFINITIONS,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.UpdateApp",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAppBuilderApi(apiClient)resp,r,err:=api.UpdateApp(ctx,AppDataID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AppBuilderApi.UpdateApp`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AppBuilderApi.UpdateApp`:\n%s\n",responseContent)}
// Update App returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AppBuilderApi;importcom.datadog.api.client.v2.model.AppDefinitionType;importcom.datadog.api.client.v2.model.UpdateAppRequest;importcom.datadog.api.client.v2.model.UpdateAppRequestData;importcom.datadog.api.client.v2.model.UpdateAppRequestDataAttributes;importcom.datadog.api.client.v2.model.UpdateAppResponse;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.updateApp",true);AppBuilderApiapiInstance=newAppBuilderApi(defaultClient);// there is a valid "app" in the systemUUIDAPP_DATA_ID=null;try{APP_DATA_ID=UUID.fromString(System.getenv("APP_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}UpdateAppRequestbody=newUpdateAppRequest().data(newUpdateAppRequestData().attributes(newUpdateAppRequestDataAttributes().name("Updated Name").rootInstanceName("grid0")).id(APP_DATA_ID).type(AppDefinitionType.APPDEFINITIONS));try{UpdateAppResponseresult=apiInstance.updateApp(APP_DATA_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AppBuilderApi#updateApp");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update App returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.app_builder_apiimportAppBuilderApifromdatadog_api_client.v2.model.app_definition_typeimportAppDefinitionTypefromdatadog_api_client.v2.model.update_app_requestimportUpdateAppRequestfromdatadog_api_client.v2.model.update_app_request_dataimportUpdateAppRequestDatafromdatadog_api_client.v2.model.update_app_request_data_attributesimportUpdateAppRequestDataAttributes# there is a valid "app" in the systemAPP_DATA_ID=environ["APP_DATA_ID"]body=UpdateAppRequest(data=UpdateAppRequestData(attributes=UpdateAppRequestDataAttributes(name="Updated Name",root_instance_name="grid0",),id=APP_DATA_ID,type=AppDefinitionType.APPDEFINITIONS,),)configuration=Configuration()configuration.unstable_operations["update_app"]=TruewithApiClient(configuration)asapi_client:api_instance=AppBuilderApi(api_client)response=api_instance.update_app(app_id=APP_DATA_ID,body=body)print(response)
# Update App returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.update_app".to_sym]=trueendapi_instance=DatadogAPIClient::V2::AppBuilderAPI.new# there is a valid "app" in the systemAPP_DATA_ID=ENV["APP_DATA_ID"]body=DatadogAPIClient::V2::UpdateAppRequest.new({data:DatadogAPIClient::V2::UpdateAppRequestData.new({attributes:DatadogAPIClient::V2::UpdateAppRequestDataAttributes.new({name:"Updated Name",root_instance_name:"grid0",}),id:APP_DATA_ID,type:DatadogAPIClient::V2::AppDefinitionType::APPDEFINITIONS,}),})papi_instance.update_app(APP_DATA_ID,body)
// Update App returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;usedatadog_api_client::datadogV2::model::AppDefinitionType;usedatadog_api_client::datadogV2::model::UpdateAppRequest;usedatadog_api_client::datadogV2::model::UpdateAppRequestData;usedatadog_api_client::datadogV2::model::UpdateAppRequestDataAttributes;#[tokio::main]asyncfnmain(){// there is a valid "app" in the system
letapp_data_id=uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");letbody=UpdateAppRequest::new().data(UpdateAppRequestData::new(AppDefinitionType::APPDEFINITIONS).attributes(UpdateAppRequestDataAttributes::new().name("Updated Name".to_string()).root_instance_name("grid0".to_string()),).id(app_data_id.clone()),);letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.UpdateApp",true);letapi=AppBuilderAPI::with_config(configuration);letresp=api.update_app(app_data_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Update App returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.updateApp"]=true;constapiInstance=newv2.AppBuilderApi(configuration);// there is a valid "app" in the system
constAPP_DATA_ID=process.env.APP_DATA_IDasstring;constparams: v2.AppBuilderApiUpdateAppRequest={body:{data:{attributes:{name:"Updated Name",rootInstanceName:"grid0",},id: APP_DATA_ID,type:"appDefinitions",},},appId: APP_DATA_ID,};apiInstance.updateApp(params).then((data: v2.UpdateAppResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
"""
Delete App returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.app_builder_apiimportAppBuilderApi# there is a valid "app" in the systemAPP_DATA_ID=environ["APP_DATA_ID"]configuration=Configuration()configuration.unstable_operations["delete_app"]=TruewithApiClient(configuration)asapi_client:api_instance=AppBuilderApi(api_client)response=api_instance.delete_app(app_id=APP_DATA_ID,)print(response)
# Delete App returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.delete_app".to_sym]=trueendapi_instance=DatadogAPIClient::V2::AppBuilderAPI.new# there is a valid "app" in the systemAPP_DATA_ID=ENV["APP_DATA_ID"]papi_instance.delete_app(APP_DATA_ID)
// Delete App returns "OK" response
packagemainimport("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""github.com/google/uuid")funcmain(){// there is a valid "app" in the system
AppDataID:=uuid.MustParse(os.Getenv("APP_DATA_ID"))ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.DeleteApp",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAppBuilderApi(apiClient)resp,r,err:=api.DeleteApp(ctx,AppDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AppBuilderApi.DeleteApp`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AppBuilderApi.DeleteApp`:\n%s\n",responseContent)}
// Delete App returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AppBuilderApi;importcom.datadog.api.client.v2.model.DeleteAppResponse;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.deleteApp",true);AppBuilderApiapiInstance=newAppBuilderApi(defaultClient);// there is a valid "app" in the systemUUIDAPP_DATA_ID=null;try{APP_DATA_ID=UUID.fromString(System.getenv("APP_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}try{DeleteAppResponseresult=apiInstance.deleteApp(APP_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AppBuilderApi#deleteApp");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Delete App returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;#[tokio::main]asyncfnmain(){// there is a valid "app" in the system
letapp_data_id=uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.DeleteApp",true);letapi=AppBuilderAPI::with_config(configuration);letresp=api.delete_app(app_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Delete App returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.deleteApp"]=true;constapiInstance=newv2.AppBuilderApi(configuration);// there is a valid "app" in the system
constAPP_DATA_ID=process.env.APP_DATA_IDasstring;constparams: v2.AppBuilderApiDeleteAppRequest={appId: APP_DATA_ID,};apiInstance.deleteApp(params).then((data: v2.DeleteAppResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Publish an app for use by other users. To ensure the app is accessible to the correct users, you also need to set a Restriction Policy on the app if a policy does not yet exist.
This endpoint requires the apps_write permission.
"""
Publish App returns "Created" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.app_builder_apiimportAppBuilderApi# there is a valid "app" in the systemAPP_DATA_ID=environ["APP_DATA_ID"]configuration=Configuration()configuration.unstable_operations["publish_app"]=TruewithApiClient(configuration)asapi_client:api_instance=AppBuilderApi(api_client)response=api_instance.publish_app(app_id=APP_DATA_ID,)print(response)
# Publish App returns "Created" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.publish_app".to_sym]=trueendapi_instance=DatadogAPIClient::V2::AppBuilderAPI.new# there is a valid "app" in the systemAPP_DATA_ID=ENV["APP_DATA_ID"]papi_instance.publish_app(APP_DATA_ID)
// Publish App returns "Created" response
packagemainimport("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""github.com/google/uuid")funcmain(){// there is a valid "app" in the system
AppDataID:=uuid.MustParse(os.Getenv("APP_DATA_ID"))ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.PublishApp",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAppBuilderApi(apiClient)resp,r,err:=api.PublishApp(ctx,AppDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AppBuilderApi.PublishApp`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AppBuilderApi.PublishApp`:\n%s\n",responseContent)}
// Publish App returns "Created" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AppBuilderApi;importcom.datadog.api.client.v2.model.PublishAppResponse;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.publishApp",true);AppBuilderApiapiInstance=newAppBuilderApi(defaultClient);// there is a valid "app" in the systemUUIDAPP_DATA_ID=null;try{APP_DATA_ID=UUID.fromString(System.getenv("APP_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}try{PublishAppResponseresult=apiInstance.publishApp(APP_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AppBuilderApi#publishApp");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Publish App returns "Created" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;#[tokio::main]asyncfnmain(){// there is a valid "app" in the system
letapp_data_id=uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.PublishApp",true);letapi=AppBuilderAPI::with_config(configuration);letresp=api.publish_app(app_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Publish App returns "Created" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.publishApp"]=true;constapiInstance=newv2.AppBuilderApi(configuration);// there is a valid "app" in the system
constAPP_DATA_ID=process.env.APP_DATA_IDasstring;constparams: v2.AppBuilderApiPublishAppRequest={appId: APP_DATA_ID,};apiInstance.publishApp(params).then((data: v2.PublishAppResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
Unpublish an app, removing the live version of the app. Unpublishing creates a new instance of a deployment object on the app, with a nil app_version_id (00000000-0000-0000-0000-000000000000). The app can still be updated and published again in the future.
This endpoint requires the apps_write permission.
"""
Unpublish App returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.app_builder_apiimportAppBuilderApi# there is a valid "app" in the systemAPP_DATA_ID=environ["APP_DATA_ID"]configuration=Configuration()configuration.unstable_operations["unpublish_app"]=TruewithApiClient(configuration)asapi_client:api_instance=AppBuilderApi(api_client)response=api_instance.unpublish_app(app_id=APP_DATA_ID,)print(response)
# Unpublish App returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.unpublish_app".to_sym]=trueendapi_instance=DatadogAPIClient::V2::AppBuilderAPI.new# there is a valid "app" in the systemAPP_DATA_ID=ENV["APP_DATA_ID"]papi_instance.unpublish_app(APP_DATA_ID)
// Unpublish App returns "OK" response
packagemainimport("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""github.com/google/uuid")funcmain(){// there is a valid "app" in the system
AppDataID:=uuid.MustParse(os.Getenv("APP_DATA_ID"))ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.UnpublishApp",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewAppBuilderApi(apiClient)resp,r,err:=api.UnpublishApp(ctx,AppDataID)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `AppBuilderApi.UnpublishApp`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `AppBuilderApi.UnpublishApp`:\n%s\n",responseContent)}
// Unpublish App returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.AppBuilderApi;importcom.datadog.api.client.v2.model.UnpublishAppResponse;importjava.util.UUID;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.unpublishApp",true);AppBuilderApiapiInstance=newAppBuilderApi(defaultClient);// there is a valid "app" in the systemUUIDAPP_DATA_ID=null;try{APP_DATA_ID=UUID.fromString(System.getenv("APP_DATA_ID"));}catch(IllegalArgumentExceptione){System.err.println("Error parsing UUID: "+e.getMessage());}try{UnpublishAppResponseresult=apiInstance.unpublishApp(APP_DATA_ID);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling AppBuilderApi#unpublishApp");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Unpublish App returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;#[tokio::main]asyncfnmain(){// there is a valid "app" in the system
letapp_data_id=uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.UnpublishApp",true);letapi=AppBuilderAPI::with_config(configuration);letresp=api.unpublish_app(app_data_id.clone()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com"DD_API_KEY="<API-KEY>"DD_APP_KEY="<APP-KEY>"cargo run
/**
* Unpublish App returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.unpublishApp"]=true;constapiInstance=newv2.AppBuilderApi(configuration);// there is a valid "app" in the system
constAPP_DATA_ID=process.env.APP_DATA_IDasstring;constparams: v2.AppBuilderApiUnpublishAppRequest={appId: APP_DATA_ID,};apiInstance.unpublishApp(params).then((data: v2.UnpublishAppResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));