App Builder

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.

GET https://api.ap1.datadoghq.com/api/v2/app-builder/appshttps://api.ap2.datadoghq.com/api/v2/app-builder/appshttps://api.datadoghq.eu/api/v2/app-builder/appshttps://api.ddog-gov.com/api/v2/app-builder/appshttps://api.us2.ddog-gov.com/api/v2/app-builder/appshttps://api.datadoghq.com/api/v2/app-builder/appshttps://api.us3.datadoghq.com/api/v2/app-builder/appshttps://api.us5.datadoghq.com/api/v2/app-builder/apps

Présentation

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 API requires a registered application key. Alternatively, you can configure these permissions in the UI. This endpoint requires the apps_run permission.

Arguments

Chaînes de requête

Nom

Type

Description

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.

sort

array

The fields and direction to sort apps by.

Réponse

OK

A paginated list of apps matching the specified filters and sorting.

Expand All

Champ

Type

Description

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.

{
  "data": [
    {
      "attributes": {
        "description": "string",
        "favorite": false,
        "name": "string",
        "selfService": false,
        "tags": [
          "service:webshop-backend",
          "team:webshop"
        ]
      },
      "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
      "meta": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "deleted_at": "2019-09-19T10:00:00.000Z",
        "org_id": "integer",
        "updated_at": "2019-09-19T10:00:00.000Z",
        "updated_since_deployment": false,
        "user_id": "integer",
        "user_name": "string",
        "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "version": "integer"
      },
      "relationships": {
        "deployment": {
          "data": {
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "deployment"
          },
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          }
        }
      },
      "type": "appDefinitions"
    }
  ],
  "included": [
    {
      "attributes": {
        "app_version_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
      },
      "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
      "meta": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "user_id": "integer",
        "user_name": "string",
        "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
      },
      "type": "deployment"
    }
  ],
  "meta": {
    "page": {
      "totalCount": "integer",
      "totalFilteredCount": "integer"
    }
  }
}

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code

                  # Curl command
