이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

대시보드 목록의 항목 얻기

API를 사용해 대시보드 목록과 상호 작용하여 대시보드 전체를 구성 및 검색하고 팀과 조직에 공유할 수 있습니다.

GET https://api.ap1.datadoghq.com/api/v1/dashboard/lists/manualhttps://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/manualhttps://api.us5.datadoghq.com/api/v1/dashboard/lists/manual

개요

Fetch all of your existing dashboard list definitions. This endpoint requires the dashboards_read permission.

OAuth apps require the dashboards_read authorization scope to access this endpoint.

응답

OK

Information on your dashboard lists.

Expand All

항목

유형

설명

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

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

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

// Get all dashboard lists returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardListsApi;
import com.datadog.api.client.v1.model.DashboardListListResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"

GET https://api.ap1.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://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}/dashboardshttps://api.us5.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards

개요

Fetch the dashboard list’s dashboard definitions. This endpoint requires the dashboards_read permission.

OAuth apps require the dashboards_read authorization scope to access this endpoint.

인수

경로 파라미터

이름

유형

설명

dashboard_list_id [required]

integer

ID of the dashboard list to get items from.

응답

OK

Dashboards within a list.

Expand All

항목

유형

설명

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.

integration_id

string

The short name of the integration.

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.

tags

[string]

List of team names representing ownership of a 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",
      "integration_id": "string",
      "is_favorite": false,
      "is_read_only": false,
      "is_shared": false,
      "modified": "2019-09-19T10:00:00.000Z",
      "popularity": "integer",
      "tags": [],
      "title": "string",
      "type": "host_timeboard",
      "url": "string"
    }
  ],
  "total": "integer"
}

Forbidden

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

// Get items of a Dashboard List returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DashboardListsApi;
import com.datadog.api.client.v2.model.DashboardListItems;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    try {
      DashboardListItems result = apiInstance.getDashboardListItems(DASHBOARD_LIST_ID);
      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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"

POST https://api.ap1.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://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}/dashboardshttps://api.us5.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards

개요

Add dashboards to an existing dashboard list.

인수

경로 파라미터

이름

유형

설명

dashboard_list_id [required]

integer

ID of the dashboard list to add items to.

요청

Body Data (required)

Dashboards to add to the dashboard list.

Expand All

항목

유형

설명

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": "123-abc-456",
      "type": "custom_screenboard"
    }
  ]
}
{
  "dashboards": [
    {
      "id": "123-abc-456",
      "type": "custom_timeboard"
    }
  ]
}

응답

OK

Response containing a list of added dashboards.

Expand All

항목

유형

설명

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

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

