Dashboard Lists

Dashboard Lists

Interact with your dashboard lists through the API to organize, find, and share all of your dashboards with your team and organization.

GET https://api.datadoghq.eu/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.ddog-gov.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.us3.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards

Overview

Fetch the dashboard list’s dashboard definitions.

Arguments

Path Parameters

Name

Type

Description

dashboard_list_id [required]

integer

ID of the dashboard list to get items from.

Response

OK

Dashboards within a list.

Expand All

Field

Type

Description

dashboards [required]

[object]

List of dashboards in the dashboard list.

author

object

Creator of the object.

email

string

Email of the creator.

handle

string

Handle of the creator.

name

string

Name of the creator.

created

date-time

Date of creation of the dashboard.

icon

string

URL to the icon of the dashboard.

id [required]

string

ID of the dashboard.

is_favorite

boolean

Whether or not the dashboard is in the favorites.

is_read_only

boolean

Whether or not the dashboard is read only.

is_shared

boolean

Whether the dashboard is publicly shared or not.

modified

date-time

Date of last edition of the dashboard.

popularity

int32

Popularity of the dashboard.

title

string

Title of the dashboard.

type [required]

enum

The type of the dashboard. Allowed enum values: custom_timeboard,custom_screenboard,integration_screenboard,integration_timeboard,host_timeboard

url

string

URL path to the dashboard.

total

int64

Number of dashboards in the dashboard list.

{
  "dashboards": [
    {
      "author": {
        "email": "string",
        "handle": "string",
        "name": "string"
      },
      "created": "2019-09-19T10:00:00.000Z",
      "icon": "string",
      "id": "q5j-nti-fv6",
      "is_favorite": false,
      "is_read_only": false,
      "is_shared": false,
      "modified": "2019-09-19T10:00:00.000Z",
      "popularity": "integer",
      "title": "string",
      "type": "host_timeboard",
      "url": "string"
    }
  ],
  "total": "integer"
}

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example