curl -X GET "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/app-builder/apps" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
"""
List Apps returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.app_builder_api import AppBuilderApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = AppBuilderApi(api_client)
    response = api_instance.list_apps()

    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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
# List Apps returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
p api_instance.list_apps()

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
// List Apps returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewAppBuilderApi(apiClient)
	resp, r, err := api.ListApps(ctx, *datadogV2.NewListAppsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.ListApps`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `AppBuilderApi.ListApps`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
// List Apps returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.AppBuilderApi;
import com.datadog.api.client.v2.model.ListAppsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);

    try {
      ListAppsResponse result = apiInstance.listApps();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AppBuilderApi#listApps");
      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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
// List Apps returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
use datadog_api_client::datadogV2::api_app_builder::ListAppsOptionalParams;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AppBuilderAPI::with_config(configuration);
    let resp = api.list_apps(ListAppsOptionalParams::default()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-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";

const configuration = client.createConfiguration();
const apiInstance = new v2.AppBuilderApi(configuration);

apiInstance
  .listApps()
  .then((data: v2.ListAppsResponse) => {
    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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

POST https://api.ap1.datadoghq.com/api/v2/app-builder/appshttps://api.ap2.datadoghq.com/api/v2/app-builder/appshttps://api.datadoghq.eu/api/v2/app-builder/appshttps://api.ddog-gov.com/api/v2/app-builder/appshttps://api.us2.ddog-gov.com/api/v2/app-builder/appshttps://api.datadoghq.com/api/v2/app-builder/appshttps://api.us3.datadoghq.com/api/v2/app-builder/appshttps://api.us5.datadoghq.com/api/v2/app-builder/apps

Présentation

Create a new app, returning the app ID. This API requires a registered application key. Alternatively, you can configure these permissions in the UI. This endpoint requires all of the following permissions:

  • apps_write
  • connections_resolve
  • workflows_run

  • Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    object

    The data object containing the app definition.

    attributes

    object

    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

    Show 10 more,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"
        }
      }
    }

    Réponse

    Created

    The response object after a new app is successfully created, with the app ID.

    Expand All

    Champ

    Type

    Description

    data

    object

    The data object containing the app ID.

    id [required]

    uuid

    The ID of the created app.

    type [required]

    enum

    The app definition type. Allowed enum values: appDefinitions

    default: appDefinitions

    {
      "data": {
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "type": "appDefinitions"
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                              ## default
    # 
    
    # 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/app-builder/apps" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "components": [], "description": "This is a simple example app", "name": "Example App", "queries": [], "rootInstanceName": "grid0" }, "type": "appDefinitions" } } EOF
    // Create App returns "Created" 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"
    	"github.com/google/uuid"
    )
    
    func main() {
    	body := datadogV2.CreateAppRequest{
    		Data: &datadogV2.CreateAppRequestData{
    			Type: datadogV2.APPDEFINITIONTYPE_APPDEFINITIONS,
    			Attributes: &datadogV2.CreateAppRequestDataAttributes{
    				RootInstanceName: datadog.PtrString("grid0"),
    				Components: []datadogV2.ComponentGrid{
    					{
    						Name: "grid0",
    						Type: datadogV2.COMPONENTGRIDTYPE_GRID,
    						Properties: datadogV2.ComponentGridProperties{
    							Children: []datadogV2.Component{
    								{
    									Type: datadogV2.COMPONENTTYPE_GRIDCELL,
    									Name: "gridCell0",
    									Properties: datadogV2.ComponentProperties{
    										Children: []datadogV2.Component{
    											{
    												Name: "text0",
    												Type: datadogV2.COMPONENTTYPE_TEXT,
    												Properties: datadogV2.ComponentProperties{
    													IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    														Bool: datadog.PtrBool(true)},
    													AdditionalProperties: map[string]interface{}{
    														"content":       "# Cat Facts",
    														"contentType":   "markdown",
    														"textAlign":     "left",
    														"verticalAlign": "top",
    													},
    												},
    												Events: []datadogV2.AppBuilderEvent{},
    											},
    										},
    										IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    											String: datadog.PtrString("true")},
    										AdditionalProperties: map[string]interface{}{
    											"layout": "{'default': {'x': 0, 'y': 0, 'width': 4, 'height': 5}}",
    										},
    									},
    									Events: []datadogV2.AppBuilderEvent{},
    								},
    								{
    									Type: datadogV2.COMPONENTTYPE_GRIDCELL,
    									Name: "gridCell2",
    									Properties: datadogV2.ComponentProperties{
    										Children: []datadogV2.Component{
    											{
    												Name: "table0",
    												Type: datadogV2.COMPONENTTYPE_TABLE,
    												Properties: datadogV2.ComponentProperties{
    													IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    														Bool: datadog.PtrBool(true)},
    													AdditionalProperties: map[string]interface{}{
    														"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,
    														"totalCount":       "${fetchFacts?.outputs?.body?.total}",
    													},
    												},
    												Events: []datadogV2.AppBuilderEvent{},
    											},
    										},
    										IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    											String: datadog.PtrString("true")},
    										AdditionalProperties: map[string]interface{}{
    											"layout": "{'default': {'x': 0, 'y': 5, 'width': 12, 'height': 96}}",
    										},
    									},
    									Events: []datadogV2.AppBuilderEvent{},
    								},
    								{
    									Type: datadogV2.COMPONENTTYPE_GRIDCELL,
    									Name: "gridCell1",
    									Properties: datadogV2.ComponentProperties{
    										Children: []datadogV2.Component{
    											{
    												Name: "text1",
    												Type: datadogV2.COMPONENTTYPE_TEXT,
    												Properties: datadogV2.ComponentProperties{
    													IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    														Bool: datadog.PtrBool(true)},
    													AdditionalProperties: map[string]interface{}{
    														"content": `## Random Fact
    
    ${randomFact?.outputs?.fact}`,
    														"contentType":   "markdown",
    														"textAlign":     "left",
    														"verticalAlign": "top",
    													},
    												},
    												Events: []datadogV2.AppBuilderEvent{},
    											},
    										},
    										IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    											String: datadog.PtrString("true")},
    										AdditionalProperties: map[string]interface{}{
    											"layout": "{'default': {'x': 0, 'y': 101, 'width': 12, 'height': 16}}",
    										},
    									},
    									Events: []datadogV2.AppBuilderEvent{},
    								},
    								{
    									Type: datadogV2.COMPONENTTYPE_GRIDCELL,
    									Name: "gridCell3",
    									Properties: datadogV2.ComponentProperties{
    										Children: []datadogV2.Component{
    											{
    												Name: "button0",
    												Type: datadogV2.COMPONENTTYPE_BUTTON,
    												Properties: datadogV2.ComponentProperties{
    													IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    														Bool: datadog.PtrBool(true)},
    													AdditionalProperties: map[string]interface{}{
    														"label":        "Increase Page Size",
    														"level":        "default",
    														"isPrimary":    true,
    														"isBorderless": false,
    														"isLoading":    false,
    														"isDisabled":   false,
    														"iconLeft":     "angleUp",
    														"iconRight":    "",
    													},
    												},
    												Events: []datadogV2.AppBuilderEvent{
    													{
    														Name: datadogV2.APPBUILDEREVENTNAME_CLICK.Ptr(),
    														Type: datadogV2.APPBUILDEREVENTTYPE_SETSTATEVARIABLEVALUE.Ptr(),
    														AdditionalProperties: map[string]interface{}{
    															"variableName": "pageSize",
    															"value":        "${pageSize?.value + 1}",
    														},
    													},
    												},
    											},
    										},
    										IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    											String: datadog.PtrString("true")},
    										AdditionalProperties: map[string]interface{}{
    											"layout": "{'default': {'x': 10, 'y': 134, 'width': 2, 'height': 4}}",
    										},
    									},
    									Events: []datadogV2.AppBuilderEvent{},
    								},
    								{
    									Type: datadogV2.COMPONENTTYPE_GRIDCELL,
    									Name: "gridCell4",
    									Properties: datadogV2.ComponentProperties{
    										Children: []datadogV2.Component{
    											{
    												Name: "button1",
    												Type: datadogV2.COMPONENTTYPE_BUTTON,
    												Properties: datadogV2.ComponentProperties{
    													IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    														Bool: datadog.PtrBool(true)},
    													AdditionalProperties: map[string]interface{}{
    														"label":        "Decrease Page Size",
    														"level":        "default",
    														"isPrimary":    true,
    														"isBorderless": false,
    														"isLoading":    false,
    														"isDisabled":   false,
    														"iconLeft":     "angleDown",
    														"iconRight":    "",
    													},
    												},
    												Events: []datadogV2.AppBuilderEvent{
    													{
    														Name: datadogV2.APPBUILDEREVENTNAME_CLICK.Ptr(),
    														Type: datadogV2.APPBUILDEREVENTTYPE_SETSTATEVARIABLEVALUE.Ptr(),
    														AdditionalProperties: map[string]interface{}{
    															"variableName": "pageSize",
    															"value":        "${pageSize?.value - 1}",
    														},
    													},
    												},
    											},
    										},
    										IsVisible: &datadogV2.ComponentPropertiesIsVisible{
    											String: datadog.PtrString("true")},
    										AdditionalProperties: map[string]interface{}{
    											"layout": "{'default': {'x': 10, 'y': 138, 'width': 2, 'height': 4}}",
    										},
    									},
    									Events: []datadogV2.AppBuilderEvent{},
    								},
    							},
    							BackgroundColor: datadog.PtrString("default"),
    						},
    						Events: []datadogV2.AppBuilderEvent{},
    					},
    				},
    				Queries: []datadogV2.Query{
    					datadogV2.Query{
    						ActionQuery: &datadogV2.ActionQuery{
    							Id:     uuid.MustParse("92ff0bb8-553b-4f31-87c7-ef5bd16d47d5"),
    							Type:   datadogV2.ACTIONQUERYTYPE_ACTION,
    							Name:   "fetchFacts",
    							Events: []datadogV2.AppBuilderEvent{},
    							Properties: datadogV2.ActionQueryProperties{
    								Spec: datadogV2.ActionQuerySpec{
    									ActionQuerySpecObject: &datadogV2.ActionQuerySpecObject{
    										Fqn:          "com.datadoghq.http.request",
    										ConnectionId: datadog.PtrString("5e63f4a8-4ce6-47de-ba11-f6617c1d54f3"),
    										Inputs: &datadogV2.ActionQuerySpecInputs{
    											ActionQuerySpecInput: map[string]interface{}{
    												"verb":      "GET",
    												"url":       "https://catfact.ninja/facts",
    												"urlParams": "[{'key': 'limit', 'value': '${pageSize.value.toString()}'}, {'key': 'page', 'value': '${(table0.pageIndex + 1).toString()}'}]",
    											}},
    									}},
    							},
    						}},
    					datadogV2.Query{
    						StateVariable: &datadogV2.StateVariable{
    							Type: datadogV2.STATEVARIABLETYPE_STATEVARIABLE,
    							Name: "pageSize",
    							Properties: datadogV2.StateVariableProperties{
    								DefaultValue: "${20}",
    							},
    							Id: uuid.MustParse("afd03c81-4075-4432-8618-ba09d52d2f2d"),
    						}},
    					datadogV2.Query{
    						DataTransform: &datadogV2.DataTransform{
    							Type: datadogV2.DATATRANSFORMTYPE_DATATRANSFORM,
    							Name: "randomFact",
    							Properties: datadogV2.DataTransformProperties{
    								Outputs: datadog.PtrString(`${(() => {const facts = fetchFacts.outputs.body.data
    return facts[Math.floor(Math.random()*facts.length)]
    })()}`),
    							},
    							Id: uuid.MustParse("0fb22859-47dc-4137-9e41-7b67d04c525c"),
    						}},
    				},
    				Name:        datadog.PtrString("Example Cat Facts Viewer"),
    				Description: datadog.PtrString("This is a slightly complicated example app that fetches and displays cat facts"),
    			},
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.CreateApp(ctx, body)
    
    	if err != 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)
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Create App returns "Created" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.ActionQuery;
    import com.datadog.api.client.v2.model.ActionQueryProperties;
    import com.datadog.api.client.v2.model.ActionQuerySpec;
    import com.datadog.api.client.v2.model.ActionQuerySpecInputs;
    import com.datadog.api.client.v2.model.ActionQuerySpecObject;
    import com.datadog.api.client.v2.model.ActionQueryType;
    import com.datadog.api.client.v2.model.AppBuilderEvent;
    import com.datadog.api.client.v2.model.AppBuilderEventName;
    import com.datadog.api.client.v2.model.AppBuilderEventType;
    import com.datadog.api.client.v2.model.AppDefinitionType;
    import com.datadog.api.client.v2.model.Component;
    import com.datadog.api.client.v2.model.ComponentGrid;
    import com.datadog.api.client.v2.model.ComponentGridProperties;
    import com.datadog.api.client.v2.model.ComponentGridType;
    import com.datadog.api.client.v2.model.ComponentProperties;
    import com.datadog.api.client.v2.model.ComponentPropertiesIsVisible;
    import com.datadog.api.client.v2.model.ComponentType;
    import com.datadog.api.client.v2.model.CreateAppRequest;
    import com.datadog.api.client.v2.model.CreateAppRequestData;
    import com.datadog.api.client.v2.model.CreateAppRequestDataAttributes;
    import com.datadog.api.client.v2.model.CreateAppResponse;
    import com.datadog.api.client.v2.model.DataTransform;
    import com.datadog.api.client.v2.model.DataTransformProperties;
    import com.datadog.api.client.v2.model.DataTransformType;
    import com.datadog.api.client.v2.model.Query;
    import com.datadog.api.client.v2.model.StateVariable;
    import com.datadog.api.client.v2.model.StateVariableProperties;
    import com.datadog.api.client.v2.model.StateVariableType;
    import java.util.Arrays;
    import java.util.Collections;
    import java.util.Map;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        CreateAppRequest body =
            new CreateAppRequest()
                .data(
                    new CreateAppRequestData()
                        .type(AppDefinitionType.APPDEFINITIONS)
                        .attributes(
                            new CreateAppRequestDataAttributes()
                                .rootInstanceName("grid0")
                                .components(
                                    Collections.singletonList(
                                        new ComponentGrid()
                                            .name("grid0")
                                            .type(ComponentGridType.GRID)
                                            .properties(
                                                new ComponentGridProperties()
                                                    .children(
                                                        Arrays.asList(
                                                            new Component()
                                                                .type(ComponentType.GRIDCELL)
                                                                .name("gridCell0")
                                                                .properties(
                                                                    new ComponentProperties()
                                                                        .children(
                                                                            Collections.singletonList(
                                                                                new Component()
                                                                                    .name("text0")
                                                                                    .type(
                                                                                        ComponentType
                                                                                            .TEXT)
                                                                                    .properties(
                                                                                        new ComponentProperties()
                                                                                            .isVisible(
                                                                                                new ComponentPropertiesIsVisible(
                                                                                                    true)))))
                                                                        .isVisible(
                                                                            new ComponentPropertiesIsVisible(
                                                                                "true"))),
                                                            new Component()
                                                                .type(ComponentType.GRIDCELL)
                                                                .name("gridCell2")
                                                                .properties(
                                                                    new ComponentProperties()
                                                                        .children(
                                                                            Collections.singletonList(
                                                                                new Component()
                                                                                    .name("table0")
                                                                                    .type(
                                                                                        ComponentType
                                                                                            .TABLE)
                                                                                    .properties(
                                                                                        new ComponentProperties()
                                                                                            .isVisible(
                                                                                                new ComponentPropertiesIsVisible(
                                                                                                    true)))))
                                                                        .isVisible(
                                                                            new ComponentPropertiesIsVisible(
                                                                                "true"))),
                                                            new Component()
                                                                .type(ComponentType.GRIDCELL)
                                                                .name("gridCell1")
                                                                .properties(
                                                                    new ComponentProperties()
                                                                        .children(
                                                                            Collections.singletonList(
                                                                                new Component()
                                                                                    .name("text1")
                                                                                    .type(
                                                                                        ComponentType
                                                                                            .TEXT)
                                                                                    .properties(
                                                                                        new ComponentProperties()
                                                                                            .isVisible(
                                                                                                new ComponentPropertiesIsVisible(
                                                                                                    true)))))
                                                                        .isVisible(
                                                                            new ComponentPropertiesIsVisible(
                                                                                "true"))),
                                                            new Component()
                                                                .type(ComponentType.GRIDCELL)
                                                                .name("gridCell3")
                                                                .properties(
                                                                    new ComponentProperties()
                                                                        .children(
                                                                            Collections.singletonList(
                                                                                new Component()
                                                                                    .name("button0")
                                                                                    .type(
                                                                                        ComponentType
                                                                                            .BUTTON)
                                                                                    .properties(
                                                                                        new ComponentProperties()
                                                                                            .isVisible(
                                                                                                new ComponentPropertiesIsVisible(
                                                                                                    true)))
                                                                                    .events(
                                                                                        Collections
                                                                                            .singletonList(
                                                                                                new AppBuilderEvent()
                                                                                                    .name(
                                                                                                        AppBuilderEventName
                                                                                                            .CLICK)
                                                                                                    .type(
                                                                                                        AppBuilderEventType
                                                                                                            .SETSTATEVARIABLEVALUE)))))
                                                                        .isVisible(
                                                                            new ComponentPropertiesIsVisible(
                                                                                "true"))),
                                                            new Component()
                                                                .type(ComponentType.GRIDCELL)
                                                                .name("gridCell4")
                                                                .properties(
                                                                    new ComponentProperties()
                                                                        .children(
                                                                            Collections.singletonList(
                                                                                new Component()
                                                                                    .name("button1")
                                                                                    .type(
                                                                                        ComponentType
                                                                                            .BUTTON)
                                                                                    .properties(
                                                                                        new ComponentProperties()
                                                                                            .isVisible(
                                                                                                new ComponentPropertiesIsVisible(
                                                                                                    true)))
                                                                                    .events(
                                                                                        Collections
                                                                                            .singletonList(
                                                                                                new AppBuilderEvent()
                                                                                                    .name(
                                                                                                        AppBuilderEventName
                                                                                                            .CLICK)
                                                                                                    .type(
                                                                                                        AppBuilderEventType
                                                                                                            .SETSTATEVARIABLEVALUE)))))
                                                                        .isVisible(
                                                                            new ComponentPropertiesIsVisible(
                                                                                "true")))))
                                                    .backgroundColor("default"))))
                                .queries(
                                    Arrays.asList(
                                        new Query(
                                            new ActionQuery()
                                                .id(
                                                    UUID.fromString(
                                                        "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5"))
                                                .type(ActionQueryType.ACTION)
                                                .name("fetchFacts")
                                                .properties(
                                                    new ActionQueryProperties()
                                                        .spec(
                                                            new ActionQuerySpec(
                                                                new ActionQuerySpecObject()
                                                                    .fqn("com.datadoghq.http.request")
                                                                    .connectionId(
                                                                        "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3")
                                                                    .inputs(
                                                                        new ActionQuerySpecInputs(
                                                                            Map.ofEntries(
                                                                                Map.entry(
                                                                                    "verb", "GET"),
                                                                                Map.entry(
                                                                                    "url",
                                                                                    "https://catfact.ninja/facts"),
                                                                                Map.entry(
                                                                                    "urlParams",
                                                                                    "[{'key': 'limit',"
                                                                                        + " 'value':"
                                                                                        + " '${pageSize.value.toString()}'},"
                                                                                        + " {'key':"
                                                                                        + " 'page',"
                                                                                        + " 'value':"
                                                                                        + " '${(table0.pageIndex"
                                                                                        + " + 1).toString()}'}]")))))))),
                                        new Query(
                                            new StateVariable()
                                                .type(StateVariableType.STATEVARIABLE)
                                                .name("pageSize")
                                                .properties(
                                                    new StateVariableProperties().defaultValue("${20}"))
                                                .id(
                                                    UUID.fromString(
                                                        "afd03c81-4075-4432-8618-ba09d52d2f2d"))),
                                        new Query(
                                            new DataTransform()
                                                .type(DataTransformType.DATATRANSFORM)
                                                .name("randomFact")
                                                .properties(
                                                    new DataTransformProperties()
                                                        .outputs(
                                                            """
    ${(() => {const facts = fetchFacts.outputs.body.data
    return facts[Math.floor(Math.random()*facts.length)]
    })()}
    """))
                                                .id(
                                                    UUID.fromString(
                                                        "0fb22859-47dc-4137-9e41-7b67d04c525c")))))
                                .name("Example Cat Facts Viewer")
                                .description(
                                    "This is a slightly complicated example app that fetches and"
                                        + " displays cat facts")));
    
        try {
          CreateAppResponse result = apiInstance.createApp(body);
          System.out.println(result);
        } catch (ApiException e) {
          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();
        }
      }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to Example.java and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    """
    Create App returns "Created" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.action_query import ActionQuery
    from datadog_api_client.v2.model.action_query_properties import ActionQueryProperties
    from datadog_api_client.v2.model.action_query_spec_input import ActionQuerySpecInput
    from datadog_api_client.v2.model.action_query_spec_object import ActionQuerySpecObject
    from datadog_api_client.v2.model.action_query_type import ActionQueryType
    from datadog_api_client.v2.model.app_builder_event import AppBuilderEvent
    from datadog_api_client.v2.model.app_builder_event_name import AppBuilderEventName
    from datadog_api_client.v2.model.app_builder_event_type import AppBuilderEventType
    from datadog_api_client.v2.model.app_definition_type import AppDefinitionType
    from datadog_api_client.v2.model.component import Component
    from datadog_api_client.v2.model.component_grid import ComponentGrid
    from datadog_api_client.v2.model.component_grid_properties import ComponentGridProperties
    from datadog_api_client.v2.model.component_grid_type import ComponentGridType
    from datadog_api_client.v2.model.component_properties import ComponentProperties
    from datadog_api_client.v2.model.component_type import ComponentType
    from datadog_api_client.v2.model.create_app_request import CreateAppRequest
    from datadog_api_client.v2.model.create_app_request_data import CreateAppRequestData
    from datadog_api_client.v2.model.create_app_request_data_attributes import CreateAppRequestDataAttributes
    from datadog_api_client.v2.model.data_transform import DataTransform
    from datadog_api_client.v2.model.data_transform_properties import DataTransformProperties
    from datadog_api_client.v2.model.data_transform_type import DataTransformType
    from datadog_api_client.v2.model.state_variable import StateVariable
    from datadog_api_client.v2.model.state_variable_properties import StateVariableProperties
    from datadog_api_client.v2.model.state_variable_type import StateVariableType
    from uuid import UUID
    
    body = CreateAppRequest(
        data=CreateAppRequestData(
            type=AppDefinitionType.APPDEFINITIONS,
            attributes=CreateAppRequestDataAttributes(
                root_instance_name="grid0",
                components=[
                    ComponentGrid(
                        name="grid0",
                        type=ComponentGridType.GRID,
                        properties=ComponentGridProperties(
                            children=[
                                Component(
                                    type=ComponentType.GRIDCELL,
                                    name="gridCell0",
                                    properties=ComponentProperties(
                                        children=[
                                            Component(
                                                name="text0",
                                                type=ComponentType.TEXT,
                                                properties=ComponentProperties(
                                                    content="# Cat Facts",
                                                    content_type="markdown",
                                                    text_align="left",
                                                    vertical_align="top",
                                                    is_visible=True,
                                                ),
                                                events=[],
                                            ),
                                        ],
                                        is_visible="true",
                                        layout=dict([("default", "{'x': 0, 'y': 0, 'width': 4, 'height': 5}")]),
                                    ),
                                    events=[],
                                ),
                                Component(
                                    type=ComponentType.GRIDCELL,
                                    name="gridCell2",
                                    properties=ComponentProperties(
                                        children=[
                                            Component(
                                                name="table0",
                                                type=ComponentType.TABLE,
                                                properties=ComponentProperties(
                                                    data="${fetchFacts?.outputs?.body?.data}",
                                                    columns=[
                                                        dict(
                                                            [
                                                                ("dataPath", "fact"),
                                                                ("header", "fact"),
                                                                ("isHidden", "False"),
                                                                ("id", "0ae2ae9e-0280-4389-83c6-1c5949f7e674"),
                                                            ]
                                                        ),
                                                        dict(
                                                            [
                                                                ("dataPath", "length"),
                                                                ("header", "length"),
                                                                ("isHidden", "True"),
                                                                ("id", "c9048611-0196-4a00-9366-1ef9e3ec0408"),
                                                            ]
                                                        ),
                                                        dict(
                                                            [
                                                                ("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,
                                                    page_size="${pageSize?.value}",
                                                    pagination_type="server_side",
                                                    is_loading="${fetchFacts?.isLoading}",
                                                    row_buttons=[],
                                                    is_wrappable=False,
                                                    is_scrollable="vertical",
                                                    is_sub_rows_enabled=False,
                                                    global_filter=False,
                                                    is_visible=True,
                                                    total_count="${fetchFacts?.outputs?.body?.total}",
                                                ),
                                                events=[],
                                            ),
                                        ],
                                        is_visible="true",
                                        layout=dict([("default", "{'x': 0, 'y': 5, 'width': 12, 'height': 96}")]),
                                    ),
                                    events=[],
                                ),
                                Component(
                                    type=ComponentType.GRIDCELL,
                                    name="gridCell1",
                                    properties=ComponentProperties(
                                        children=[
                                            Component(
                                                name="text1",
                                                type=ComponentType.TEXT,
                                                properties=ComponentProperties(
                                                    content="## Random Fact\n\n${randomFact?.outputs?.fact}",
                                                    content_type="markdown",
                                                    text_align="left",
                                                    vertical_align="top",
                                                    is_visible=True,
                                                ),
                                                events=[],
                                            ),
                                        ],
                                        is_visible="true",
                                        layout=dict([("default", "{'x': 0, 'y': 101, 'width': 12, 'height': 16}")]),
                                    ),
                                    events=[],
                                ),
                                Component(
                                    type=ComponentType.GRIDCELL,
                                    name="gridCell3",
                                    properties=ComponentProperties(
                                        children=[
                                            Component(
                                                name="button0",
                                                type=ComponentType.BUTTON,
                                                properties=ComponentProperties(
                                                    label="Increase Page Size",
                                                    level="default",
                                                    is_primary=True,
                                                    is_borderless=False,
                                                    is_loading=False,
                                                    is_disabled=False,
                                                    is_visible=True,
                                                    icon_left="angleUp",
                                                    icon_right="",
                                                ),
                                                events=[
                                                    AppBuilderEvent(
                                                        variable_name="pageSize",
                                                        value="${pageSize?.value + 1}",
                                                        name=AppBuilderEventName.CLICK,
                                                        type=AppBuilderEventType.SETSTATEVARIABLEVALUE,
                                                    ),
                                                ],
                                            ),
                                        ],
                                        is_visible="true",
                                        layout=dict([("default", "{'x': 10, 'y': 134, 'width': 2, 'height': 4}")]),
                                    ),
                                    events=[],
                                ),
                                Component(
                                    type=ComponentType.GRIDCELL,
                                    name="gridCell4",
                                    properties=ComponentProperties(
                                        children=[
                                            Component(
                                                name="button1",
                                                type=ComponentType.BUTTON,
                                                properties=ComponentProperties(
                                                    label="Decrease Page Size",
                                                    level="default",
                                                    is_primary=True,
                                                    is_borderless=False,
                                                    is_loading=False,
                                                    is_disabled=False,
                                                    is_visible=True,
                                                    icon_left="angleDown",
                                                    icon_right="",
                                                ),
                                                events=[
                                                    AppBuilderEvent(
                                                        variable_name="pageSize",
                                                        value="${pageSize?.value - 1}",
                                                        name=AppBuilderEventName.CLICK,
                                                        type=AppBuilderEventType.SETSTATEVARIABLEVALUE,
                                                    ),
                                                ],
                                            ),
                                        ],
                                        is_visible="true",
                                        layout=dict([("default", "{'x': 10, 'y': 138, 'width': 2, 'height': 4}")]),
                                    ),
                                    events=[],
                                ),
                            ],
                            background_color="default",
                        ),
                        events=[],
                    ),
                ],
                queries=[
                    ActionQuery(
                        id=UUID("92ff0bb8-553b-4f31-87c7-ef5bd16d47d5"),
                        type=ActionQueryType.ACTION,
                        name="fetchFacts",
                        events=[],
                        properties=ActionQueryProperties(
                            spec=ActionQuerySpecObject(
                                fqn="com.datadoghq.http.request",
                                connection_id="5e63f4a8-4ce6-47de-ba11-f6617c1d54f3",
                                inputs=ActionQuerySpecInput(
                                    [
                                        ("verb", "GET"),
                                        ("url", "https://catfact.ninja/facts"),
                                        (
                                            "urlParams",
                                            "[{'key': 'limit', 'value': '${pageSize.value.toString()}'}, {'key': 'page', 'value': '${(table0.pageIndex + 1).toString()}'}]",
                                        ),
                                    ]
                                ),
                            ),
                        ),
                    ),
                    StateVariable(
                        type=StateVariableType.STATEVARIABLE,
                        name="pageSize",
                        properties=StateVariableProperties(
                            default_value="${20}",
                        ),
                        id=UUID("afd03c81-4075-4432-8618-ba09d52d2f2d"),
                    ),
                    DataTransform(
                        type=DataTransformType.DATATRANSFORM,
                        name="randomFact",
                        properties=DataTransformProperties(
                            outputs="${(() => {const facts = fetchFacts.outputs.body.data\nreturn facts[Math.floor(Math.random()*facts.length)]\n})()}",
                        ),
                        id=UUID("0fb22859-47dc-4137-9e41-7b67d04c525c"),
                    ),
                ],
                name="Example Cat Facts Viewer",
                description="This is a slightly complicated example app that fetches and displays cat facts",
            ),
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.create_app(body=body)
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Create App returns "Created" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    body = DatadogAPIClient::V2::CreateAppRequest.new({
      data: DatadogAPIClient::V2::CreateAppRequestData.new({
        type: DatadogAPIClient::V2::AppDefinitionType::APPDEFINITIONS,
        attributes: DatadogAPIClient::V2::CreateAppRequestDataAttributes.new({
          root_instance_name: "grid0",
          components: [
            DatadogAPIClient::V2::ComponentGrid.new({
              name: "grid0",
              type: DatadogAPIClient::V2::ComponentGridType::GRID,
              properties: DatadogAPIClient::V2::ComponentGridProperties.new({
                children: [
                  DatadogAPIClient::V2::Component.new({
                    type: DatadogAPIClient::V2::ComponentType::GRIDCELL,
                    name: "gridCell0",
                    properties: DatadogAPIClient::V2::ComponentProperties.new({
                      children: [
                        DatadogAPIClient::V2::Component.new({
                          name: "text0",
                          type: DatadogAPIClient::V2::ComponentType::TEXT,
                          properties: DatadogAPIClient::V2::ComponentProperties.new({
                            is_visible: true,
                          }),
                          events: [],
                        }),
                      ],
                      is_visible: "true",
                    }),
                    events: [],
                  }),
                  DatadogAPIClient::V2::Component.new({
                    type: DatadogAPIClient::V2::ComponentType::GRIDCELL,
                    name: "gridCell2",
                    properties: DatadogAPIClient::V2::ComponentProperties.new({
                      children: [
                        DatadogAPIClient::V2::Component.new({
                          name: "table0",
                          type: DatadogAPIClient::V2::ComponentType::TABLE,
                          properties: DatadogAPIClient::V2::ComponentProperties.new({
                            is_visible: true,
                          }),
                          events: [],
                        }),
                      ],
                      is_visible: "true",
                    }),
                    events: [],
                  }),
                  DatadogAPIClient::V2::Component.new({
                    type: DatadogAPIClient::V2::ComponentType::GRIDCELL,
                    name: "gridCell1",
                    properties: DatadogAPIClient::V2::ComponentProperties.new({
                      children: [
                        DatadogAPIClient::V2::Component.new({
                          name: "text1",
                          type: DatadogAPIClient::V2::ComponentType::TEXT,
                          properties: DatadogAPIClient::V2::ComponentProperties.new({
                            is_visible: true,
                          }),
                          events: [],
                        }),
                      ],
                      is_visible: "true",
                    }),
                    events: [],
                  }),
                  DatadogAPIClient::V2::Component.new({
                    type: DatadogAPIClient::V2::ComponentType::GRIDCELL,
                    name: "gridCell3",
                    properties: DatadogAPIClient::V2::ComponentProperties.new({
                      children: [
                        DatadogAPIClient::V2::Component.new({
                          name: "button0",
                          type: DatadogAPIClient::V2::ComponentType::BUTTON,
                          properties: DatadogAPIClient::V2::ComponentProperties.new({
                            is_visible: true,
                          }),
                          events: [
                            DatadogAPIClient::V2::AppBuilderEvent.new({
                              name: DatadogAPIClient::V2::AppBuilderEventName::CLICK,
                              type: DatadogAPIClient::V2::AppBuilderEventType::SETSTATEVARIABLEVALUE,
                            }),
                          ],
                        }),
                      ],
                      is_visible: "true",
                    }),
                    events: [],
                  }),
                  DatadogAPIClient::V2::Component.new({
                    type: DatadogAPIClient::V2::ComponentType::GRIDCELL,
                    name: "gridCell4",
                    properties: DatadogAPIClient::V2::ComponentProperties.new({
                      children: [
                        DatadogAPIClient::V2::Component.new({
                          name: "button1",
                          type: DatadogAPIClient::V2::ComponentType::BUTTON,
                          properties: DatadogAPIClient::V2::ComponentProperties.new({
                            is_visible: true,
                          }),
                          events: [
                            DatadogAPIClient::V2::AppBuilderEvent.new({
                              name: DatadogAPIClient::V2::AppBuilderEventName::CLICK,
                              type: DatadogAPIClient::V2::AppBuilderEventType::SETSTATEVARIABLEVALUE,
                            }),
                          ],
                        }),
                      ],
                      is_visible: "true",
                    }),
                    events: [],
                  }),
                ],
                background_color: "default",
              }),
              events: [],
            }),
          ],
          queries: [
            DatadogAPIClient::V2::ActionQuery.new({
              id: "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
              type: DatadogAPIClient::V2::ActionQueryType::ACTION,
              name: "fetchFacts",
              events: [],
              properties: DatadogAPIClient::V2::ActionQueryProperties.new({
                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()}'}]}",
                },
              }),
            }),
            DatadogAPIClient::V2::StateVariable.new({
              type: DatadogAPIClient::V2::StateVariableType::STATEVARIABLE,
              name: "pageSize",
              properties: DatadogAPIClient::V2::StateVariableProperties.new({
                default_value: "${20}",
              }),
              id: "afd03c81-4075-4432-8618-ba09d52d2f2d",
            }),
            DatadogAPIClient::V2::DataTransform.new({
              type: DatadogAPIClient::V2::DataTransformType::DATATRANSFORM,
              name: "randomFact",
              properties: DatadogAPIClient::V2::DataTransformProperties.new({
                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",
        }),
      }),
    })
    p api_instance.create_app(body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Create App returns "Created" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::ActionQuery;
    use datadog_api_client::datadogV2::model::ActionQueryProperties;
    use datadog_api_client::datadogV2::model::ActionQuerySpec;
    use datadog_api_client::datadogV2::model::ActionQuerySpecInputs;
    use datadog_api_client::datadogV2::model::ActionQuerySpecObject;
    use datadog_api_client::datadogV2::model::ActionQueryType;
    use datadog_api_client::datadogV2::model::AppBuilderEvent;
    use datadog_api_client::datadogV2::model::AppBuilderEventName;
    use datadog_api_client::datadogV2::model::AppBuilderEventType;
    use datadog_api_client::datadogV2::model::AppDefinitionType;
    use datadog_api_client::datadogV2::model::Component;
    use datadog_api_client::datadogV2::model::ComponentGrid;
    use datadog_api_client::datadogV2::model::ComponentGridProperties;
    use datadog_api_client::datadogV2::model::ComponentGridType;
    use datadog_api_client::datadogV2::model::ComponentProperties;
    use datadog_api_client::datadogV2::model::ComponentPropertiesIsVisible;
    use datadog_api_client::datadogV2::model::ComponentType;
    use datadog_api_client::datadogV2::model::CreateAppRequest;
    use datadog_api_client::datadogV2::model::CreateAppRequestData;
    use datadog_api_client::datadogV2::model::CreateAppRequestDataAttributes;
    use datadog_api_client::datadogV2::model::DataTransform;
    use datadog_api_client::datadogV2::model::DataTransformProperties;
    use datadog_api_client::datadogV2::model::DataTransformType;
    use datadog_api_client::datadogV2::model::Query;
    use datadog_api_client::datadogV2::model::StateVariable;
    use datadog_api_client::datadogV2::model::StateVariableProperties;
    use datadog_api_client::datadogV2::model::StateVariableType;
    use serde_json::Value;
    use std::collections::BTreeMap;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let body =
            CreateAppRequest
            ::new().data(
                CreateAppRequestData::new(
                    AppDefinitionType::APPDEFINITIONS,
                ).attributes(
                    CreateAppRequestDataAttributes::new()
                        .components(
                            vec![
                                ComponentGrid::new(
                                    "grid0".to_string(),
                                    ComponentGridProperties::new()
                                        .background_color("default".to_string())
                                        .children(
                                            vec![
                                                Component::new(
                                                    "gridCell0".to_string(),
                                                    ComponentProperties::new()
                                                        .children(
                                                            vec![
                                                                Component::new(
                                                                    "text0".to_string(),
                                                                    ComponentProperties
                                                                    ::new().is_visible(
                                                                        ComponentPropertiesIsVisible::Bool(true),
                                                                    ),
                                                                    ComponentType::TEXT,
                                                                ).events(vec![])
                                                            ],
                                                        )
                                                        .is_visible(
                                                            ComponentPropertiesIsVisible::String("true".to_string()),
                                                        ),
                                                    ComponentType::GRIDCELL,
                                                ).events(vec![]),
                                                Component::new(
                                                    "gridCell2".to_string(),
                                                    ComponentProperties::new()
                                                        .children(
                                                            vec![
                                                                Component::new(
                                                                    "table0".to_string(),
                                                                    ComponentProperties
                                                                    ::new().is_visible(
                                                                        ComponentPropertiesIsVisible::Bool(true),
                                                                    ),
                                                                    ComponentType::TABLE,
                                                                ).events(vec![])
                                                            ],
                                                        )
                                                        .is_visible(
                                                            ComponentPropertiesIsVisible::String("true".to_string()),
                                                        ),
                                                    ComponentType::GRIDCELL,
                                                ).events(vec![]),
                                                Component::new(
                                                    "gridCell1".to_string(),
                                                    ComponentProperties::new()
                                                        .children(
                                                            vec![
                                                                Component::new(
                                                                    "text1".to_string(),
                                                                    ComponentProperties
                                                                    ::new().is_visible(
                                                                        ComponentPropertiesIsVisible::Bool(true),
                                                                    ),
                                                                    ComponentType::TEXT,
                                                                ).events(vec![])
                                                            ],
                                                        )
                                                        .is_visible(
                                                            ComponentPropertiesIsVisible::String("true".to_string()),
                                                        ),
                                                    ComponentType::GRIDCELL,
                                                ).events(vec![]),
                                                Component::new(
                                                    "gridCell3".to_string(),
                                                    ComponentProperties::new()
                                                        .children(
                                                            vec![
                                                                Component::new(
                                                                    "button0".to_string(),
                                                                    ComponentProperties
                                                                    ::new().is_visible(
                                                                        ComponentPropertiesIsVisible::Bool(true),
                                                                    ),
                                                                    ComponentType::BUTTON,
                                                                ).events(
                                                                    vec![
                                                                        AppBuilderEvent::new()
                                                                            .name(AppBuilderEventName::CLICK)
                                                                            .type_(
                                                                                AppBuilderEventType::SETSTATEVARIABLEVALUE,
                                                                            )
                                                                    ],
                                                                )
                                                            ],
                                                        )
                                                        .is_visible(
                                                            ComponentPropertiesIsVisible::String("true".to_string()),
                                                        ),
                                                    ComponentType::GRIDCELL,
                                                ).events(vec![]),
                                                Component::new(
                                                    "gridCell4".to_string(),
                                                    ComponentProperties::new()
                                                        .children(
                                                            vec![
                                                                Component::new(
                                                                    "button1".to_string(),
                                                                    ComponentProperties
                                                                    ::new().is_visible(
                                                                        ComponentPropertiesIsVisible::Bool(true),
                                                                    ),
                                                                    ComponentType::BUTTON,
                                                                ).events(
                                                                    vec![
                                                                        AppBuilderEvent::new()
                                                                            .name(AppBuilderEventName::CLICK)
                                                                            .type_(
                                                                                AppBuilderEventType::SETSTATEVARIABLEVALUE,
                                                                            )
                                                                    ],
                                                                )
                                                            ],
                                                        )
                                                        .is_visible(
                                                            ComponentPropertiesIsVisible::String("true".to_string()),
                                                        ),
                                                    ComponentType::GRIDCELL,
                                                ).events(vec![])
                                            ],
                                        ),
                                    ComponentGridType::GRID,
                                ).events(vec![])
                            ],
                        )
                        .description(
                            "This is a slightly complicated example app that fetches and displays cat facts".to_string(),
                        )
                        .name("Example Cat Facts Viewer".to_string())
                        .queries(
                            vec![
                                Query::ActionQuery(
                                    Box::new(
                                        ActionQuery::new(
                                            Uuid::parse_str(
                                                "92ff0bb8-553b-4f31-87c7-ef5bd16d47d5",
                                            ).expect("invalid UUID"),
                                            "fetchFacts".to_string(),
                                            ActionQueryProperties::new(
                                                ActionQuerySpec::ActionQuerySpecObject(
                                                    Box::new(
                                                        ActionQuerySpecObject::new(
                                                            "com.datadoghq.http.request".to_string(),
                                                        )
                                                            .connection_id(
                                                                "5e63f4a8-4ce6-47de-ba11-f6617c1d54f3".to_string(),
                                                            )
                                                            .inputs(
                                                                ActionQuerySpecInputs::ActionQuerySpecInput(
                                                                    BTreeMap::from(
                                                                        [
                                                                            ("verb".to_string(), Value::from("GET")),
                                                                            (
                                                                                "url".to_string(),
                                                                                Value::from(
                                                                                    "https://catfact.ninja/facts",
                                                                                ),
                                                                            ),
                                                                        ],
                                                                    ),
                                                                ),
                                                            ),
                                                    ),
                                                ),
                                            ),
                                            ActionQueryType::ACTION,
                                        ).events(vec![]),
                                    ),
                                ),
                                Query::StateVariable(
                                    Box::new(
                                        StateVariable::new(
                                            Uuid::parse_str(
                                                "afd03c81-4075-4432-8618-ba09d52d2f2d",
                                            ).expect("invalid UUID"),
                                            "pageSize".to_string(),
                                            StateVariableProperties::new().default_value(Value::from("${20}")),
                                            StateVariableType::STATEVARIABLE,
                                        ),
                                    ),
                                ),
                                Query::DataTransform(
                                    Box::new(
                                        DataTransform::new(
                                            Uuid::parse_str(
                                                "0fb22859-47dc-4137-9e41-7b67d04c525c",
                                            ).expect("invalid UUID"),
                                            "randomFact".to_string(),
                                            DataTransformProperties
                                            ::new().outputs(
                                                r#"${(() => {const facts = fetchFacts.outputs.body.data
    return facts[Math.floor(Math.random()*facts.length)]
    })()}"#.to_string(),
                                            ),
                                            DataTransformType::DATATRANSFORM,
                                        ),
                                    ),
                                )
                            ],
                        )
                        .root_instance_name("grid0".to_string()),
                ),
            );
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api.create_app(body).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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-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";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiCreateAppRequest = {
      body: {
        data: {
          type: "appDefinitions",
          attributes: {
            rootInstanceName: "grid0",
            components: [
              {
                name: "grid0",
                type: "grid",
                properties: {
                  children: [
                    {
                      type: "gridCell",
                      name: "gridCell0",
                      properties: {
                        children: [
                          {
                            name: "text0",
                            type: "text",
                            properties: {
                              isVisible: true,
                            },
                            events: [],
                          },
                        ],
                        isVisible: "true",
                      },
                      events: [],
                    },
                    {
                      type: "gridCell",
                      name: "gridCell2",
                      properties: {
                        children: [
                          {
                            name: "table0",
                            type: "table",
                            properties: {
                              isVisible: true,
                            },
                            events: [],
                          },
                        ],
                        isVisible: "true",
                      },
                      events: [],
                    },
                    {
                      type: "gridCell",
                      name: "gridCell1",
                      properties: {
                        children: [
                          {
                            name: "text1",
                            type: "text",
                            properties: {
                              isVisible: true,
                            },
                            events: [],
                          },
                        ],
                        isVisible: "true",
                      },
                      events: [],
                    },
                    {
                      type: "gridCell",
                      name: "gridCell3",
                      properties: {
                        children: [
                          {
                            name: "button0",
                            type: "button",
                            properties: {
                              isVisible: true,
                            },
                            events: [
                              {
                                name: "click",
                                type: "setStateVariableValue",
                              },
                            ],
                          },
                        ],
                        isVisible: "true",
                      },
                      events: [],
                    },
                    {
                      type: "gridCell",
                      name: "gridCell4",
                      properties: {
                        children: [
                          {
                            name: "button1",
                            type: "button",
                            properties: {
                              isVisible: true,
                            },
                            events: [
                              {
                                name: "click",
                                type: "setStateVariableValue",
                              },
                            ],
                          },
                        ],
                        isVisible: "true",
                      },
                      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",
          },
        },
      },
    };
    
    apiInstance
      .createApp(params)
      .then((data: v2.CreateAppResponse) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    DELETE https://api.ap1.datadoghq.com/api/v2/app-builder/appshttps://api.ap2.datadoghq.com/api/v2/app-builder/appshttps://api.datadoghq.eu/api/v2/app-builder/appshttps://api.ddog-gov.com/api/v2/app-builder/appshttps://api.us2.ddog-gov.com/api/v2/app-builder/appshttps://api.datadoghq.com/api/v2/app-builder/appshttps://api.us3.datadoghq.com/api/v2/app-builder/appshttps://api.us5.datadoghq.com/api/v2/app-builder/apps

    Présentation

    Delete multiple apps in a single request from a list of app IDs. This API requires a registered application key. Alternatively, you can configure these permissions in the UI. This endpoint requires the apps_write permission.

    Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    [object]

    An array of objects containing the IDs of the apps to delete.

    id [required]

    uuid

    The ID of the app to delete.

    type [required]

    enum

    The app definition type. Allowed enum values: appDefinitions

    default: appDefinitions

    {
      "data": [
        {
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "type": "appDefinitions"
        }
      ]
    }

    Réponse

    OK

    The response object after multiple apps are successfully deleted.

    Expand All

    Champ

    Type

    Description

    data

    [object]

    An array of objects containing the IDs of the deleted apps.

    id [required]

    uuid

    The ID of the deleted app.

    type [required]

    enum

    The app definition type. Allowed enum values: appDefinitions

    default: appDefinitions

    {
      "data": [
        {
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "type": "appDefinitions"
        }
      ]
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                              ## default
    # 
    
    # Curl command
    curl -X DELETE "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/app-builder/apps" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": [ { "id": "aea2ed17-b45f-40d0-ba59-c86b7972c901", "type": "appDefinitions" }, { "id": "f69bb8be-6168-4fe7-a30d-370256b6504a", "type": "appDefinitions" }, { "id": "ab1ed73e-13ad-4426-b0df-a0ff8876a088", "type": "appDefinitions" } ] } EOF
    // Delete Multiple Apps returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// 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()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.DeleteApps(ctx, body)
    
    	if err != 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)
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Delete Multiple Apps returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.AppDefinitionType;
    import com.datadog.api.client.v2.model.DeleteAppsRequest;
    import com.datadog.api.client.v2.model.DeleteAppsRequestDataItems;
    import com.datadog.api.client.v2.model.DeleteAppsResponse;
    import java.util.Collections;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        // there is a valid "app" in the system
        UUID APP_DATA_ID = null;
        try {
          APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        DeleteAppsRequest body =
            new DeleteAppsRequest()
                .data(
                    Collections.singletonList(
                        new DeleteAppsRequestDataItems()
                            .id(APP_DATA_ID)
                            .type(AppDefinitionType.APPDEFINITIONS)));
    
        try {
          DeleteAppsResponse result = apiInstance.deleteApps(body);
          System.out.println(result);
        } catch (ApiException e) {
          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();
        }
      }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to Example.java and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    """
    Delete Multiple Apps returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.app_definition_type import AppDefinitionType
    from datadog_api_client.v2.model.delete_apps_request import DeleteAppsRequest
    from datadog_api_client.v2.model.delete_apps_request_data_items import DeleteAppsRequestDataItems
    
    # there is a valid "app" in the system
    APP_DATA_ID = environ["APP_DATA_ID"]
    
    body = DeleteAppsRequest(
        data=[
            DeleteAppsRequestDataItems(
                id=APP_DATA_ID,
                type=AppDefinitionType.APPDEFINITIONS,
            ),
        ],
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.delete_apps(body=body)
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Delete Multiple Apps returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    # there is a valid "app" in the system
    APP_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,
        }),
      ],
    })
    p api_instance.delete_apps(body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Delete Multiple Apps returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::AppDefinitionType;
    use datadog_api_client::datadogV2::model::DeleteAppsRequest;
    use datadog_api_client::datadogV2::model::DeleteAppsRequestDataItems;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "app" in the system
        let app_data_id =
            uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");
        let body = DeleteAppsRequest::new().data(vec![DeleteAppsRequestDataItems::new(
            app_data_id.clone(),
            AppDefinitionType::APPDEFINITIONS,
        )]);
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api.delete_apps(body).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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-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";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    // there is a valid "app" in the system
    const APP_DATA_ID = process.env.APP_DATA_ID as string;
    
    const params: 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));
    

    Instructions

    First install the library and its dependencies and then save the example to example.ts and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    GET https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}https://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}https://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}https://api.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}

    Présentation

    Get the full definition of an app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI. This endpoint requires all of the following permissions:

  • apps_run
  • connections_read

  • Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app to retrieve.

    Chaînes de requête

    Nom

    Type

    Description

    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.

    Réponse

    OK

    The full app definition response object.

    Expand All

    Champ

    Type

    Description

    data

    object

    The data object containing the app definition.

    attributes [required]

    object

    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

    Show 10 more,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.

    user_uuid

    uuid

    The UUID of the user who published the app.

    {
      "data": {
        "attributes": {
          "components": [
            {
              "events": [
                {
                  "name": "click",
                  "type": "triggerQuery"
                }
              ],
              "id": "string",
              "name": "",
              "properties": {
                "backgroundColor": "string",
                "children": [
                  {
                    "events": [
                      {
                        "name": "click",
                        "type": "triggerQuery"
                      }
                    ],
                    "id": "string",
                    "name": "",
                    "properties": {
                      "children": [],
                      "isVisible": {
                        "type": "undefined"
                      }
                    },
                    "type": "text"
                  }
                ],
                "isVisible": {
                  "type": "undefined"
                }
              },
              "type": "grid"
            }
          ],
          "description": "string",
          "favorite": false,
          "name": "string",
          "queries": [
            {
              "events": [
                {
                  "name": "click",
                  "type": "triggerQuery"
                }
              ],
              "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
              "name": "fetchPendingOrders",
              "properties": {
                "condition": {
                  "type": "undefined"
                },
                "debounceInMs": {
                  "example": "undefined",
                  "format": "undefined",
                  "type": "undefined"
                },
                "mockedOutputs": {
                  "type": "undefined"
                },
                "onlyTriggerManually": {
                  "type": "undefined"
                },
                "outputs": "${((outputs) => {return outputs.body.data})(self.rawOutputs)}",
                "pollingIntervalInMs": {
                  "example": "undefined",
                  "format": "undefined",
                  "minimum": "undefined",
                  "type": "undefined"
                },
                "requiresConfirmation": {
                  "type": "undefined"
                },
                "showToastOnError": {
                  "type": "undefined"
                },
                "spec": {
                  "type": ""
                }
              },
              "type": "action"
            }
          ],
          "rootInstanceName": "string",
          "tags": [
            "service:webshop-backend",
            "team:webshop"
          ]
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "type": "appDefinitions"
      },
      "included": [
        {
          "attributes": {
            "app_version_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          },
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          },
          "type": "deployment"
        }
      ],
      "meta": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "deleted_at": "2019-09-19T10:00:00.000Z",
        "org_id": "integer",
        "updated_at": "2019-09-19T10:00:00.000Z",
        "updated_since_deployment": false,
        "user_id": "integer",
        "user_name": "string",
        "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "version": "integer"
      },
      "relationship": {
        "connections": [
          {
            "attributes": {
              "name": "string",
              "onPremRunner": {
                "id": "string",
                "url": "string"
              }
            },
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "custom_connections"
          }
        ],
        "deployment": {
          "data": {
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "deployment"
          },
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          }
        }
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Gone

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X GET "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/app-builder/apps/${app_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Get App returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    
    # there is a valid "app" in the system
    APP_DATA_ID = environ["APP_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.get_app(
            app_id=APP_DATA_ID,
        )
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Get App returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    # there is a valid "app" in the system
    APP_DATA_ID = ENV["APP_DATA_ID"]
    p api_instance.get_app(APP_DATA_ID)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Get App returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "app" in the system
    	AppDataID := uuid.MustParse(os.Getenv("APP_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.GetApp(ctx, AppDataID, *datadogV2.NewGetAppOptionalParameters())
    
    	if err != 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)
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Get App returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.GetAppResponse;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        // there is a valid "app" in the system
        UUID APP_DATA_ID = null;
        try {
          APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          GetAppResponse result = apiInstance.getApp(APP_DATA_ID);
          System.out.println(result);
        } catch (ApiException e) {
          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();
        }
      }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to Example.java and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    // Get App returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::api_app_builder::GetAppOptionalParams;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "app" in the system
        let app_data_id =
            uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .get_app(app_data_id.clone(), GetAppOptionalParams::default())
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-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";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    // there is a valid "app" in the system
    const APP_DATA_ID = process.env.APP_DATA_ID as string;
    
    const params: 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));
    

    Instructions

    First install the library and its dependencies and then save the example to example.ts and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    PATCH https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}https://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}https://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}https://api.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}

    Présentation

    Update an existing app. This creates a new version of the app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI. This endpoint requires all of the following permissions:

  • apps_write
  • connections_resolve
  • workflows_run

  • Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app to update.

    Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    object

    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

    Show 10 more,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

    default: appDefinitions

    {
      "data": {
        "attributes": {
          "name": "Updated Name",
          "rootInstanceName": "grid0"
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "type": "appDefinitions"
      }
    }

    Réponse

    OK

    The response object after an app is successfully updated.

    Expand All

    Champ

    Type

    Description

    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

    Show 10 more,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.

    user_uuid

    uuid

    The UUID of the user who published the app.

    {
      "data": {
        "attributes": {
          "components": [
            {
              "events": [
                {
                  "name": "click",
                  "type": "triggerQuery"
                }
              ],
              "id": "string",
              "name": "",
              "properties": {
                "backgroundColor": "string",
                "children": [
                  {
                    "events": [
                      {
                        "name": "click",
                        "type": "triggerQuery"
                      }
                    ],
                    "id": "string",
                    "name": "",
                    "properties": {
                      "children": [],
                      "isVisible": {
                        "type": "undefined"
                      }
                    },
                    "type": "text"
                  }
                ],
                "isVisible": {
                  "type": "undefined"
                }
              },
              "type": "grid"
            }
          ],
          "description": "string",
          "favorite": false,
          "name": "string",
          "queries": [
            {
              "events": [
                {
                  "name": "click",
                  "type": "triggerQuery"
                }
              ],
              "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
              "name": "fetchPendingOrders",
              "properties": {
                "condition": {
                  "type": "undefined"
                },
                "debounceInMs": {
                  "example": "undefined",
                  "format": "undefined",
                  "type": "undefined"
                },
                "mockedOutputs": {
                  "type": "undefined"
                },
                "onlyTriggerManually": {
                  "type": "undefined"
                },
                "outputs": "${((outputs) => {return outputs.body.data})(self.rawOutputs)}",
                "pollingIntervalInMs": {
                  "example": "undefined",
                  "format": "undefined",
                  "minimum": "undefined",
                  "type": "undefined"
                },
                "requiresConfirmation": {
                  "type": "undefined"
                },
                "showToastOnError": {
                  "type": "undefined"
                },
                "spec": {
                  "type": ""
                }
              },
              "type": "action"
            }
          ],
          "rootInstanceName": "string",
          "tags": [
            "service:webshop-backend",
            "team:webshop"
          ]
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "type": "appDefinitions"
      },
      "included": [
        {
          "attributes": {
            "app_version_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          },
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          },
          "type": "deployment"
        }
      ],
      "meta": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "deleted_at": "2019-09-19T10:00:00.000Z",
        "org_id": "integer",
        "updated_at": "2019-09-19T10:00:00.000Z",
        "updated_since_deployment": false,
        "user_id": "integer",
        "user_name": "string",
        "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "version": "integer"
      },
      "relationship": {
        "connections": [
          {
            "attributes": {
              "name": "string",
              "onPremRunner": {
                "id": "string",
                "url": "string"
              }
            },
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "custom_connections"
          }
        ],
        "deployment": {
          "data": {
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "deployment"
          },
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          }
        }
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                              ## default
    # 
    
    # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X PATCH "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/app-builder/apps/${app_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "components": [], "description": "This is a simple example app", "name": "Example App", "queries": [], "rootInstanceName": "grid0" }, "id": "9e20cbaf-68da-45a6-9ccf-54193ac29fa5", "type": "appDefinitions" } } EOF
    // Update App returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// 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:   datadog.PtrUUID(AppDataID),
    			Type: datadogV2.APPDEFINITIONTYPE_APPDEFINITIONS,
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.UpdateApp(ctx, AppDataID, body)
    
    	if err != 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)
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Update App returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.AppDefinitionType;
    import com.datadog.api.client.v2.model.UpdateAppRequest;
    import com.datadog.api.client.v2.model.UpdateAppRequestData;
    import com.datadog.api.client.v2.model.UpdateAppRequestDataAttributes;
    import com.datadog.api.client.v2.model.UpdateAppResponse;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        // there is a valid "app" in the system
        UUID APP_DATA_ID = null;
        try {
          APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        UpdateAppRequest body =
            new UpdateAppRequest()
                .data(
                    new UpdateAppRequestData()
                        .attributes(
                            new UpdateAppRequestDataAttributes()
                                .name("Updated Name")
                                .rootInstanceName("grid0"))
                        .id(APP_DATA_ID)
                        .type(AppDefinitionType.APPDEFINITIONS));
    
        try {
          UpdateAppResponse result = apiInstance.updateApp(APP_DATA_ID, body);
          System.out.println(result);
        } catch (ApiException e) {
          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();
        }
      }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to Example.java and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    """
    Update App returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.app_definition_type import AppDefinitionType
    from datadog_api_client.v2.model.update_app_request import UpdateAppRequest
    from datadog_api_client.v2.model.update_app_request_data import UpdateAppRequestData
    from datadog_api_client.v2.model.update_app_request_data_attributes import UpdateAppRequestDataAttributes
    
    # there is a valid "app" in the system
    APP_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()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.update_app(app_id=APP_DATA_ID, body=body)
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Update App returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    # there is a valid "app" in the system
    APP_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,
      }),
    })
    p api_instance.update_app(APP_DATA_ID, body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Update App returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::AppDefinitionType;
    use datadog_api_client::datadogV2::model::UpdateAppRequest;
    use datadog_api_client::datadogV2::model::UpdateAppRequestData;
    use datadog_api_client::datadogV2::model::UpdateAppRequestDataAttributes;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "app" in the system
        let app_data_id =
            uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");
        let body = 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()),
        );
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api.update_app(app_data_id.clone(), body).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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-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";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    // there is a valid "app" in the system
    const APP_DATA_ID = process.env.APP_DATA_ID as string;
    
    const params: 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));
    

    Instructions

    First install the library and its dependencies and then save the example to example.ts and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    DELETE https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}https://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}https://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}https://api.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}https://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}

    Présentation

    Delete a single app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app to delete.

    Réponse

    OK

    The response object after an app is successfully deleted.

    Expand All

    Champ

    Type

    Description

    data

    object

    The definition of DeleteAppResponseData object.

    id [required]

    uuid

    The ID of the deleted app.

    type [required]

    enum

    The app definition type. Allowed enum values: appDefinitions

    default: appDefinitions

    {
      "data": {
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "type": "appDefinitions"
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Gone

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X DELETE "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/app-builder/apps/${app_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Delete App returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    
    # there is a valid "app" in the system
    APP_DATA_ID = environ["APP_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.delete_app(
            app_id=APP_DATA_ID,
        )
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Delete App returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    # there is a valid "app" in the system
    APP_DATA_ID = ENV["APP_DATA_ID"]
    p api_instance.delete_app(APP_DATA_ID)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Delete App returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "app" in the system
    	AppDataID := uuid.MustParse(os.Getenv("APP_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.DeleteApp(ctx, AppDataID)
    
    	if err != 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)
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Delete App returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.DeleteAppResponse;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        // there is a valid "app" in the system
        UUID APP_DATA_ID = null;
        try {
          APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          DeleteAppResponse result = apiInstance.deleteApp(APP_DATA_ID);
          System.out.println(result);
        } catch (ApiException e) {
          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();
        }
      }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to Example.java and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    // Delete App returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "app" in the system
        let app_data_id =
            uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api.delete_app(app_data_id.clone()).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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-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";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    // there is a valid "app" in the system
    const APP_DATA_ID = process.env.APP_DATA_ID as string;
    
    const params: 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));
    

    Instructions

    First install the library and its dependencies and then save the example to example.ts and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    POST https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/deployment

    Présentation

    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 API requires a registered application key. Alternatively, you can configure these permissions in the UI. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app to publish.

    Réponse

    Created

    The response object after an app is successfully published.

    Expand All

    Champ

    Type

    Description

    data

    object

    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

    {
      "data": {
        "attributes": {
          "app_version_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "meta": {
          "created_at": "2019-09-19T10:00:00.000Z",
          "user_id": "integer",
          "user_name": "string",
          "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
        },
        "type": "deployment"
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # 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/app-builder/apps/${app_id}/deployment" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Publish App returns "Created" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    
    # there is a valid "app" in the system
    APP_DATA_ID = environ["APP_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.publish_app(
            app_id=APP_DATA_ID,
        )
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Publish App returns "Created" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    # there is a valid "app" in the system
    APP_DATA_ID = ENV["APP_DATA_ID"]
    p api_instance.publish_app(APP_DATA_ID)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Publish App returns "Created" 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"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "app" in the system
    	AppDataID := uuid.MustParse(os.Getenv("APP_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.PublishApp(ctx, AppDataID)
    
    	if err != 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)
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Publish App returns "Created" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.PublishAppResponse;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        // there is a valid "app" in the system
        UUID APP_DATA_ID = null;
        try {
          APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          PublishAppResponse result = apiInstance.publishApp(APP_DATA_ID);
          System.out.println(result);
        } catch (ApiException e) {
          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();
        }
      }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to Example.java and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    // Publish App returns "Created" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "app" in the system
        let app_data_id =
            uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api.publish_app(app_data_id.clone()).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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-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";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    // there is a valid "app" in the system
    const APP_DATA_ID = process.env.APP_DATA_ID as string;
    
    const params: 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));
    

    Instructions

    First install the library and its dependencies and then save the example to example.ts and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    DELETE https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/deploymenthttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/deployment

    Présentation

    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 API requires a registered application key. Alternatively, you can configure these permissions in the UI. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app to unpublish.

    Réponse

    OK

    The response object after an app is successfully unpublished.

    Expand All

    Champ

    Type

    Description

    data

    object

    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

    {
      "data": {
        "attributes": {
          "app_version_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "meta": {
          "created_at": "2019-09-19T10:00:00.000Z",
          "user_id": "integer",
          "user_name": "string",
          "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
        },
        "type": "deployment"
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X DELETE "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/app-builder/apps/${app_id}/deployment" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Unpublish App returns "OK" response
    """
    
    from os import environ
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    
    # there is a valid "app" in the system
    APP_DATA_ID = environ["APP_DATA_ID"]
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.unpublish_app(
            app_id=APP_DATA_ID,
        )
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Unpublish App returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    # there is a valid "app" in the system
    APP_DATA_ID = ENV["APP_DATA_ID"]
    p api_instance.unpublish_app(APP_DATA_ID)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Unpublish App returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	// there is a valid "app" in the system
    	AppDataID := uuid.MustParse(os.Getenv("APP_DATA_ID"))
    
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.UnpublishApp(ctx, AppDataID)
    
    	if err != 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)
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Unpublish App returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.UnpublishAppResponse;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        // there is a valid "app" in the system
        UUID APP_DATA_ID = null;
        try {
          APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
        } catch (IllegalArgumentException e) {
          System.err.println("Error parsing UUID: " + e.getMessage());
        }
    
        try {
          UnpublishAppResponse result = apiInstance.unpublishApp(APP_DATA_ID);
          System.out.println(result);
        } catch (ApiException e) {
          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();
        }
      }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to Example.java and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    // Unpublish App returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    
    #[tokio::main]
    async fn main() {
        // there is a valid "app" in the system
        let app_data_id =
            uuid::Uuid::parse_str(&std::env::var("APP_DATA_ID").unwrap()).expect("Invalid UUID");
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api.unpublish_app(app_data_id.clone()).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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-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";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    // there is a valid "app" in the system
    const APP_DATA_ID = process.env.APP_DATA_ID as string;
    
    const params: 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));
    

    Instructions

    First install the library and its dependencies and then save the example to example.ts and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    PATCH https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/favoritehttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/favoritehttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/favoritehttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/favoritehttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/favoritehttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/favoritehttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/favoritehttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/favorite

    Présentation

    Add or remove an app from the current user’s favorites. Favorited apps can be filtered for using the filter[favorite] query parameter on the List Apps endpoint. This endpoint requires the apps_run permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app.

    Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    object

    Data for updating an app's favorite status.

    attributes

    object

    Attributes for updating an app's favorite status.

    favorite [required]

    boolean

    Whether the app should be marked as a favorite for the current user.

    type

    enum

    The favorite resource type. Allowed enum values: favorites

    default: favorites

    {
      "data": {
        "attributes": {
          "favorite": true
        },
        "type": "favorites"
      }
    }

    Réponse

    No Content

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                              ## default
    # 
    
    # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X PATCH "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/app-builder/apps/${app_id}/favorite" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "favorite": true }, "type": "favorites" } } EOF
    // Update App Favorite Status returns "No Content" response
    
    package main
    
    import (
    	"context"
    	"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"
    )
    
    func main() {
    	body := datadogV2.UpdateAppFavoriteRequest{
    		Data: &datadogV2.UpdateAppFavoriteRequestData{
    			Attributes: &datadogV2.UpdateAppFavoriteRequestDataAttributes{
    				Favorite: true,
    			},
    			Type: datadogV2.APPFAVORITETYPE_FAVORITES.Ptr(),
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	r, err := api.UpdateAppFavorite(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body)
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.UpdateAppFavorite`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Update App Favorite Status returns "No Content" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.AppFavoriteType;
    import com.datadog.api.client.v2.model.UpdateAppFavoriteRequest;
    import com.datadog.api.client.v2.model.UpdateAppFavoriteRequestData;
    import com.datadog.api.client.v2.model.UpdateAppFavoriteRequestDataAttributes;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        UpdateAppFavoriteRequest body =
            new UpdateAppFavoriteRequest()
                .data(
                    new UpdateAppFavoriteRequestData()
                        .attributes(new UpdateAppFavoriteRequestDataAttributes().favorite(true))
                        .type(AppFavoriteType.FAVORITES));
    
        try {
          apiInstance.updateAppFavorite(UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
        } catch (ApiException e) {
          System.err.println("Exception when calling AppBuilderApi#updateAppFavorite");
          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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    """
    Update App Favorite Status returns "No Content" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.app_favorite_type import AppFavoriteType
    from datadog_api_client.v2.model.update_app_favorite_request import UpdateAppFavoriteRequest
    from datadog_api_client.v2.model.update_app_favorite_request_data import UpdateAppFavoriteRequestData
    from datadog_api_client.v2.model.update_app_favorite_request_data_attributes import (
        UpdateAppFavoriteRequestDataAttributes,
    )
    from uuid import UUID
    
    body = UpdateAppFavoriteRequest(
        data=UpdateAppFavoriteRequestData(
            attributes=UpdateAppFavoriteRequestDataAttributes(
                favorite=True,
            ),
            type=AppFavoriteType.FAVORITES,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        api_instance.update_app_favorite(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.py and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Update App Favorite Status returns "No Content" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    body = DatadogAPIClient::V2::UpdateAppFavoriteRequest.new({
      data: DatadogAPIClient::V2::UpdateAppFavoriteRequestData.new({
        attributes: DatadogAPIClient::V2::UpdateAppFavoriteRequestDataAttributes.new({
          favorite: true,
        }),
        type: DatadogAPIClient::V2::AppFavoriteType::FAVORITES,
      }),
    })
    api_instance.update_app_favorite("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Update App Favorite Status returns "No Content" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::AppFavoriteType;
    use datadog_api_client::datadogV2::model::UpdateAppFavoriteRequest;
    use datadog_api_client::datadogV2::model::UpdateAppFavoriteRequestData;
    use datadog_api_client::datadogV2::model::UpdateAppFavoriteRequestDataAttributes;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let body = UpdateAppFavoriteRequest::new().data(
            UpdateAppFavoriteRequestData::new()
                .attributes(UpdateAppFavoriteRequestDataAttributes::new(true))
                .type_(AppFavoriteType::FAVORITES),
        );
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .update_app_favorite(
                Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
                body,
            )
            .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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
    /**
     * Update App Favorite Status returns "No Content" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiUpdateAppFavoriteRequest = {
      body: {
        data: {
          attributes: {
            favorite: true,
          },
          type: "favorites",
        },
      },
      appId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    };
    
    apiInstance
      .updateAppFavorite(params)
      .then((data: any) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    PATCH https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-levelhttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/protection-level

    Présentation

    Update the publication protection level of an app. When set to approval_required, future publishes must go through an approval workflow before going live. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app.

    Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    object

    Data for updating an app's publication protection level.

    attributes

    object

    Attributes for updating an app's publication protection level.

    protectionLevel [required]

    enum

    The publication protection level of the app. approval_required means changes must go through an approval workflow before being published. Allowed enum values: direct_publish,approval_required

    type

    enum

    The protection-level resource type. Allowed enum values: protectionLevel

    default: protectionLevel

    {
      "data": {
        "attributes": {
          "protectionLevel": "approval_required"
        },
        "type": "protectionLevel"
      }
    }

    Réponse

    OK

    The response object after an app is successfully updated.

    Expand All

    Champ

    Type

    Description

    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

    Show 10 more,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.

    user_uuid

    uuid

    The UUID of the user who published the app.

    {
      "data": {
        "attributes": {
          "components": [
            {
              "events": [
                {
                  "name": "click",
                  "type": "triggerQuery"
                }
              ],
              "id": "string",
              "name": "",
              "properties": {
                "backgroundColor": "string",
                "children": [
                  {
                    "events": [
                      {
                        "name": "click",
                        "type": "triggerQuery"
                      }
                    ],
                    "id": "string",
                    "name": "",
                    "properties": {
                      "children": [],
                      "isVisible": {
                        "type": "undefined"
                      }
                    },
                    "type": "text"
                  }
                ],
                "isVisible": {
                  "type": "undefined"
                }
              },
              "type": "grid"
            }
          ],
          "description": "string",
          "favorite": false,
          "name": "string",
          "queries": [
            {
              "events": [
                {
                  "name": "click",
                  "type": "triggerQuery"
                }
              ],
              "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
              "name": "fetchPendingOrders",
              "properties": {
                "condition": {
                  "type": "undefined"
                },
                "debounceInMs": {
                  "example": "undefined",
                  "format": "undefined",
                  "type": "undefined"
                },
                "mockedOutputs": {
                  "type": "undefined"
                },
                "onlyTriggerManually": {
                  "type": "undefined"
                },
                "outputs": "${((outputs) => {return outputs.body.data})(self.rawOutputs)}",
                "pollingIntervalInMs": {
                  "example": "undefined",
                  "format": "undefined",
                  "minimum": "undefined",
                  "type": "undefined"
                },
                "requiresConfirmation": {
                  "type": "undefined"
                },
                "showToastOnError": {
                  "type": "undefined"
                },
                "spec": {
                  "type": ""
                }
              },
              "type": "action"
            }
          ],
          "rootInstanceName": "string",
          "tags": [
            "service:webshop-backend",
            "team:webshop"
          ]
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "type": "appDefinitions"
      },
      "included": [
        {
          "attributes": {
            "app_version_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          },
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          },
          "type": "deployment"
        }
      ],
      "meta": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "deleted_at": "2019-09-19T10:00:00.000Z",
        "org_id": "integer",
        "updated_at": "2019-09-19T10:00:00.000Z",
        "updated_since_deployment": false,
        "user_id": "integer",
        "user_name": "string",
        "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "version": "integer"
      },
      "relationship": {
        "connections": [
          {
            "attributes": {
              "name": "string",
              "onPremRunner": {
                "id": "string",
                "url": "string"
              }
            },
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "custom_connections"
          }
        ],
        "deployment": {
          "data": {
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "deployment"
          },
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          }
        }
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                              ## default
    # 
    
    # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X PATCH "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/app-builder/apps/${app_id}/protection-level" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "protectionLevel": "approval_required" }, "type": "protectionLevel" } } EOF
    // Update App Protection Level returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	body := datadogV2.UpdateAppProtectionLevelRequest{
    		Data: &datadogV2.UpdateAppProtectionLevelRequestData{
    			Attributes: &datadogV2.UpdateAppProtectionLevelRequestDataAttributes{
    				ProtectionLevel: datadogV2.APPPROTECTIONLEVEL_APPROVAL_REQUIRED,
    			},
    			Type: datadogV2.APPPROTECTIONLEVELTYPE_PROTECTIONLEVEL.Ptr(),
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.UpdateProtectionLevel(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body)
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.UpdateProtectionLevel`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `AppBuilderApi.UpdateProtectionLevel`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Update App Protection Level returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.AppProtectionLevel;
    import com.datadog.api.client.v2.model.AppProtectionLevelType;
    import com.datadog.api.client.v2.model.UpdateAppProtectionLevelRequest;
    import com.datadog.api.client.v2.model.UpdateAppProtectionLevelRequestData;
    import com.datadog.api.client.v2.model.UpdateAppProtectionLevelRequestDataAttributes;
    import com.datadog.api.client.v2.model.UpdateAppResponse;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        UpdateAppProtectionLevelRequest body =
            new UpdateAppProtectionLevelRequest()
                .data(
                    new UpdateAppProtectionLevelRequestData()
                        .attributes(
                            new UpdateAppProtectionLevelRequestDataAttributes()
                                .protectionLevel(AppProtectionLevel.APPROVAL_REQUIRED))
                        .type(AppProtectionLevelType.PROTECTIONLEVEL));
    
        try {
          UpdateAppResponse result =
              apiInstance.updateProtectionLevel(
                  UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling AppBuilderApi#updateProtectionLevel");
          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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    """
    Update App Protection Level returns "OK" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.app_protection_level import AppProtectionLevel
    from datadog_api_client.v2.model.app_protection_level_type import AppProtectionLevelType
    from datadog_api_client.v2.model.update_app_protection_level_request import UpdateAppProtectionLevelRequest
    from datadog_api_client.v2.model.update_app_protection_level_request_data import UpdateAppProtectionLevelRequestData
    from datadog_api_client.v2.model.update_app_protection_level_request_data_attributes import (
        UpdateAppProtectionLevelRequestDataAttributes,
    )
    from uuid import UUID
    
    body = UpdateAppProtectionLevelRequest(
        data=UpdateAppProtectionLevelRequestData(
            attributes=UpdateAppProtectionLevelRequestDataAttributes(
                protection_level=AppProtectionLevel.APPROVAL_REQUIRED,
            ),
            type=AppProtectionLevelType.PROTECTIONLEVEL,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.update_protection_level(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Update App Protection Level returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    body = DatadogAPIClient::V2::UpdateAppProtectionLevelRequest.new({
      data: DatadogAPIClient::V2::UpdateAppProtectionLevelRequestData.new({
        attributes: DatadogAPIClient::V2::UpdateAppProtectionLevelRequestDataAttributes.new({
          protection_level: DatadogAPIClient::V2::AppProtectionLevel::APPROVAL_REQUIRED,
        }),
        type: DatadogAPIClient::V2::AppProtectionLevelType::PROTECTIONLEVEL,
      }),
    })
    p api_instance.update_protection_level("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Update App Protection Level returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::AppProtectionLevel;
    use datadog_api_client::datadogV2::model::AppProtectionLevelType;
    use datadog_api_client::datadogV2::model::UpdateAppProtectionLevelRequest;
    use datadog_api_client::datadogV2::model::UpdateAppProtectionLevelRequestData;
    use datadog_api_client::datadogV2::model::UpdateAppProtectionLevelRequestDataAttributes;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let body = UpdateAppProtectionLevelRequest::new().data(
            UpdateAppProtectionLevelRequestData::new()
                .attributes(UpdateAppProtectionLevelRequestDataAttributes::new(
                    AppProtectionLevel::APPROVAL_REQUIRED,
                ))
                .type_(AppProtectionLevelType::PROTECTIONLEVEL),
        );
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .update_protection_level(
                Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
                body,
            )
            .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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
    /**
     * Update App Protection Level returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiUpdateProtectionLevelRequest = {
      body: {
        data: {
          attributes: {
            protectionLevel: "approval_required",
          },
          type: "protectionLevel",
        },
      },
      appId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    };
    
    apiInstance
      .updateProtectionLevel(params)
      .then((data: v2.UpdateAppResponse) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    PATCH https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/self-servicehttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/self-servicehttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/self-servicehttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/self-servicehttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/self-servicehttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/self-servicehttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/self-servicehttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/self-service

    Présentation

    Enable or disable self-service for an app. Self-service apps can be discovered and run by users in your organization without explicit access being granted. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app.

    Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    object

    Data for updating an app's self-service status.

    attributes

    object

    Attributes for updating an app's self-service status.

    selfService [required]

    boolean

    Whether the app is enabled for self-service.

    type

    enum

    The self-service resource type. Allowed enum values: selfService

    default: selfService

    {
      "data": {
        "attributes": {
          "selfService": true
        },
        "type": "selfService"
      }
    }

    Réponse

    No Content

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                              ## default
    # 
    
    # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X PATCH "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/app-builder/apps/${app_id}/self-service" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "selfService": true }, "type": "selfService" } } EOF
    // Update App Self-Service Status returns "No Content" response
    
    package main
    
    import (
    	"context"
    	"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"
    )
    
    func main() {
    	body := datadogV2.UpdateAppSelfServiceRequest{
    		Data: &datadogV2.UpdateAppSelfServiceRequestData{
    			Attributes: &datadogV2.UpdateAppSelfServiceRequestDataAttributes{
    				SelfService: true,
    			},
    			Type: datadogV2.APPSELFSERVICETYPE_SELFSERVICE.Ptr(),
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	r, err := api.UpdateAppSelfService(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body)
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.UpdateAppSelfService`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Update App Self-Service Status returns "No Content" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.AppSelfServiceType;
    import com.datadog.api.client.v2.model.UpdateAppSelfServiceRequest;
    import com.datadog.api.client.v2.model.UpdateAppSelfServiceRequestData;
    import com.datadog.api.client.v2.model.UpdateAppSelfServiceRequestDataAttributes;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        UpdateAppSelfServiceRequest body =
            new UpdateAppSelfServiceRequest()
                .data(
                    new UpdateAppSelfServiceRequestData()
                        .attributes(new UpdateAppSelfServiceRequestDataAttributes().selfService(true))
                        .type(AppSelfServiceType.SELFSERVICE));
    
        try {
          apiInstance.updateAppSelfService(
              UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
        } catch (ApiException e) {
          System.err.println("Exception when calling AppBuilderApi#updateAppSelfService");
          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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    """
    Update App Self-Service Status returns "No Content" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.app_self_service_type import AppSelfServiceType
    from datadog_api_client.v2.model.update_app_self_service_request import UpdateAppSelfServiceRequest
    from datadog_api_client.v2.model.update_app_self_service_request_data import UpdateAppSelfServiceRequestData
    from datadog_api_client.v2.model.update_app_self_service_request_data_attributes import (
        UpdateAppSelfServiceRequestDataAttributes,
    )
    from uuid import UUID
    
    body = UpdateAppSelfServiceRequest(
        data=UpdateAppSelfServiceRequestData(
            attributes=UpdateAppSelfServiceRequestDataAttributes(
                self_service=True,
            ),
            type=AppSelfServiceType.SELFSERVICE,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        api_instance.update_app_self_service(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.py and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Update App Self-Service Status returns "No Content" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    body = DatadogAPIClient::V2::UpdateAppSelfServiceRequest.new({
      data: DatadogAPIClient::V2::UpdateAppSelfServiceRequestData.new({
        attributes: DatadogAPIClient::V2::UpdateAppSelfServiceRequestDataAttributes.new({
          self_service: true,
        }),
        type: DatadogAPIClient::V2::AppSelfServiceType::SELFSERVICE,
      }),
    })
    api_instance.update_app_self_service("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Update App Self-Service Status returns "No Content" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::AppSelfServiceType;
    use datadog_api_client::datadogV2::model::UpdateAppSelfServiceRequest;
    use datadog_api_client::datadogV2::model::UpdateAppSelfServiceRequestData;
    use datadog_api_client::datadogV2::model::UpdateAppSelfServiceRequestDataAttributes;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let body = UpdateAppSelfServiceRequest::new().data(
            UpdateAppSelfServiceRequestData::new()
                .attributes(UpdateAppSelfServiceRequestDataAttributes::new(true))
                .type_(AppSelfServiceType::SELFSERVICE),
        );
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .update_app_self_service(
                Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
                body,
            )
            .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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
    /**
     * Update App Self-Service Status returns "No Content" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiUpdateAppSelfServiceRequest = {
      body: {
        data: {
          attributes: {
            selfService: true,
          },
          type: "selfService",
        },
      },
      appId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    };
    
    apiInstance
      .updateAppSelfService(params)
      .then((data: any) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    PATCH https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/tagshttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/tagshttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/tagshttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/tagshttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/tagshttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/tagshttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/tagshttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/tags

    Présentation

    Replace the tags on an app. The provided list overwrites the existing tags entirely; tags not present in the request body are removed. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app.

    Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    object

    Data for replacing an app's tags.

    attributes

    object

    Attributes for replacing an app's tags.

    tags [required]

    [string]

    The full list of tags that should be set on the app. Existing tags not present in this list are removed.

    type

    enum

    The tags resource type. Allowed enum values: tags

    default: tags

    {
      "data": {
        "attributes": {
          "tags": [
            "team:platform",
            "service:ops"
          ]
        },
        "type": "tags"
      }
    }

    Réponse

    No Content

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                              ## default
    # 
    
    # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X PATCH "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/app-builder/apps/${app_id}/tags" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "tags": [ "team:platform", "service:ops" ] }, "type": "tags" } } EOF
    // Update App Tags returns "No Content" response
    
    package main
    
    import (
    	"context"
    	"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"
    )
    
    func main() {
    	body := datadogV2.UpdateAppTagsRequest{
    		Data: &datadogV2.UpdateAppTagsRequestData{
    			Attributes: &datadogV2.UpdateAppTagsRequestDataAttributes{
    				Tags: []string{
    					"team:platform",
    					"service:ops",
    				},
    			},
    			Type: datadogV2.APPTAGSTYPE_TAGS.Ptr(),
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	r, err := api.UpdateAppTags(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body)
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.UpdateAppTags`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Update App Tags returns "No Content" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.AppTagsType;
    import com.datadog.api.client.v2.model.UpdateAppTagsRequest;
    import com.datadog.api.client.v2.model.UpdateAppTagsRequestData;
    import com.datadog.api.client.v2.model.UpdateAppTagsRequestDataAttributes;
    import java.util.Arrays;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        UpdateAppTagsRequest body =
            new UpdateAppTagsRequest()
                .data(
                    new UpdateAppTagsRequestData()
                        .attributes(
                            new UpdateAppTagsRequestDataAttributes()
                                .tags(Arrays.asList("team:platform", "service:ops")))
                        .type(AppTagsType.TAGS));
    
        try {
          apiInstance.updateAppTags(UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
        } catch (ApiException e) {
          System.err.println("Exception when calling AppBuilderApi#updateAppTags");
          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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    """
    Update App Tags returns "No Content" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.app_tags_type import AppTagsType
    from datadog_api_client.v2.model.update_app_tags_request import UpdateAppTagsRequest
    from datadog_api_client.v2.model.update_app_tags_request_data import UpdateAppTagsRequestData
    from datadog_api_client.v2.model.update_app_tags_request_data_attributes import UpdateAppTagsRequestDataAttributes
    from uuid import UUID
    
    body = UpdateAppTagsRequest(
        data=UpdateAppTagsRequestData(
            attributes=UpdateAppTagsRequestDataAttributes(
                tags=[
                    "team:platform",
                    "service:ops",
                ],
            ),
            type=AppTagsType.TAGS,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        api_instance.update_app_tags(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.py and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Update App Tags returns "No Content" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    body = DatadogAPIClient::V2::UpdateAppTagsRequest.new({
      data: DatadogAPIClient::V2::UpdateAppTagsRequestData.new({
        attributes: DatadogAPIClient::V2::UpdateAppTagsRequestDataAttributes.new({
          tags: [
            "team:platform",
            "service:ops",
          ],
        }),
        type: DatadogAPIClient::V2::AppTagsType::TAGS,
      }),
    })
    api_instance.update_app_tags("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Update App Tags returns "No Content" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::AppTagsType;
    use datadog_api_client::datadogV2::model::UpdateAppTagsRequest;
    use datadog_api_client::datadogV2::model::UpdateAppTagsRequestData;
    use datadog_api_client::datadogV2::model::UpdateAppTagsRequestDataAttributes;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let body = UpdateAppTagsRequest::new().data(
            UpdateAppTagsRequestData::new()
                .attributes(UpdateAppTagsRequestDataAttributes::new(vec![
                    "team:platform".to_string(),
                    "service:ops".to_string(),
                ]))
                .type_(AppTagsType::TAGS),
        );
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .update_app_tags(
                Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
                body,
            )
            .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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
    /**
     * Update App Tags returns "No Content" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiUpdateAppTagsRequest = {
      body: {
        data: {
          attributes: {
            tags: ["team:platform", "service:ops"],
          },
          type: "tags",
        },
      },
      appId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    };
    
    apiInstance
      .updateAppTags(params)
      .then((data: any) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    GET https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/versionshttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/versionshttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/versionshttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/versionshttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/versionshttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/versionshttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/versionshttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/versions

    Présentation

    List the versions of an app. This endpoint is paginated. This endpoint requires all of the following permissions:

  • apps_run
  • connections_read

  • Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app.

    Chaînes de requête

    Nom

    Type

    Description

    limit

    integer

    The number of versions to return per page.

    page

    integer

    The page number to return.

    Réponse

    OK

    A paginated list of versions for an app.

    Expand All

    Champ

    Type

    Description

    data

    [object]

    The list of app versions.

    attributes

    object

    Attributes describing an app version.

    app_id

    uuid

    The ID of the app this version belongs to.

    created_at

    date-time

    Timestamp of when the version was created.

    has_ever_been_published

    boolean

    Whether this version has ever been published.

    name

    string

    The optional human-readable name of the version.

    updated_at

    date-time

    Timestamp of when the version was last updated.

    user_id

    int64

    The ID of the user who created the version.

    user_name

    string

    The name (or email) of the user who created the version.

    user_uuid

    uuid

    The UUID of the user who created the version.

    version

    int64

    The version number of the app, starting at 1.

    id

    uuid

    The ID of the app version.

    type

    enum

    The app-version resource type. Allowed enum values: appVersions

    default: appVersions

    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.

    {
      "data": [
        {
          "attributes": {
            "app_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "created_at": "2019-09-19T10:00:00.000Z",
            "has_ever_been_published": true,
            "name": "v1.2.0 - bug fix release",
            "updated_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "jane.doe@example.com",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "version": 3
          },
          "id": "9e20cbaf-68da-45a6-9ccf-54193ac29fa5",
          "type": "appVersions"
        }
      ],
      "meta": {
        "page": {
          "totalCount": "integer",
          "totalFilteredCount": "integer"
        }
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X GET "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/app-builder/apps/${app_id}/versions" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    List App Versions returns "OK" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from uuid import UUID
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.list_app_versions(
            app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
        )
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # List App Versions returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    p api_instance.list_app_versions("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // List App Versions returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.ListAppVersions(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), *datadogV2.NewListAppVersionsOptionalParameters())
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.ListAppVersions`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `AppBuilderApi.ListAppVersions`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // List App Versions returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.ListAppVersionsResponse;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        try {
          ListAppVersionsResponse result =
              apiInstance.listAppVersions(UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"));
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling AppBuilderApi#listAppVersions");
          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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    // List App Versions returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::api_app_builder::ListAppVersionsOptionalParams;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .list_app_versions(
                Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
                ListAppVersionsOptionalParams::default(),
            )
            .await;
        if let Ok(value) = resp {
            println!("{:#?}", value);
        } else {
            println!("{:#?}", resp.unwrap_err());
        }
    }
    

    Instructions

    First install the library and its dependencies and then save the example to src/main.rs and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
    /**
     * List App Versions returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiListAppVersionsRequest = {
      appId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    };
    
    apiInstance
      .listAppVersions(params)
      .then((data: v2.ListAppVersionsResponse) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    PATCH https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/version-namehttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/version-namehttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/version-namehttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/version-namehttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/version-namehttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/version-namehttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/version-namehttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/version-name

    Présentation

    Assign a human-readable name to a specific version of an app. The version is selected through the version query parameter. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app.

    Chaînes de requête

    Nom

    Type

    Description

    version [required]

    string

    The version number of the app to name. The special values latest and deployed can also be used to target the latest or currently published version.

    Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    object

    Data for naming a specific app version.

    attributes

    object

    Attributes for naming a specific app version.

    name [required]

    string

    The name to assign to the app version.

    type

    enum

    The version-name resource type. Allowed enum values: versionNames

    default: versionNames

    {
      "data": {
        "attributes": {
          "name": "v1.2.0 - bug fix release"
        },
        "type": "versionNames"
      }
    }

    Réponse

    No Content

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                              ## default
    # 
    
    # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Required query arguments
    export version="3"
    # Curl command
    curl -X PATCH "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/app-builder/apps/${app_id}/version-name?version=${version}" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "name": "v1.2.0 - bug fix release" }, "type": "versionNames" } } EOF
    // Name App Version returns "No Content" response
    
    package main
    
    import (
    	"context"
    	"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"
    )
    
    func main() {
    	body := datadogV2.UpdateAppVersionNameRequest{
    		Data: &datadogV2.UpdateAppVersionNameRequestData{
    			Attributes: &datadogV2.UpdateAppVersionNameRequestDataAttributes{
    				Name: "v1.2.0 - bug fix release",
    			},
    			Type: datadogV2.APPVERSIONNAMETYPE_VERSIONNAMES.Ptr(),
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	r, err := api.UpdateAppVersionName(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), "version", body)
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.UpdateAppVersionName`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    }
    

    Instructions

    First install the library and its dependencies and then save the example to main.go and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Name App Version returns "No Content" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.AppVersionNameType;
    import com.datadog.api.client.v2.model.UpdateAppVersionNameRequest;
    import com.datadog.api.client.v2.model.UpdateAppVersionNameRequestData;
    import com.datadog.api.client.v2.model.UpdateAppVersionNameRequestDataAttributes;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        UpdateAppVersionNameRequest body =
            new UpdateAppVersionNameRequest()
                .data(
                    new UpdateAppVersionNameRequestData()
                        .attributes(
                            new UpdateAppVersionNameRequestDataAttributes()
                                .name("v1.2.0 - bug fix release"))
                        .type(AppVersionNameType.VERSIONNAMES));
    
        try {
          apiInstance.updateAppVersionName(
              UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), "3", body);
        } catch (ApiException e) {
          System.err.println("Exception when calling AppBuilderApi#updateAppVersionName");
          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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    """
    Name App Version returns "No Content" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.app_version_name_type import AppVersionNameType
    from datadog_api_client.v2.model.update_app_version_name_request import UpdateAppVersionNameRequest
    from datadog_api_client.v2.model.update_app_version_name_request_data import UpdateAppVersionNameRequestData
    from datadog_api_client.v2.model.update_app_version_name_request_data_attributes import (
        UpdateAppVersionNameRequestDataAttributes,
    )
    from uuid import UUID
    
    body = UpdateAppVersionNameRequest(
        data=UpdateAppVersionNameRequestData(
            attributes=UpdateAppVersionNameRequestDataAttributes(
                name="v1.2.0 - bug fix release",
            ),
            type=AppVersionNameType.VERSIONNAMES,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        api_instance.update_app_version_name(
            app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), version="version", body=body
        )
    

    Instructions

    First install the library and its dependencies and then save the example to example.py and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Name App Version returns "No Content" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    body = DatadogAPIClient::V2::UpdateAppVersionNameRequest.new({
      data: DatadogAPIClient::V2::UpdateAppVersionNameRequestData.new({
        attributes: DatadogAPIClient::V2::UpdateAppVersionNameRequestDataAttributes.new({
          name: "v1.2.0 - bug fix release",
        }),
        type: DatadogAPIClient::V2::AppVersionNameType::VERSIONNAMES,
      }),
    })
    api_instance.update_app_version_name("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "version", body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Name App Version returns "No Content" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::AppVersionNameType;
    use datadog_api_client::datadogV2::model::UpdateAppVersionNameRequest;
    use datadog_api_client::datadogV2::model::UpdateAppVersionNameRequestData;
    use datadog_api_client::datadogV2::model::UpdateAppVersionNameRequestDataAttributes;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let body = UpdateAppVersionNameRequest::new().data(
            UpdateAppVersionNameRequestData::new()
                .attributes(UpdateAppVersionNameRequestDataAttributes::new(
                    "v1.2.0 - bug fix release".to_string(),
                ))
                .type_(AppVersionNameType::VERSIONNAMES),
        );
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .update_app_version_name(
                Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
                "version".to_string(),
                body,
            )
            .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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
    /**
     * Name App Version returns "No Content" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiUpdateAppVersionNameRequest = {
      body: {
        data: {
          attributes: {
            name: "v1.2.0 - bug fix release",
          },
          type: "versionNames",
        },
      },
      appId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      version: "version",
    };
    
    apiInstance
      .updateAppVersionName(params)
      .then((data: any) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    POST https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/publish-requesthttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/publish-requesthttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/publish-requesthttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/publish-requesthttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/publish-requesthttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/publish-requesthttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/publish-requesthttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/publish-request

    Présentation

    Create a publish request to ask for approval to publish an app whose protection level is approval_required. Publishing happens automatically once the request is approved by a user with the appropriate permissions. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app.

    Requête

    Body Data (required)

    Expand All

    Champ

    Type

    Description

    data

    object

    Data for creating a publish request.

    attributes

    object

    Attributes for creating a publish request.

    description

    string

    An optional description of the changes in this publish request.

    title [required]

    string

    A short title for the publish request.

    type

    enum

    The publish-request resource type. Allowed enum values: publishRequest

    default: publishRequest

    {
      "data": {
        "attributes": {
          "description": "Adds new dashboard widgets and a few bug fixes.",
          "title": "Release v1.2 to production"
        },
        "type": "publishRequest"
      }
    }

    Réponse

    Created

    The response object after an app is successfully published.

    Expand All

    Champ

    Type

    Description

    data

    object

    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

    {
      "data": {
        "attributes": {
          "app_version_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "meta": {
          "created_at": "2019-09-19T10:00:00.000Z",
          "user_id": "integer",
          "user_name": "string",
          "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
        },
        "type": "deployment"
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      ## default
    # 
    
    # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # 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/app-builder/apps/${app_id}/publish-request" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "description": "Adds new dashboard widgets and a few bug fixes.", "title": "Release v1.2 to production" }, "type": "publishRequest" } } EOF
    """
    Create Publish Request returns "Created" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from datadog_api_client.v2.model.create_publish_request_request import CreatePublishRequestRequest
    from datadog_api_client.v2.model.create_publish_request_request_data import CreatePublishRequestRequestData
    from datadog_api_client.v2.model.create_publish_request_request_data_attributes import (
        CreatePublishRequestRequestDataAttributes,
    )
    from datadog_api_client.v2.model.publish_request_type import PublishRequestType
    from uuid import UUID
    
    body = CreatePublishRequestRequest(
        data=CreatePublishRequestRequestData(
            attributes=CreatePublishRequestRequestDataAttributes(
                description="Adds new dashboard widgets and a few bug fixes.",
                title="Release v1.2 to production",
            ),
            type=PublishRequestType.PUBLISHREQUEST,
        ),
    )
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.create_publish_request(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Create Publish Request returns "Created" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    
    body = DatadogAPIClient::V2::CreatePublishRequestRequest.new({
      data: DatadogAPIClient::V2::CreatePublishRequestRequestData.new({
        attributes: DatadogAPIClient::V2::CreatePublishRequestRequestDataAttributes.new({
          description: "Adds new dashboard widgets and a few bug fixes.",
          title: "Release v1.2 to production",
        }),
        type: DatadogAPIClient::V2::PublishRequestType::PUBLISHREQUEST,
      }),
    })
    p api_instance.create_publish_request("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Create Publish Request returns "Created" 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"
    	"github.com/google/uuid"
    )
    
    func main() {
    	body := datadogV2.CreatePublishRequestRequest{
    		Data: &datadogV2.CreatePublishRequestRequestData{
    			Attributes: &datadogV2.CreatePublishRequestRequestDataAttributes{
    				Description: datadog.PtrString("Adds new dashboard widgets and a few bug fixes."),
    				Title:       "Release v1.2 to production",
    			},
    			Type: datadogV2.PUBLISHREQUESTTYPE_PUBLISHREQUEST.Ptr(),
    		},
    	}
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.CreatePublishRequest(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body)
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.CreatePublishRequest`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `AppBuilderApi.CreatePublishRequest`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Create Publish Request returns "Created" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.CreatePublishRequestRequest;
    import com.datadog.api.client.v2.model.CreatePublishRequestRequestData;
    import com.datadog.api.client.v2.model.CreatePublishRequestRequestDataAttributes;
    import com.datadog.api.client.v2.model.PublishAppResponse;
    import com.datadog.api.client.v2.model.PublishRequestType;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        CreatePublishRequestRequest body =
            new CreatePublishRequestRequest()
                .data(
                    new CreatePublishRequestRequestData()
                        .attributes(
                            new CreatePublishRequestRequestDataAttributes()
                                .description("Adds new dashboard widgets and a few bug fixes.")
                                .title("Release v1.2 to production"))
                        .type(PublishRequestType.PUBLISHREQUEST));
    
        try {
          PublishAppResponse result =
              apiInstance.createPublishRequest(
                  UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling AppBuilderApi#createPublishRequest");
          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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
    // Create Publish Request returns "Created" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use datadog_api_client::datadogV2::model::CreatePublishRequestRequest;
    use datadog_api_client::datadogV2::model::CreatePublishRequestRequestData;
    use datadog_api_client::datadogV2::model::CreatePublishRequestRequestDataAttributes;
    use datadog_api_client::datadogV2::model::PublishRequestType;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let body = CreatePublishRequestRequest::new().data(
            CreatePublishRequestRequestData::new()
                .attributes(
                    CreatePublishRequestRequestDataAttributes::new(
                        "Release v1.2 to production".to_string(),
                    )
                    .description("Adds new dashboard widgets and a few bug fixes.".to_string()),
                )
                .type_(PublishRequestType::PUBLISHREQUEST),
        );
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .create_publish_request(
                Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
                body,
            )
            .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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
    /**
     * Create Publish Request returns "Created" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiCreatePublishRequestRequest = {
      body: {
        data: {
          attributes: {
            description: "Adds new dashboard widgets and a few bug fixes.",
            title: "Release v1.2 to production",
          },
          type: "publishRequest",
        },
      },
      appId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    };
    
    apiInstance
      .createPublishRequest(params)
      .then((data: v2.PublishAppResponse) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"

    POST https://api.ap1.datadoghq.com/api/v2/app-builder/apps/{app_id}/reverthttps://api.ap2.datadoghq.com/api/v2/app-builder/apps/{app_id}/reverthttps://api.datadoghq.eu/api/v2/app-builder/apps/{app_id}/reverthttps://api.ddog-gov.com/api/v2/app-builder/apps/{app_id}/reverthttps://api.us2.ddog-gov.com/api/v2/app-builder/apps/{app_id}/reverthttps://api.datadoghq.com/api/v2/app-builder/apps/{app_id}/reverthttps://api.us3.datadoghq.com/api/v2/app-builder/apps/{app_id}/reverthttps://api.us5.datadoghq.com/api/v2/app-builder/apps/{app_id}/revert

    Présentation

    Revert an app to a previous version. The version to revert to is selected through the version query parameter. The reverted version becomes the new latest version of the app. This endpoint requires the apps_write permission.

    Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    app_id [required]

    string

    The ID of the app.

    Chaînes de requête

    Nom

    Type

    Description

    version [required]

    string

    The version number of the app to revert to. Cannot be latest. The special value deployed can be used to revert to the currently published version.

    Réponse

    OK

    The response object after an app is successfully updated.

    Expand All

    Champ

    Type

    Description

    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

    Show 10 more,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.

    user_uuid

    uuid

    The UUID of the user who published the app.

    {
      "data": {
        "attributes": {
          "components": [
            {
              "events": [
                {
                  "name": "click",
                  "type": "triggerQuery"
                }
              ],
              "id": "string",
              "name": "",
              "properties": {
                "backgroundColor": "string",
                "children": [
                  {
                    "events": [
                      {
                        "name": "click",
                        "type": "triggerQuery"
                      }
                    ],
                    "id": "string",
                    "name": "",
                    "properties": {
                      "children": [],
                      "isVisible": {
                        "type": "undefined"
                      }
                    },
                    "type": "text"
                  }
                ],
                "isVisible": {
                  "type": "undefined"
                }
              },
              "type": "grid"
            }
          ],
          "description": "string",
          "favorite": false,
          "name": "string",
          "queries": [
            {
              "events": [
                {
                  "name": "click",
                  "type": "triggerQuery"
                }
              ],
              "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
              "name": "fetchPendingOrders",
              "properties": {
                "condition": {
                  "type": "undefined"
                },
                "debounceInMs": {
                  "example": "undefined",
                  "format": "undefined",
                  "type": "undefined"
                },
                "mockedOutputs": {
                  "type": "undefined"
                },
                "onlyTriggerManually": {
                  "type": "undefined"
                },
                "outputs": "${((outputs) => {return outputs.body.data})(self.rawOutputs)}",
                "pollingIntervalInMs": {
                  "example": "undefined",
                  "format": "undefined",
                  "minimum": "undefined",
                  "type": "undefined"
                },
                "requiresConfirmation": {
                  "type": "undefined"
                },
                "showToastOnError": {
                  "type": "undefined"
                },
                "spec": {
                  "type": ""
                }
              },
              "type": "action"
            }
          ],
          "rootInstanceName": "string",
          "tags": [
            "service:webshop-backend",
            "team:webshop"
          ]
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "type": "appDefinitions"
      },
      "included": [
        {
          "attributes": {
            "app_version_id": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          },
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          },
          "type": "deployment"
        }
      ],
      "meta": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "deleted_at": "2019-09-19T10:00:00.000Z",
        "org_id": "integer",
        "updated_at": "2019-09-19T10:00:00.000Z",
        "updated_since_deployment": false,
        "user_id": "integer",
        "user_name": "string",
        "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "version": "integer"
      },
      "relationship": {
        "connections": [
          {
            "attributes": {
              "name": "string",
              "onPremRunner": {
                "id": "string",
                "url": "string"
              }
            },
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "custom_connections"
          }
        ],
        "deployment": {
          "data": {
            "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
            "type": "deployment"
          },
          "meta": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "user_id": "integer",
            "user_name": "string",
            "user_uuid": "65bb1f25-52e1-4510-9f8d-22d1516ed693"
          }
        }
      }
    }

    Bad Request

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export app_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Required query arguments
    export version="2"
    # 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/app-builder/apps/${app_id}/revert?version=${version}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
    """
    Revert App returns "OK" response
    """
    
    from datadog_api_client import ApiClient, Configuration
    from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
    from uuid import UUID
    
    configuration = Configuration()
    with ApiClient(configuration) as api_client:
        api_instance = AppBuilderApi(api_client)
        response = api_instance.revert_app(
            app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
            version="version",
        )
    
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
    # Revert App returns "OK" response
    
    require "datadog_api_client"
    api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
    p api_instance.revert_app("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "version")
    

    Instructions

    First install the library and its dependencies and then save the example to example.rb and run following commands:

        
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
    // Revert App returns "OK" response
    use datadog_api_client::datadog;
    use datadog_api_client::datadogV2::api_app_builder::AppBuilderAPI;
    use uuid::Uuid;
    
    #[tokio::main]
    async fn main() {
        let configuration = datadog::Configuration::new();
        let api = AppBuilderAPI::with_config(configuration);
        let resp = api
            .revert_app(
                Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
                "version".to_string(),
            )
            .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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
    /**
     * Revert App returns "OK" response
     */
    
    import { client, v2 } from "@datadog/datadog-api-client";
    
    const configuration = client.createConfiguration();
    const apiInstance = new v2.AppBuilderApi(configuration);
    
    const params: v2.AppBuilderApiRevertAppRequest = {
      appId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      version: "version",
    };
    
    apiInstance
      .revertApp(params)
      .then((data: v2.UpdateAppResponse) => {
        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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"
    // Revert App returns "OK" response
    
    package main
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
    	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
    	"github.com/google/uuid"
    )
    
    func main() {
    	ctx := datadog.NewDefaultContext(context.Background())
    	configuration := datadog.NewConfiguration()
    	apiClient := datadog.NewAPIClient(configuration)
    	api := datadogV2.NewAppBuilderApi(apiClient)
    	resp, r, err := api.RevertApp(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), "version")
    
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error when calling `AppBuilderApi.RevertApp`: %v\n", err)
    		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    	}
    
    	responseContent, _ := json.MarshalIndent(resp, "", "  ")
    	fmt.Fprintf(os.Stdout, "Response from `AppBuilderApi.RevertApp`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
    // Revert App returns "OK" response
    
    import com.datadog.api.client.ApiClient;
    import com.datadog.api.client.ApiException;
    import com.datadog.api.client.v2.api.AppBuilderApi;
    import com.datadog.api.client.v2.model.UpdateAppResponse;
    import java.util.UUID;
    
    public class Example {
      public static void main(String[] args) {
        ApiClient defaultClient = ApiClient.getDefaultApiClient();
        AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
    
        try {
          UpdateAppResponse result =
              apiInstance.revertApp(UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), "2");
          System.out.println(result);
        } catch (ApiException e) {
          System.err.println("Exception when calling AppBuilderApi#revertApp");
          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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"

    GET https://api.ap1.datadoghq.com/api/v2/app-builder/tagshttps://api.ap2.datadoghq.com/api/v2/app-builder/tagshttps://api.datadoghq.eu/api/v2/app-builder/tagshttps://api.ddog-gov.com/api/v2/app-builder/tagshttps://api.us2.ddog-gov.com/api/v2/app-builder/tagshttps://api.datadoghq.com/api/v2/app-builder/tagshttps://api.us3.datadoghq.com/api/v2/app-builder/tagshttps://api.us5.datadoghq.com/api/v2/app-builder/tags

    Présentation

    List all tags associated with the authenticated user’s apps. This endpoint requires the apps_run permission.

    Réponse

    OK

    The response for listing tags associated with apps.

    Expand All

    Champ

    Type

    Description

    data

    [object]

    An array of tags.

    id [required]

    string

    The name of the tag.

    type [required]

    enum

    The resource type for a tag. Allowed enum values: tag

    {
      "data": [
        {
          "id": "production",
          "type": "tag"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Curl command
    curl -X GET "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/app-builder/tags" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    GET https://api.ap1.datadoghq.com/api/v2/app-builder/blueprintshttps://api.ap2.datadoghq.com/api/v2/app-builder/blueprintshttps://api.datadoghq.eu/api/v2/app-builder/blueprintshttps://api.ddog-gov.com/api/v2/app-builder/blueprintshttps://api.us2.ddog-gov.com/api/v2/app-builder/blueprintshttps://api.datadoghq.com/api/v2/app-builder/blueprintshttps://api.us3.datadoghq.com/api/v2/app-builder/blueprintshttps://api.us5.datadoghq.com/api/v2/app-builder/blueprints

    Présentation

    List available app blueprints. This endpoint requires any of the following permissions:

  • apps_run
  • apps_write
  • connections_read
  • connections_write

  • Arguments

    Chaînes de requête

    Nom

    Type

    Description

    limit

    integer

    The number of blueprints to return per page. Defaults to 10. Maximum is 100.

    page

    integer

    The page of results to return. Starts at 0.

    Réponse

    OK

    The response for listing available blueprints.

    Expand All

    Champ

    Type

    Description

    data

    [object]

    An array of blueprint metadata.

    attributes [required]

    object

    The attributes of a blueprint metadata resource.

    created_at [required]

    date-time

    The timestamp when the blueprint was created.

    description [required]

    string

    A description of what the blueprint does.

    name [required]

    string

    The human-readable name of the blueprint.

    slug [required]

    string

    The unique slug identifier of the blueprint.

    tags

    [string]

    Tags associated with the blueprint.

    tile_background

    string

    The background style of the blueprint tile.

    tile_icon_action_fqn

    string

    The fully qualified name of the action used as the tile icon.

    updated_at [required]

    date-time

    The timestamp when the blueprint was last updated.

    id [required]

    uuid

    The ID of the blueprint.

    type [required]

    enum

    The resource type for a blueprint. Allowed enum values: blueprint

    {
      "data": [
        {
          "attributes": {
            "created_at": "",
            "description": "",
            "name": "AWS Service Manager",
            "slug": "aws-service-manager",
            "tags": [],
            "tile_background": "string",
            "tile_icon_action_fqn": "string",
            "updated_at": ""
          },
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "type": "blueprint"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Curl command
    curl -X GET "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/app-builder/blueprints" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    GET https://api.ap1.datadoghq.com/api/v2/app-builder/blueprint/{blueprint_id}https://api.ap2.datadoghq.com/api/v2/app-builder/blueprint/{blueprint_id}https://api.datadoghq.eu/api/v2/app-builder/blueprint/{blueprint_id}https://api.ddog-gov.com/api/v2/app-builder/blueprint/{blueprint_id}https://api.us2.ddog-gov.com/api/v2/app-builder/blueprint/{blueprint_id}https://api.datadoghq.com/api/v2/app-builder/blueprint/{blueprint_id}https://api.us3.datadoghq.com/api/v2/app-builder/blueprint/{blueprint_id}https://api.us5.datadoghq.com/api/v2/app-builder/blueprint/{blueprint_id}

    Présentation

    Retrieve an app blueprint by its ID. This endpoint requires any of the following permissions:

  • apps_run
  • apps_write
  • connections_read
  • connections_write

  • Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    blueprint_id [required]

    string

    The ID of the blueprint to retrieve.

    Réponse

    OK

    The response for retrieving a single blueprint.

    Expand All

    Champ

    Type

    Description

    data

    object

    A blueprint resource.

    attributes [required]

    object

    The attributes of a blueprint resource.

    created_at [required]

    date-time

    The timestamp when the blueprint was created.

    definition [required]

    enum

    The app definition type. Allowed enum values: appDefinitions

    default: appDefinitions

    description [required]

    string

    A description of what the blueprint does.

    embedded_datastore_blueprints

    object

    Embedded datastore blueprints.

    embedded_native_actions

    [object]

    Embedded native actions.

    embedded_workflow_blueprints

    object

    Embedded workflow blueprints.

    integration_id

    string

    The integration ID associated with the blueprint.

    mocked_outputs

    object

    Mocked outputs for testing the blueprint.

    name [required]

    string

    The human-readable name of the blueprint.

    slug [required]

    string

    The unique slug identifier of the blueprint.

    tags

    [string]

    Tags associated with the blueprint.

    tile_background

    string

    The background style of the blueprint tile.

    tile_icon_action_fqn

    string

    The fully qualified name of the action used as the tile icon.

    updated_at [required]

    date-time

    The timestamp when the blueprint was last updated.

    id [required]

    uuid

    The ID of the blueprint.

    type [required]

    enum

    The resource type for a blueprint. Allowed enum values: blueprint

    {
      "data": {
        "attributes": {
          "created_at": "",
          "definition": "appDefinitions",
          "description": "",
          "embedded_datastore_blueprints": {},
          "embedded_native_actions": [],
          "embedded_workflow_blueprints": {},
          "integration_id": "string",
          "mocked_outputs": {},
          "name": "AWS Service Manager",
          "slug": "aws-service-manager",
          "tags": [],
          "tile_background": "string",
          "tile_icon_action_fqn": "string",
          "updated_at": ""
        },
        "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
        "type": "blueprint"
      }
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Not Found

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export blueprint_id="65bb1f25-52e1-4510-9f8d-22d1516ed693"
    # Curl command
    curl -X GET "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/app-builder/blueprint/${blueprint_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    GET https://api.ap1.datadoghq.com/api/v2/app-builder/blueprints/slugs/{slugs}https://api.ap2.datadoghq.com/api/v2/app-builder/blueprints/slugs/{slugs}https://api.datadoghq.eu/api/v2/app-builder/blueprints/slugs/{slugs}https://api.ddog-gov.com/api/v2/app-builder/blueprints/slugs/{slugs}https://api.us2.ddog-gov.com/api/v2/app-builder/blueprints/slugs/{slugs}https://api.datadoghq.com/api/v2/app-builder/blueprints/slugs/{slugs}https://api.us3.datadoghq.com/api/v2/app-builder/blueprints/slugs/{slugs}https://api.us5.datadoghq.com/api/v2/app-builder/blueprints/slugs/{slugs}

    Présentation

    Retrieve app blueprints by their slugs. This endpoint requires any of the following permissions:

  • apps_run
  • apps_write
  • connections_read
  • connections_write

  • Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    slugs [required]

    string

    A comma-separated list of blueprint slugs.

    Réponse

    OK

    The response for retrieving multiple blueprints.

    Expand All

    Champ

    Type

    Description

    data

    [object]

    An array of blueprints.

    attributes [required]

    object

    The attributes of a blueprint resource.

    created_at [required]

    date-time

    The timestamp when the blueprint was created.

    definition [required]

    enum

    The app definition type. Allowed enum values: appDefinitions

    default: appDefinitions

    description [required]

    string

    A description of what the blueprint does.

    embedded_datastore_blueprints

    object

    Embedded datastore blueprints.

    embedded_native_actions

    [object]

    Embedded native actions.

    embedded_workflow_blueprints

    object

    Embedded workflow blueprints.

    integration_id

    string

    The integration ID associated with the blueprint.

    mocked_outputs

    object

    Mocked outputs for testing the blueprint.

    name [required]

    string

    The human-readable name of the blueprint.

    slug [required]

    string

    The unique slug identifier of the blueprint.

    tags

    [string]

    Tags associated with the blueprint.

    tile_background

    string

    The background style of the blueprint tile.

    tile_icon_action_fqn

    string

    The fully qualified name of the action used as the tile icon.

    updated_at [required]

    date-time

    The timestamp when the blueprint was last updated.

    id [required]

    uuid

    The ID of the blueprint.

    type [required]

    enum

    The resource type for a blueprint. Allowed enum values: blueprint

    {
      "data": [
        {
          "attributes": {
            "created_at": "",
            "definition": "appDefinitions",
            "description": "",
            "embedded_datastore_blueprints": {},
            "embedded_native_actions": [],
            "embedded_workflow_blueprints": {},
            "integration_id": "string",
            "mocked_outputs": {},
            "name": "AWS Service Manager",
            "slug": "aws-service-manager",
            "tags": [],
            "tile_background": "string",
            "tile_icon_action_fqn": "string",
            "updated_at": ""
          },
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "type": "blueprint"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export slugs="aws-service-manager"
    # Curl command
    curl -X GET "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/app-builder/blueprints/slugs/${slugs}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    GET https://api.ap1.datadoghq.com/api/v2/app-builder/blueprints/integration-id/{integration_id}https://api.ap2.datadoghq.com/api/v2/app-builder/blueprints/integration-id/{integration_id}https://api.datadoghq.eu/api/v2/app-builder/blueprints/integration-id/{integration_id}https://api.ddog-gov.com/api/v2/app-builder/blueprints/integration-id/{integration_id}https://api.us2.ddog-gov.com/api/v2/app-builder/blueprints/integration-id/{integration_id}https://api.datadoghq.com/api/v2/app-builder/blueprints/integration-id/{integration_id}https://api.us3.datadoghq.com/api/v2/app-builder/blueprints/integration-id/{integration_id}https://api.us5.datadoghq.com/api/v2/app-builder/blueprints/integration-id/{integration_id}

    Présentation

    List app blueprints associated with a specific integration ID. This endpoint requires any of the following permissions:

  • apps_run
  • apps_write
  • connections_read
  • connections_write

  • Arguments

    Paramètres du chemin

    Nom

    Type

    Description

    integration_id [required]

    string

    The integration ID to filter blueprints by.

    Réponse

    OK

    The response for retrieving multiple blueprints.

    Expand All

    Champ

    Type

    Description

    data

    [object]

    An array of blueprints.

    attributes [required]

    object

    The attributes of a blueprint resource.

    created_at [required]

    date-time

    The timestamp when the blueprint was created.

    definition [required]

    enum

    The app definition type. Allowed enum values: appDefinitions

    default: appDefinitions

    description [required]

    string

    A description of what the blueprint does.

    embedded_datastore_blueprints

    object

    Embedded datastore blueprints.

    embedded_native_actions

    [object]

    Embedded native actions.

    embedded_workflow_blueprints

    object

    Embedded workflow blueprints.

    integration_id

    string

    The integration ID associated with the blueprint.

    mocked_outputs

    object

    Mocked outputs for testing the blueprint.

    name [required]

    string

    The human-readable name of the blueprint.

    slug [required]

    string

    The unique slug identifier of the blueprint.

    tags

    [string]

    Tags associated with the blueprint.

    tile_background

    string

    The background style of the blueprint tile.

    tile_icon_action_fqn

    string

    The fully qualified name of the action used as the tile icon.

    updated_at [required]

    date-time

    The timestamp when the blueprint was last updated.

    id [required]

    uuid

    The ID of the blueprint.

    type [required]

    enum

    The resource type for a blueprint. Allowed enum values: blueprint

    {
      "data": [
        {
          "attributes": {
            "created_at": "",
            "definition": "appDefinitions",
            "description": "",
            "embedded_datastore_blueprints": {},
            "embedded_native_actions": [],
            "embedded_workflow_blueprints": {},
            "integration_id": "string",
            "mocked_outputs": {},
            "name": "AWS Service Manager",
            "slug": "aws-service-manager",
            "tags": [],
            "tile_background": "string",
            "tile_icon_action_fqn": "string",
            "updated_at": ""
          },
          "id": "65bb1f25-52e1-4510-9f8d-22d1516ed693",
          "type": "blueprint"
        }
      ]
    }

    Forbidden

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [object]

    A list of errors.

    detail

    string

    A human-readable explanation specific to this occurrence of the error.

    meta

    object

    Non-standard meta-information about the error

    source

    object

    References to the source of the error.

    header

    string

    A string indicating the name of a single request header which caused the error.

    parameter

    string

    A string indicating which URI query parameter caused the error.

    pointer

    string

    A JSON pointer to the value in the request document that caused the error.

    status

    string

    Status code of the response.

    title

    string

    Short human-readable summary of the error.

    {
      "errors": [
        {
          "detail": "Missing required attribute in body",
          "meta": {},
          "source": {
            "header": "Authorization",
            "parameter": "limit",
            "pointer": "/data/attributes/title"
          },
          "status": "400",
          "title": "Bad Request"
        }
      ]
    }

    Too many requests

    API error response.

    Expand All

    Champ

    Type

    Description

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Exemple de code

                      # Path parameters
    export integration_id="aws"
    # Curl command
    curl -X GET "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/app-builder/blueprints/integration-id/${integration_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"