// Add custom screenboard dashboard to an existing dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DashboardListsApi;
import com.datadog.api.client.v2.model.DashboardListAddItemsRequest;
import com.datadog.api.client.v2.model.DashboardListAddItemsResponse;
import com.datadog.api.client.v2.model.DashboardListItemRequest;
import com.datadog.api.client.v2.model.DashboardType;
import java.util.Collections;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    // there is a valid "screenboard_dashboard" in the system
    String SCREENBOARD_DASHBOARD_ID = System.getenv("SCREENBOARD_DASHBOARD_ID");

    DashboardListAddItemsRequest body =
        new DashboardListAddItemsRequest()
            .dashboards(
                Collections.singletonList(
                    new DashboardListItemRequest()
                        .id(SCREENBOARD_DASHBOARD_ID)
                        .type(DashboardType.CUSTOM_SCREENBOARD)));

    try {
      DashboardListAddItemsResponse result =
          apiInstance.createDashboardListItems(DASHBOARD_LIST_ID, 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();
    }
  }
}
// Add custom timeboard dashboard to an existing dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DashboardListsApi;
import com.datadog.api.client.v2.model.DashboardListAddItemsRequest;
import com.datadog.api.client.v2.model.DashboardListAddItemsResponse;
import com.datadog.api.client.v2.model.DashboardListItemRequest;
import com.datadog.api.client.v2.model.DashboardType;
import java.util.Collections;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    // there is a valid "dashboard" in the system
    String DASHBOARD_ID = System.getenv("DASHBOARD_ID");

    DashboardListAddItemsRequest body =
        new DashboardListAddItemsRequest()
            .dashboards(
                Collections.singletonList(
                    new DashboardListItemRequest()
                        .id(DASHBOARD_ID)
                        .type(DashboardType.CUSTOM_TIMEBOARD)));

    try {
      DashboardListAddItemsResponse result =
          apiInstance.createDashboardListItems(DASHBOARD_LIST_ID, 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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"

POST https://api.ap1.datadoghq.com/api/v1/dashboard/lists/manualhttps://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/manualhttps://api.us5.datadoghq.com/api/v1/dashboard/lists/manual

개요

Create an empty dashboard list. This endpoint requires the dashboards_write permission.

OAuth apps require the dashboards_write authorization scope to access this endpoint.

요청

Body Data (required)

Create a dashboard list request body.

Expand All

항목

유형

설명

author

object

Object describing the creator of the shared element.

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 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": "Example-Dashboard-List"
}

응답

OK

Your Datadog Dashboards.

Expand All

항목

유형

설명

author

object

Object describing the creator of the shared element.

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 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

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

// Create a dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardListsApi;
import com.datadog.api.client.v1.model.DashboardList;

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

    DashboardList body = new DashboardList().name("Example-Dashboard-List");

    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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"

GET https://api.ap1.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}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}https://api.us5.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}

개요

Fetch an existing dashboard list’s definition. This endpoint requires the dashboards_read permission.

OAuth apps require the dashboards_read authorization scope to access this endpoint.

인수

경로 파라미터

이름

유형

설명

list_id [required]

integer

ID of the dashboard list to fetch.

응답

OK

Your Datadog Dashboards.

Expand All

항목

유형

설명

author

object

Object describing the creator of the shared element.

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 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

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Not Found

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

// Get a dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardListsApi;
import com.datadog.api.client.v1.model.DashboardList;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    try {
      DashboardList result = apiInstance.getDashboardList(DASHBOARD_LIST_ID);
      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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"

PUT https://api.ap1.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://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}/dashboardshttps://api.us5.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards

개요

Update dashboards of an existing dashboard list.

인수

경로 파라미터

이름

유형

설명

dashboard_list_id [required]

integer

ID of the dashboard list to update items from.

요청

Body Data (required)

New dashboards of the dashboard list.

Expand All

항목

유형

설명

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": "123-abc-456",
      "type": "custom_screenboard"
    }
  ]
}

응답

OK

Response containing a list of updated dashboards.

Expand All

항목

유형

설명

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

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

// Update items of a dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DashboardListsApi;
import com.datadog.api.client.v2.model.DashboardListItemRequest;
import com.datadog.api.client.v2.model.DashboardListUpdateItemsRequest;
import com.datadog.api.client.v2.model.DashboardListUpdateItemsResponse;
import com.datadog.api.client.v2.model.DashboardType;
import java.util.Collections;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    // there is a valid "screenboard_dashboard" in the system
    String SCREENBOARD_DASHBOARD_ID = System.getenv("SCREENBOARD_DASHBOARD_ID");

    DashboardListUpdateItemsRequest body =
        new DashboardListUpdateItemsRequest()
            .dashboards(
                Collections.singletonList(
                    new DashboardListItemRequest()
                        .id(SCREENBOARD_DASHBOARD_ID)
                        .type(DashboardType.CUSTOM_SCREENBOARD)));

    try {
      DashboardListUpdateItemsResponse result =
          apiInstance.updateDashboardListItems(DASHBOARD_LIST_ID, 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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"

DELETE https://api.ap1.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboardshttps://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}/dashboardshttps://api.us5.datadoghq.com/api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards

개요

Delete dashboards from an existing dashboard list.

인수

경로 파라미터

이름

유형

설명

dashboard_list_id [required]

integer

ID of the dashboard list to delete items from.

요청

Body Data (required)

Dashboards to delete from the dashboard list.

Expand All

항목

유형

설명

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": "123-abc-456",
      "type": "custom_screenboard"
    }
  ]
}
{
  "dashboards": [
    {
      "id": "123-abc-456",
      "type": "custom_timeboard"
    }
  ]
}

응답

OK

Response containing a list of deleted dashboards.

Expand All

항목

유형

설명

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

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 사례