# Path parameters
export dashboard_list_id="CHANGE_ME"
# Curl command curl -X GET "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v2/dashboard/lists/manual/${dashboard_list_id}/dashboards" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())

    dashboardListId := int64(789) // int64 | ID of the dashboard list to get items from.

    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.GetDashboardListItems(ctx, dashboardListId)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.GetDashboardListItems`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDashboardListItems`: DashboardListItems
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.GetDashboardListItems:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v2 import ApiClient, ApiException, Configuration
from datadog_api_client.v2.api import dashboard_lists_api
from datadog_api_client.v2.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)
    dashboard_list_id = 1  # int | ID of the dashboard list to get items from.

    # example passing only required values which don't have defaults set
    try:
        # Get items of a Dashboard List
        api_response = api_instance.get_dashboard_list_items(dashboard_list_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->get_dashboard_list_items: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V2::DashboardListsAPI.new
dashboard_list_id = 789 # Integer | ID of the dashboard list to get items from.

begin
  # Get items of a Dashboard List
  result = api_instance.get_dashboard_list_items(dashboard_list_id)
  p result
rescue DatadogAPIClient::V2::APIError => e
  puts "Error when calling DashboardListsAPI->get_dashboard_list_items: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v2.client.ApiClient;
import com.datadog.api.v2.client.ApiException;
import com.datadog.api.v2.client.Configuration;
import com.datadog.api.v2.client.model.*;
import com.datadog.api.v2.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        Long dashboardListId = 56L; // Long | ID of the dashboard list to get items from.
        try {
            DashboardListItems result = apiInstance.getDashboardListItems(dashboardListId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#getDashboardListItems");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.DashboardList.v2.get_items(4741)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python "example.py"
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

result = dog.v2.get_items_of_dashboard_list(4741)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

GET https://api.datadoghq.eu/api/v1/dashboard/lists/manualhttps://api.ddog-gov.com/api/v1/dashboard/lists/manualhttps://api.datadoghq.com/api/v1/dashboard/lists/manualhttps://api.us3.datadoghq.com/api/v1/dashboard/lists/manual

Overview

Fetch all of your existing dashboard list definitions.

Response

OK

Information on your dashboard lists.

Expand All

Field

Type

Description

dashboard_lists

[object]

List of all your dashboard lists.

author

object

Object describing the creator of the shared element.

email

string

Email of the creator.

handle

string

Handle of the creator.

name [required]

string

Name of the creator.

created

date-time

Date of creation of the dashboard list.

dashboard_count

int64

The number of dashboards in the list.

id

int64

The ID of the dashboard list.

is_favorite

boolean

Whether or not the list is in the favorites.

modified

date-time

Date of last edition of the dashboard list.

name [required]

string

The name of the dashboard list.

type

string

The type of dashboard list.

{
  "dashboard_lists": [
    {
      "author": {
        "email": "string",
        "handle": "string",
        "name": "string"
      },
      "created": "2019-09-19T10:00:00.000Z",
      "dashboard_count": "integer",
      "id": "integer",
      "is_favorite": false,
      "modified": "2019-09-19T10:00:00.000Z",
      "name": "My Dashboard",
      "type": "manual_dashboard_list"
    }
  ]
}

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


# Curl command
curl -X GET "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v1/dashboard/lists/manual" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())


    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.ListDashboardLists(ctx)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.ListDashboardLists`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListDashboardLists`: DashboardListListResponse
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.ListDashboardLists:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import dashboard_lists_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)

    # example, this endpoint has no required or optional parameters
    try:
        # Get all dashboard lists
        api_response = api_instance.list_dashboard_lists()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->list_dashboard_lists: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V1::DashboardListsAPI.new

begin
  # Get all dashboard lists
  result = api_instance.list_dashboard_lists
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling DashboardListsAPI->list_dashboard_lists: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        try {
            DashboardListListResponse result = apiInstance.listDashboardLists();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#listDashboardLists");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.DashboardList.get_all()

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python "example.py"
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

result = dog.get_all_dashboard_lists()

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

POST https://api.datadoghq.eu/api/v1/dashboard/lists/manualhttps://api.ddog-gov.com/api/v1/dashboard/lists/manualhttps://api.datadoghq.com/api/v1/dashboard/lists/manualhttps://api.us3.datadoghq.com/api/v1/dashboard/lists/manual

Overview

Create an empty dashboard list.

Request

Body Data (required)

Create a dashboard list request body.

Expand All

Field

Type

Description

author

object

Object describing the creator of the shared element.

email

string

Email of the creator.

handle

string

Handle of the creator.

name [required]

string

Name of the creator.

created

date-time

Date of creation of the dashboard list.

dashboard_count

int64

The number of dashboards in the list.

id

int64

The ID of the dashboard list.

is_favorite

boolean

Whether or not the list is in the favorites.

modified

date-time

Date of last edition of the dashboard list.

name [required]

string

The name of the dashboard list.

type

string

The type of dashboard list.

{
  "name": "My Dashboard"
}

Response

OK

Your Datadog Dashboards.

Expand All

Field

Type

Description

author

object

Object describing the creator of the shared element.

email

string

Email of the creator.

handle

string

Handle of the creator.

name [required]

string

Name of the creator.

created

date-time

Date of creation of the dashboard list.

dashboard_count

int64

The number of dashboards in the list.

id

int64

The ID of the dashboard list.

is_favorite

boolean

Whether or not the list is in the favorites.

modified

date-time

Date of last edition of the dashboard list.

name [required]

string

The name of the dashboard list.

type

string

The type of dashboard list.

{
  "author": {
    "email": "string",
    "handle": "string",
    "name": "string"
  },
  "created": "2019-09-19T10:00:00.000Z",
  "dashboard_count": "integer",
  "id": "integer",
  "is_favorite": false,
  "modified": "2019-09-19T10:00:00.000Z",
  "name": "My Dashboard",
  "type": "manual_dashboard_list"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


# Curl command
curl -X POST "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v1/dashboard/lists/manual" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "name": "My Dashboard"
}
EOF
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())

    body := *datadog.NewDashboardList("My Dashboard") // DashboardList | Create a dashboard list request body.

    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.CreateDashboardList(ctx, body)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.CreateDashboardList`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateDashboardList`: DashboardList
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.CreateDashboardList:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import dashboard_lists_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)
    body = DashboardList(
        author=Creator(
            email="email_example",
            handle="handle_example",
            name="name_example",
        ),
        created=dateutil_parser('1970-01-01T00:00:00.00Z'),
        dashboard_count=1,
        id=1,
        is_favorite=True,
        modified=dateutil_parser('1970-01-01T00:00:00.00Z'),
        name="My Dashboard",
        type="manual_dashboard_list",
    )  # DashboardList | Create a dashboard list request body.

    # example passing only required values which don't have defaults set
    try:
        # Create a dashboard list
        api_response = api_instance.create_dashboard_list(body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->create_dashboard_list: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V1::DashboardListsAPI.new
body = DatadogAPIClient::V1::DashboardList.new({name: 'My Dashboard'}) # DashboardList | Create a dashboard list request body.

begin
  # Create a dashboard list
  result = api_instance.create_dashboard_list(body)
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling DashboardListsAPI->create_dashboard_list: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        DashboardList body = new DashboardList(); // DashboardList | Create a dashboard list request body.
        try {
            DashboardList result = apiInstance.createDashboardList(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#createDashboardList");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

name = 'My Dashboard List'

api.DashboardList.create(name=name)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python "example.py"
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

name = 'My Dashboard List'

result = dog.create_dashboard_list(name)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

POST https://api.datadoghq.eu/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.ddog-gov.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.us3.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards

Overview

Add dashboards to an existing dashboard list.

Arguments

Path Parameters

Name

Type

Description

dashboard_list_id [required]

integer

ID of the dashboard list to add items to.

Request

Body Data (required)

Dashboards to add to the dashboard list.

Expand All

Field

Type

Description

dashboards

[object]

List of dashboards to add the dashboard list.

id [required]

string

ID of the dashboard.

type [required]

enum

The type of the dashboard. Allowed enum values: custom_timeboard,custom_screenboard,integration_screenboard,integration_timeboard,host_timeboard

{
  "dashboards": [
    {
      "id": "q5j-nti-fv6",
      "type": "host_timeboard"
    }
  ]
}

Response

OK

Response containing a list of added dashboards.

Expand All

Field

Type

Description

added_dashboards_to_list

[object]

List of dashboards added to the dashboard list.

id [required]

string

ID of the dashboard.

type [required]

enum

The type of the dashboard. Allowed enum values: custom_timeboard,custom_screenboard,integration_screenboard,integration_timeboard,host_timeboard

{
  "added_dashboards_to_list": [
    {
      "id": "q5j-nti-fv6",
      "type": "host_timeboard"
    }
  ]
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example


# Path parameters
export dashboard_list_id="CHANGE_ME"
# Curl command curl -X POST "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v2/dashboard/lists/manual/${dashboard_list_id}/dashboards" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "dashboards": [ { "id": "q5j-nti-fv6", "type": "host_timeboard" } ] } EOF
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())

    dashboardListId := int64(789) // int64 | ID of the dashboard list to add items to.
    body := *datadog.NewDashboardListAddItemsRequest() // DashboardListAddItemsRequest | Dashboards to add to the dashboard list.

    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.CreateDashboardListItems(ctx, dashboardListId, body)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.CreateDashboardListItems`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateDashboardListItems`: DashboardListAddItemsResponse
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.CreateDashboardListItems:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v2 import ApiClient, ApiException, Configuration
from datadog_api_client.v2.api import dashboard_lists_api
from datadog_api_client.v2.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)
    dashboard_list_id = 1  # int | ID of the dashboard list to add items to.
    body = DashboardListAddItemsRequest(
        dashboards=[
            DashboardListItemRequest(
                id="q5j-nti-fv6",
                type=DashboardType("host_timeboard"),
            ),
        ],
    )  # DashboardListAddItemsRequest | Dashboards to add to the dashboard list.

    # example passing only required values which don't have defaults set
    try:
        # Add Items to a Dashboard List
        api_response = api_instance.create_dashboard_list_items(dashboard_list_id, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->create_dashboard_list_items: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V2::DashboardListsAPI.new
dashboard_list_id = 789 # Integer | ID of the dashboard list to add items to.
body = DatadogAPIClient::V2::DashboardListAddItemsRequest.new # DashboardListAddItemsRequest | Dashboards to add to the dashboard list.

begin
  # Add Items to a Dashboard List
  result = api_instance.create_dashboard_list_items(dashboard_list_id, body)
  p result
rescue DatadogAPIClient::V2::APIError => e
  puts "Error when calling DashboardListsAPI->create_dashboard_list_items: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v2.client.ApiClient;
import com.datadog.api.v2.client.ApiException;
import com.datadog.api.v2.client.Configuration;
import com.datadog.api.v2.client.model.*;
import com.datadog.api.v2.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        Long dashboardListId = 56L; // Long | ID of the dashboard list to add items to.
        DashboardListAddItemsRequest body = new DashboardListAddItemsRequest(); // DashboardListAddItemsRequest | Dashboards to add to the dashboard list.
        try {
            DashboardListAddItemsResponse result = apiInstance.createDashboardListItems(dashboardListId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#createDashboardListItems");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

list_id = 4741
dashboards = [
    {
        'type': 'custom_screenboard',
        'id': 'rys-xwq-geh'
    },
    {
        'type': 'custom_timeboard',
        'id': 'qts-q2k-yq6'
    },
    {
        'type': 'integration_screenboard',
        'id': '87'
    },
    {
        'type': 'integration_timeboard',
        'id': '23'
    },
    {
        'type': 'host_timeboard',
        'id': '3245468'
    }
]

api.DashboardList.v2.add_items(list_id, dashboards=dashboards)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python "example.py"
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

list_id = 4741
dashboards = [
    {
        "type" => "custom_screenboard",
        "id" => "rys-xwq-geh"
    },
    {
        "type" => "custom_timeboard",
        "id" => "qts-q2k-yq6"
    },
    {
        "type" => "integration_screenboard",
        "id" => "87"
    },
    {
        "type" => "integration_timeboard",
        "id" => "23"
    },
    {
        "type" => "host_timeboard",
        "id" => "3245468"
    }
]

result = dog.v2.add_items_to_dashboard_list(list_id, dashboards)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

PUT https://api.datadoghq.eu/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.ddog-gov.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.us3.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards

Overview

Update dashboards of an existing dashboard list.

Arguments

Path Parameters

Name

Type

Description

dashboard_list_id [required]

integer

ID of the dashboard list to update items from.

Request

Body Data (required)

New dashboards of the dashboard list.

Expand All

Field

Type

Description

dashboards

[object]

List of dashboards to update the dashboard list to.

id [required]

string

ID of the dashboard.

type [required]

enum

The type of the dashboard. Allowed enum values: custom_timeboard,custom_screenboard,integration_screenboard,integration_timeboard,host_timeboard

{
  "dashboards": [
    {
      "id": "q5j-nti-fv6",
      "type": "host_timeboard"
    }
  ]
}

Response

OK

Response containing a list of updated dashboards.

Expand All

Field

Type

Description

dashboards

[object]

List of dashboards in the dashboard list.

id [required]

string

ID of the dashboard.

type [required]

enum

The type of the dashboard. Allowed enum values: custom_timeboard,custom_screenboard,integration_screenboard,integration_timeboard,host_timeboard

{
  "dashboards": [
    {
      "id": "q5j-nti-fv6",
      "type": "host_timeboard"
    }
  ]
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example


# Path parameters
export dashboard_list_id="CHANGE_ME"
# Curl command curl -X PUT "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v2/dashboard/lists/manual/${dashboard_list_id}/dashboards" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "dashboards": [ { "id": "q5j-nti-fv6", "type": "host_timeboard" } ] } EOF
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())

    dashboardListId := int64(789) // int64 | ID of the dashboard list to update items from.
    body := *datadog.NewDashboardListUpdateItemsRequest() // DashboardListUpdateItemsRequest | New dashboards of the dashboard list.

    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.UpdateDashboardListItems(ctx, dashboardListId, body)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.UpdateDashboardListItems`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateDashboardListItems`: DashboardListUpdateItemsResponse
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.UpdateDashboardListItems:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v2 import ApiClient, ApiException, Configuration
from datadog_api_client.v2.api import dashboard_lists_api
from datadog_api_client.v2.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)
    dashboard_list_id = 1  # int | ID of the dashboard list to update items from.
    body = DashboardListUpdateItemsRequest(
        dashboards=[
            DashboardListItemRequest(
                id="q5j-nti-fv6",
                type=DashboardType("host_timeboard"),
            ),
        ],
    )  # DashboardListUpdateItemsRequest | New dashboards of the dashboard list.

    # example passing only required values which don't have defaults set
    try:
        # Update items of a dashboard list
        api_response = api_instance.update_dashboard_list_items(dashboard_list_id, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->update_dashboard_list_items: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V2::DashboardListsAPI.new
dashboard_list_id = 789 # Integer | ID of the dashboard list to update items from.
body = DatadogAPIClient::V2::DashboardListUpdateItemsRequest.new # DashboardListUpdateItemsRequest | New dashboards of the dashboard list.

begin
  # Update items of a dashboard list
  result = api_instance.update_dashboard_list_items(dashboard_list_id, body)
  p result
rescue DatadogAPIClient::V2::APIError => e
  puts "Error when calling DashboardListsAPI->update_dashboard_list_items: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v2.client.ApiClient;
import com.datadog.api.v2.client.ApiException;
import com.datadog.api.v2.client.Configuration;
import com.datadog.api.v2.client.model.*;
import com.datadog.api.v2.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        Long dashboardListId = 56L; // Long | ID of the dashboard list to update items from.
        DashboardListUpdateItemsRequest body = new DashboardListUpdateItemsRequest(); // DashboardListUpdateItemsRequest | New dashboards of the dashboard list.
        try {
            DashboardListUpdateItemsResponse result = apiInstance.updateDashboardListItems(dashboardListId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#updateDashboardListItems");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"

GET https://api.datadoghq.eu/api/v1/dashboard/lists/manual/{list_id}https://api.ddog-gov.com/api/v1/dashboard/lists/manual/{list_id}https://api.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}https://api.us3.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}

Overview

Fetch an existing dashboard list’s definition.

Arguments

Path Parameters

Name

Type

Description

list_id [required]

integer

ID of the dashboard list to fetch.

Response

OK

Your Datadog Dashboards.

Expand All

Field

Type

Description

author

object

Object describing the creator of the shared element.

email

string

Email of the creator.

handle

string

Handle of the creator.

name [required]

string

Name of the creator.

created

date-time

Date of creation of the dashboard list.

dashboard_count

int64

The number of dashboards in the list.

id

int64

The ID of the dashboard list.

is_favorite

boolean

Whether or not the list is in the favorites.

modified

date-time

Date of last edition of the dashboard list.

name [required]

string

The name of the dashboard list.

type

string

The type of dashboard list.

{
  "author": {
    "email": "string",
    "handle": "string",
    "name": "string"
  },
  "created": "2019-09-19T10:00:00.000Z",
  "dashboard_count": "integer",
  "id": "integer",
  "is_favorite": false,
  "modified": "2019-09-19T10:00:00.000Z",
  "name": "My Dashboard",
  "type": "manual_dashboard_list"
}

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


# Path parameters
export list_id="CHANGE_ME"
# Curl command curl -X GET "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v1/dashboard/lists/manual/${list_id}" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())

    listId := int64(789) // int64 | ID of the dashboard list to fetch.

    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.GetDashboardList(ctx, listId)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.GetDashboardList`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDashboardList`: DashboardList
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.GetDashboardList:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import dashboard_lists_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)
    list_id = 1  # int | ID of the dashboard list to fetch.

    # example passing only required values which don't have defaults set
    try:
        # Get a dashboard list
        api_response = api_instance.get_dashboard_list(list_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->get_dashboard_list: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V1::DashboardListsAPI.new
list_id = 789 # Integer | ID of the dashboard list to fetch.

begin
  # Get a dashboard list
  result = api_instance.get_dashboard_list(list_id)
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling DashboardListsAPI->get_dashboard_list: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        Long listId = 56L; // Long | ID of the dashboard list to fetch.
        try {
            DashboardList result = apiInstance.getDashboardList(listId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#getDashboardList");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.DashboardList.get(4741)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python "example.py"
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

result = dog.get_dashboard_list(4741)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

DELETE https://api.datadoghq.eu/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.ddog-gov.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://api.us3.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards

Overview

Delete dashboards from an existing dashboard list.

Arguments

Path Parameters

Name

Type

Description

dashboard_list_id [required]

integer

ID of the dashboard list to delete items from.

Request

Body Data (required)

Dashboards to delete from the dashboard list.

Expand All

Field

Type

Description

dashboards

[object]

List of dashboards to delete from the dashboard list.

id [required]

string

ID of the dashboard.

type [required]

enum

The type of the dashboard. Allowed enum values: custom_timeboard,custom_screenboard,integration_screenboard,integration_timeboard,host_timeboard

{
  "dashboards": [
    {
      "id": "q5j-nti-fv6",
      "type": "host_timeboard"
    }
  ]
}

Response

OK

Response containing a list of deleted dashboards.

Expand All

Field

Type

Description

deleted_dashboards_from_list

[object]

List of dashboards deleted from the dashboard list.

id [required]

string

ID of the dashboard.

type [required]

enum

The type of the dashboard. Allowed enum values: custom_timeboard,custom_screenboard,integration_screenboard,integration_timeboard,host_timeboard

{
  "deleted_dashboards_from_list": [
    {
      "id": "q5j-nti-fv6",
      "type": "host_timeboard"
    }
  ]
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example


# Path parameters
export dashboard_list_id="CHANGE_ME"
# Curl command curl -X DELETE "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v2/dashboard/lists/manual/${dashboard_list_id}/dashboards" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "dashboards": [ { "id": "q5j-nti-fv6", "type": "host_timeboard" } ] } EOF
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v2/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())

    dashboardListId := int64(789) // int64 | ID of the dashboard list to delete items from.
    body := *datadog.NewDashboardListDeleteItemsRequest() // DashboardListDeleteItemsRequest | Dashboards to delete from the dashboard list.

    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.DeleteDashboardListItems(ctx, dashboardListId, body)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.DeleteDashboardListItems`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteDashboardListItems`: DashboardListDeleteItemsResponse
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.DeleteDashboardListItems:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v2 import ApiClient, ApiException, Configuration
from datadog_api_client.v2.api import dashboard_lists_api
from datadog_api_client.v2.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)
    dashboard_list_id = 1  # int | ID of the dashboard list to delete items from.
    body = DashboardListDeleteItemsRequest(
        dashboards=[
            DashboardListItemRequest(
                id="q5j-nti-fv6",
                type=DashboardType("host_timeboard"),
            ),
        ],
    )  # DashboardListDeleteItemsRequest | Dashboards to delete from the dashboard list.

    # example passing only required values which don't have defaults set
    try:
        # Delete items from a dashboard list
        api_response = api_instance.delete_dashboard_list_items(dashboard_list_id, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->delete_dashboard_list_items: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V2::DashboardListsAPI.new
dashboard_list_id = 789 # Integer | ID of the dashboard list to delete items from.
body = DatadogAPIClient::V2::DashboardListDeleteItemsRequest.new # DashboardListDeleteItemsRequest | Dashboards to delete from the dashboard list.

begin
  # Delete items from a dashboard list
  result = api_instance.delete_dashboard_list_items(dashboard_list_id, body)
  p result
rescue DatadogAPIClient::V2::APIError => e
  puts "Error when calling DashboardListsAPI->delete_dashboard_list_items: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v2.client.ApiClient;
import com.datadog.api.v2.client.ApiException;
import com.datadog.api.v2.client.Configuration;
import com.datadog.api.v2.client.model.*;
import com.datadog.api.v2.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        Long dashboardListId = 56L; // Long | ID of the dashboard list to delete items from.
        DashboardListDeleteItemsRequest body = new DashboardListDeleteItemsRequest(); // DashboardListDeleteItemsRequest | Dashboards to delete from the dashboard list.
        try {
            DashboardListDeleteItemsResponse result = apiInstance.deleteDashboardListItems(dashboardListId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#deleteDashboardListItems");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

list_id = 4741
dashboards = [
    {
        'type': 'custom_screenboard',
        'id': 'rys-xwq-geh'
    },
    {
        'type': 'custom_timeboard',
        'id': 'qts-q2k-yq6'
    },
    {
        'type': 'integration_screenboard',
        'id': '87'
    },
    {
        'type': 'integration_timeboard',
        'id': '23'
    },
    {
        'type': 'host_timeboard',
        'id': '3245468'
    }
]

api.DashboardList.v2.delete_items(list_id, dashboards=dashboards)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python "example.py"
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

list_id = 4741
dashboards = [
    {
        "type" => "custom_screenboard",
        "id" => "rys-xwq-geh"
    },
    {
        "type" => "custom_timeboard",
        "id" => "qts-q2k-yq6"
    },
    {
        "type" => "integration_screenboard",
        "id" => "87"
    },
    {
        "type" => "integration_timeboard",
        "id" => "23"
    },
    {
        "type" => "host_timeboard",
        "id" => "3245468"
    }
]

result = dog.v2.delete_items_from_dashboard_list(list_id, dashboards)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

PUT https://api.datadoghq.eu/api/v1/dashboard/lists/manual/{list_id}https://api.ddog-gov.com/api/v1/dashboard/lists/manual/{list_id}https://api.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}https://api.us3.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}

Overview

Update the name of a dashboard list.

Arguments

Path Parameters

Name

Type

Description

list_id [required]

integer

ID of the dashboard list to update.

Request

Body Data (required)

Update a dashboard list request body.

Expand All

Field

Type

Description

author

object

Object describing the creator of the shared element.

email

string

Email of the creator.

handle

string

Handle of the creator.

name [required]

string

Name of the creator.

created

date-time

Date of creation of the dashboard list.

dashboard_count

int64

The number of dashboards in the list.

id

int64

The ID of the dashboard list.

is_favorite

boolean

Whether or not the list is in the favorites.

modified

date-time

Date of last edition of the dashboard list.

name [required]

string

The name of the dashboard list.

type

string

The type of dashboard list.

{
  "name": "My Dashboard"
}

Response

OK

Your Datadog Dashboards.

Expand All

Field

Type

Description

author

object

Object describing the creator of the shared element.

email

string

Email of the creator.

handle

string

Handle of the creator.

name [required]

string

Name of the creator.

created

date-time

Date of creation of the dashboard list.

dashboard_count

int64

The number of dashboards in the list.

id

int64

The ID of the dashboard list.

is_favorite

boolean

Whether or not the list is in the favorites.

modified

date-time

Date of last edition of the dashboard list.

name [required]

string

The name of the dashboard list.

type

string

The type of dashboard list.

{
  "author": {
    "email": "string",
    "handle": "string",
    "name": "string"
  },
  "created": "2019-09-19T10:00:00.000Z",
  "dashboard_count": "integer",
  "id": "integer",
  "is_favorite": false,
  "modified": "2019-09-19T10:00:00.000Z",
  "name": "My Dashboard",
  "type": "manual_dashboard_list"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


# Path parameters
export list_id="CHANGE_ME"
# Curl command curl -X PUT "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v1/dashboard/lists/manual/${list_id}" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "name": "My Dashboard" } EOF
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())

    listId := int64(789) // int64 | ID of the dashboard list to update.
    body := *datadog.NewDashboardList("My Dashboard") // DashboardList | Update a dashboard list request body.

    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.UpdateDashboardList(ctx, listId, body)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.UpdateDashboardList`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateDashboardList`: DashboardList
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.UpdateDashboardList:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import dashboard_lists_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)
    list_id = 1  # int | ID of the dashboard list to update.
    body = DashboardList(
        author=Creator(
            email="email_example",
            handle="handle_example",
            name="name_example",
        ),
        created=dateutil_parser('1970-01-01T00:00:00.00Z'),
        dashboard_count=1,
        id=1,
        is_favorite=True,
        modified=dateutil_parser('1970-01-01T00:00:00.00Z'),
        name="My Dashboard",
        type="manual_dashboard_list",
    )  # DashboardList | Update a dashboard list request body.

    # example passing only required values which don't have defaults set
    try:
        # Update a dashboard list
        api_response = api_instance.update_dashboard_list(list_id, body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->update_dashboard_list: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V1::DashboardListsAPI.new
list_id = 789 # Integer | ID of the dashboard list to update.
body = DatadogAPIClient::V1::DashboardList.new({name: 'My Dashboard'}) # DashboardList | Update a dashboard list request body.

begin
  # Update a dashboard list
  result = api_instance.update_dashboard_list(list_id, body)
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling DashboardListsAPI->update_dashboard_list: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        Long listId = 56L; // Long | ID of the dashboard list to update.
        DashboardList body = new DashboardList(); // DashboardList | Update a dashboard list request body.
        try {
            DashboardList result = apiInstance.updateDashboardList(listId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#updateDashboardList");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"

DELETE https://api.datadoghq.eu/api/v1/dashboard/lists/manual/{list_id}https://api.ddog-gov.com/api/v1/dashboard/lists/manual/{list_id}https://api.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}https://api.us3.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}

Overview

Delete a dashboard list.

Arguments

Path Parameters

Name

Type

Description

list_id [required]

integer

ID of the dashboard list to delete.

Response

OK

Deleted dashboard details.

Expand All

Field

Type

Description

deleted_dashboard_list_id

int64

ID of the deleted dashboard list.

{
  "deleted_dashboard_list_id": "integer"
}

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


# Path parameters
export list_id="CHANGE_ME"
# Curl command curl -X DELETE "https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com/api/v1/dashboard/lists/manual/${list_id}" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := datadog.NewDefaultContext(context.Background())

    listId := int64(789) // int64 | ID of the dashboard list to delete.

    configuration := datadog.NewConfiguration()

    apiClient := datadog.NewAPIClient(configuration)
    resp, r, err := apiClient.DashboardListsApi.DeleteDashboardList(ctx, listId)
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DashboardListsApi.DeleteDashboardList`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteDashboardList`: DashboardListDeleteResponse
    responseContent, _ := json.MarshalIndent(resp, "", "  ")
    fmt.Fprintf(os.Stdout, "Response from DashboardListsApi.DeleteDashboardList:\n%s\n", responseContent)
}

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
import os
from dateutil.parser import parse as dateutil_parser
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
from datadog_api_client.v1.api import dashboard_lists_api
from datadog_api_client.v1.models import *
from pprint import pprint
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration()

# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = dashboard_lists_api.DashboardListsApi(api_client)
    list_id = 1  # int | ID of the dashboard list to delete.

    # example passing only required values which don't have defaults set
    try:
        # Delete a dashboard list
        api_response = api_instance.delete_dashboard_list(list_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DashboardListsApi->delete_dashboard_list: %s\n" % e)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
require 'datadog_api_client'
api_instance = DatadogAPIClient::V1::DashboardListsAPI.new
list_id = 789 # Integer | ID of the dashboard list to delete.

begin
  # Delete a dashboard list
  result = api_instance.delete_dashboard_list(list_id)
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling DashboardListsAPI->delete_dashboard_list: #{e}"
end

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
import java.util.*;
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.DashboardListsApi;

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

        DashboardListsApi apiInstance = new DashboardListsApi(defaultClient);
        Long listId = 56L; // Long | ID of the dashboard list to delete.
        try {
            DashboardListDeleteResponse result = apiInstance.deleteDashboardList(listId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DashboardListsApi#deleteDashboardList");
            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:

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.DashboardList.delete(4741)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python "example.py"
require 'rubygems'
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

result = dog.delete_dashboard_list(4741)

Instructions

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

              
export DD_SITE="datadoghq.comus3.datadoghq.comdatadoghq.euddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"