// Delete custom screenboard dashboard from an existing dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DashboardListsApi;
import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest;
import com.datadog.api.client.v2.model.DashboardListDeleteItemsResponse;
import com.datadog.api.client.v2.model.DashboardListItemRequest;
import com.datadog.api.client.v2.model.DashboardType;
import java.util.Collections;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    // there is a valid "screenboard_dashboard" in the system
    String SCREENBOARD_DASHBOARD_ID = System.getenv("SCREENBOARD_DASHBOARD_ID");

    DashboardListDeleteItemsRequest body =
        new DashboardListDeleteItemsRequest()
            .dashboards(
                Collections.singletonList(
                    new DashboardListItemRequest()
                        .id(SCREENBOARD_DASHBOARD_ID)
                        .type(DashboardType.CUSTOM_SCREENBOARD)));

    try {
      DashboardListDeleteItemsResponse result =
          apiInstance.deleteDashboardListItems(DASHBOARD_LIST_ID, 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();
    }
  }
}
// Delete custom timeboard dashboard from an existing dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DashboardListsApi;
import com.datadog.api.client.v2.model.DashboardListDeleteItemsRequest;
import com.datadog.api.client.v2.model.DashboardListDeleteItemsResponse;
import com.datadog.api.client.v2.model.DashboardListItemRequest;
import com.datadog.api.client.v2.model.DashboardType;
import java.util.Collections;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    // there is a valid "dashboard" in the system
    String DASHBOARD_ID = System.getenv("DASHBOARD_ID");

    DashboardListDeleteItemsRequest body =
        new DashboardListDeleteItemsRequest()
            .dashboards(
                Collections.singletonList(
                    new DashboardListItemRequest()
                        .id(DASHBOARD_ID)
                        .type(DashboardType.CUSTOM_TIMEBOARD)));

    try {
      DashboardListDeleteItemsResponse result =
          apiInstance.deleteDashboardListItems(DASHBOARD_LIST_ID, 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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"

PUT https://api.ap1.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}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}https://api.us5.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}

개요

Update the name of a dashboard list. This endpoint requires the dashboards_write permission.

OAuth apps require the dashboards_write authorization scope to access this endpoint.

인수

경로 파라미터

이름

유형

설명

list_id [required]

integer

ID of the dashboard list to update.

요청

Body Data (required)

Update a dashboard list request body.

Expand All

항목

유형

설명

author

object

Object describing the creator of the shared element.

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 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": "updated Example-Dashboard-List"
}

응답

OK

Your Datadog Dashboards.

Expand All

항목

유형

설명

author

object

Object describing the creator of the shared element.

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 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

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Not Found

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

// Update a dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardListsApi;
import com.datadog.api.client.v1.model.DashboardList;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    DashboardList body = new DashboardList().name("updated Example-Dashboard-List");

    try {
      DashboardList result = apiInstance.updateDashboardList(DASHBOARD_LIST_ID, 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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"

DELETE https://api.ap1.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}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}https://api.us5.datadoghq.com/api/v1/dashboard/lists/manual/{list_id}

개요

Delete a dashboard list. This endpoint requires the dashboards_write permission.

OAuth apps require the dashboards_write authorization scope to access this endpoint.

인수

경로 파라미터

이름

유형

설명

list_id [required]

integer

ID of the dashboard list to delete.

응답

OK

Deleted dashboard details.

Expand All

항목

유형

설명

deleted_dashboard_list_id

int64

ID of the deleted dashboard list.

{
  "deleted_dashboard_list_id": "integer"
}

Forbidden

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Not Found

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

Too many requests

Error response object.

Expand All

항목

유형

설명

errors [required]

[string]

Array of errors returned by the API.

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

코드 사례

// Delete a dashboard list returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardListsApi;
import com.datadog.api.client.v1.model.DashboardListDeleteResponse;

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

    // there is a valid "dashboard_list" in the system
    Long DASHBOARD_LIST_ID = Long.parseLong(System.getenv("DASHBOARD_LIST_ID"));

    try {
      DashboardListDeleteResponse result = apiInstance.deleteDashboardList(DASHBOARD_LIST_ID);
      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:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"

PREVIEWING: emmett.butler/dd-trace-api