대시보드 목록 API
대시보드 목록 API (v1) (Dashboard Lists API (v1))
대시보드 목록을 API를 통해 다루면 모든 대시보드를 팀과 조직과 함께 정리하고, 찾고, 공유하기가 쉬워져요. 목록의 항목을 조회·추가·업데이트·삭제할 수 있습니다.
출처: 문서
본문
- 대시보드 목록의 항목 가져오기
- 대시보드 목록에 항목 추가하기
- 대시보드 목록의 항목 업데이트하기
- 대시보드 목록에서 항목 삭제하기
대시보드 목록의 항목 가져오기 (Get items of a dashboard list)
경고: 이 엔드포인트는 더 이상 사용되지 않습니다(outdated). 대신 대시보드 목록 v2 항목 가져오기 엔드포인트를 사용하세요.
시그니처 (Signature)
GET https://api.datadoghq.com/api/v1/dashboard/lists/manual/<LIST_ID>/dashboards
예시 (Examples)
요청 예시 (Example request)
Python
from datadog import initialize, api
options = {
'api_key': '<DATADOG_API_KEY>',
'app_key': '<DATADOG_APPLICATION_KEY>'
}
initialize(**options)
api.DashboardList.get_items(4741)
Ruby
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_items_of_dashboard_list(4741)
Curl
api_key=<DATADOG_API_KEY>
app_key=<DATADOG_APPLICATION_KEY>
list_id=4741
curl -X GET \
"https://api.datadoghq.com/api/v1/dashboard/lists/manual/${list_id}/dashboards?api_key=${api_key}&application_key=${app_key}"
응답 예시 (Example response)
Python
{
'total': 5,
'dashboards': [
{
'is_shared': False,
'author': {
'handle': None,
'name': None
},
'url': '/screen/integration/66/aws-dynamodb',
'title': 'Amazon DynamoDB',
'modified': None,
'created': None,
'is_favorite': True,
'is_read_only': True,
'type': 'integration_screenboard',
'id': 66,
'icon': '/static/v/34.254868/images/saas_logos/small/amazon_dynamodb.png'
},
{
'is_shared': False,
'author': {
'handle': None,
'name': None
},
'url': '/dash/integration/17/postgres---metrics',
'title': 'Postgres - Metrics',
'modified': None,
'created': None,
'is_favorite': True,
'is_read_only': True,
'type': 'integration_timeboard',
'id': 17,
'icon': '/static/v/34.254868/images/saas_logos/small/postgres.png'
},
{
'new_id': 'qts-q2k-yq6',
'popularity': 0,
'is_shared': False,
'author': {
'handle': '[email protected]',
'name': 'Author Name'
},
'url': '/dash/75619/trace-api',
'title': 'Trace API',
'modified': '2018-03-16T13:39:39.517133+00:00',
'created': '2015-10-21T13:22:48.633391+00:00',
'is_favorite': False,
'is_read_only': False,
'type': 'custom_timeboard',
'id': 75619,
'icon': None
},
{
'new_id': 'rys-xwq-geh',
'popularity': 0,
'is_shared': False,
'author': {
'handle': '[email protected]',
'name': 'Other Author Name'
},
'url': '/screen/63572/agent-stats',
'title': 'Agent Stats',
'modified': '2018-03-16T12:54:25.968134+00:00',
'created': '2014-06-18T18:19:00.974763+00:00',
'is_favorite': False,
'is_read_only': False,
'type': 'custom_screenboard',
'id': 63572
'icon': None
},
{
'popularity': 0,
'is_shared': False,
'author': {
'handle': None,
'name': None
},
'url': '/dash/host/3245468',
'title': 'agent-gui',
'modified': None,
'created': None,
'is_favorite': False,
'is_read_only': True,
'type': 'host_timeboard',
'id': 3245468,
'icon': None
}
]
}
Ruby
[
"200",
{
"total" => 5,
"dashboards" => [
{
"title" => "Amazon DynamoDB",
"is_favorite" => true,
"id" => 66,
"icon" => "/static/v/34.254868/images/saas_logos/small/amazon_dynamodb.png",
"is_shared" => false,
"author" => {
"handle" => nil,
"name" => nil
},
"url" => "/screen/integration/66/aws-dynamodb",
"created" => nil,
"modified" => nil,
"is_read_only" => true,
"type" => "integration_screenboard"
},
{
"title" => "Postgres - Metrics",
"is_favorite" => true,
"id" => 17,
"icon" => "/static/v/34.254868/images/saas_logos/small/postgres.png",
"is_shared" => false,
"author" => {
"handle" => nil,
"name" => nil
},
"url" => "/dash/integration/17/postgres---metrics",
"created" => nil,
"modified" => nil,
"is_read_only" => true,
"type" => "integration_timeboard"
},
{
"new_id" => "qts-q2k-yq6",
"popularity" => 0,
"title" => "Trace API",
"is_favorite" => false,
"id" => 75619,
"icon" => nil,
"is_shared" => false,
"author" => {
"handle" => "[email protected]",
"name" => "Author Name"
},
"url" => "/dash/75619/trace-api",
"created" => "2015-10-21T13:22:48.633391+00:00",
"modified" => "2018-03-16T13:39:39.517133+00:00",
"is_read_only" => false,
"type" => "custom_timeboard"
},
{
"new_id" => "rys-xwq-geh",
"popularity" => 0,
"title" => "Agent Stats",
"is_favorite" => false,
"id" => 63572,
"icon" => nil,
"is_shared" => false,
"author" => {
"handle" => "[email protected]",
"name" => "Other Author Name"
},
"url" => "/screen/63572/agent-stats",
"created" => "2014-06-18T18:19:00.974763+00:00",
"modified" => "2018-03-16T12:54:25.968134+00:00",
"is_read_only" => false,
"type" => "custom_screenboard"
},
{
"popularity" => 0,
"title" => "agent-gui",
"is_favorite" => false,
"id" => 3245468,
"icon" => nil,
"is_shared" => false,
"author" => {
"handle" => nil,
"name" => nil
},
"url" => "/dash/host/3245468",
"created" => nil,
"modified" => nil,
"is_read_only" => true,
"type" => "host_timeboard"
}
]
}
]
Curl
{
"total": 5,
"dashboards": [
{
"is_shared": False,
"author": {
"handle": None,
"name": None
},
"url": "/screen/integration/66/aws-dynamodb",
"title": "Amazon DynamoDB",
"modified": None,
"created": None,
"is_favorite": True,
"is_read_only": True,
"type": "integration_screenboard",
"id": 66,
"icon": "/static/v/34.254868/images/saas_logos/small/amazon_dynamodb.png"
},
{
"is_shared": False,
"author": {
"handle": None,
"name": None
},
"url": "/dash/integration/17/postgres---metrics",
"title": "Postgres - Metrics",
"modified": None,
"created": None,
"is_favorite": True,
"is_read_only": True,
"type": "integration_timeboard",
"id": 17,
"icon": "/static/v/34.254868/images/saas_logos/small/postgres.png"
},
{
"new_id": "qts-q2k-yq6",
"popularity": 0,
"is_shared": False,
"author": {
"handle": "[email protected]",
"name": "Author Name"
},
"url": "/dash/75619/trace-api",
"title": "Trace API",
"modified": "2018-03-16T13:39:39.517133+00:00",
"created": "2015-10-21T13:22:48.633391+00:00",
"is_favorite": False,
"is_read_only": False,
"type": "custom_timeboard",
"id": 75619,
"icon": None
},
{
"new_id": "rys-xwq-geh",
"popularity": 0,
"is_shared": False,
"author": {
"handle": "[email protected]",
"name": "Other Author Name"
},
"url": "/screen/63572/agent-stats",
"title": "Agent Stats",
"modified": "2018-03-16T12:54:25.968134+00:00",
"created": "2014-06-18T18:19:00.974763+00:00",
"is_favorite": False,
"is_read_only": False,
"type": "custom_screenboard",
"id": 63572,
"icon": None
},
{
"popularity": 0,
"is_shared": False,
"author": {
"handle": None,
"name": None
},
"url": "/dash/host/3245468",
"title": "agent-gui",
"modified": None,
"created": None,
"is_favorite": False,
"is_read_only": True,
"type": "host_timeboard",
"id": 3245468,
"icon": None
}
]
}
대시보드 목록에 항목 추가하기 (Add items to a dashboard list)
경고: 이 엔드포인트는 더 이상 사용되지 않습니다(outdated). 대신 대시보드 목록 v2 항목 추가하기 엔드포인트를 사용하세요.
시그니처 (Signature)
POST https://api.datadoghq.com/api/v1/dashboard/lists/manual/<LIST_ID>/dashboards
인자 (Arguments)
dashboards[필수]: 목록에 추가할 대시보드 목록입니다. 대시보드 정의는 다음 형식을 따릅니다:-
type[필수]: 대시보드의 유형입니다. 유형은 다음 중 하나여야 합니다:"custom_timeboard""custom_screenboard""integration_screenboard""integration_timeboard""host_timeboard"
-
id[필수]: 대시보드의 id입니다.
-
예시 (Examples)
요청 예시 (Example request)
Python
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': 1414
},
{
'type': 'custom_timeboard',
'id': 5858
},
{
'type': 'integration_screenboard',
'id': 67
},
{
'type': 'integration_timeboard',
'id': 5
},
{
'type': 'host_timeboard',
'id': 123456789
}
]
api.DashboardList.add_items(list_id, dashboards=dashboards)
Ruby
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" => 1414
},
{
"type" => "custom_timeboard",
"id" => 5858
},
{
"type" => "integration_screenboard",
"id" => 67
},
{
"type" => "integration_timeboard",
"id" => 5
},
{
"type" => "host_timeboard",
"id" => 123456789
}
]
result = dog.add_items_of_dashboard_list(list_id, dashboards)
Curl
api_key=<DATADOG_API_KEY>
app_key=<DATADOG_APPLICATION_KEY>
list_id=4741
curl -X ADD -H "Content-type: application/json" \
-d '{
"dashboards": [
{
"type": "custom_screenboard",
"id": 1414
},
{
"type": "custom_timeboard",
"id": 5858
},
{
"type": "integration_screenboard",
"id": 67
},
{
"type": "integration_timeboard",
"id": 5
},
{
"type": "host_timeboard",
"id": 123456789
}
]
}' \
"https://api.datadoghq.com/api/v1/dashboard/lists/manual/${list_id}/dashboards?api_key=${api_key}&application_key=${app_key}"
응답 예시 (Example response)
Python
{
'added_dashboards_to_list': [
{
'type': 'custom_timeboard',
'id': 5858
},
{
'type': 'custom_screenboard',
'id': 1414
},
{
'type': 'integration_timeboard',
'id': 5
},
{
'type': 'integration_screenboard',
'id': 67
},
{
'type': 'host_timeboard',
'id': 123456789
}
]
}
Ruby
[
"200",
{
"dashboards" => [
{
"type" => "custom_timeboard",
"id" => 5858
},
{
"type" => "custom_screenboard",
"id" => 1414
},
{
"type" => "integration_timeboard",
"id" => 5
},
{
"type" => "integration_screenboard",
"id" => 67
},
{
"type" => "host_timeboard",
"id" => 123456789
}
]
}
]
Curl
{
"deleted_dashboards_from_list": [
{
"type": "custom_timeboard",
"id": 5858
},
{
"type": "custom_screenboard",
"id": 1414
},
{
"type": "integration_timeboard",
"id": 5
},
{
"type": "integration_screenboard",
"id": 67
},
{
"type": "host_timeboard",
"id": 123456789
}
]
}
대시보드 목록의 항목 업데이트하기 (Update items of a dashboard list)
경고: 이 엔드포인트는 더 이상 사용되지 않습니다(outdated). 대신 대시보드 목록 v2 항목 업데이트하기 엔드포인트를 사용하세요.
시그니처 (Signature)
PUT https://api.datadoghq.com/api/v1/dashboard/lists/manual/<LIST_ID>/dashboards
인자 (Arguments)
dashboards[필수]: 대시보드 목록의 새 대시보드 목록입니다. 대시보드 정의는 다음 형식을 따릅니다:-
type[필수]: 대시보드의 유형입니다. 유형은 다음 중 하나여야 합니다:"custom_timeboard""custom_screenboard""integration_screenboard""integration_timeboard""host_timeboard"
-
id[필수]: 대시보드의 id입니다.
-
예시 (Examples)
요청 예시 (Example request)
Python
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': 1414
},
{
'type': 'custom_timeboard',
'id': 5858
},
{
'type': 'integration_screenboard',
'id': 67
},
{
'type': 'integration_timeboard',
'id': 5
},
{
'type': 'host_timeboard',
'id': 123456789
}
]
api.DashboardList.update_items(list_id, dashboards=dashboards)
Ruby
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" => 1414
},
{
"type" => "custom_timeboard",
"id" => 5858
},
{
"type" => "integration_screenboard",
"id" => 67
},
{
"type" => "integration_timeboard",
"id" => 5
},
{
"type" => "host_timeboard",
"id" => 123456789
}
]
result = dog.update_items_of_dashboard_list(list_id, dashboards)
Curl
api_key=<DATADOG_API_KEY>
app_key=<DATADOG_APPLICATION_KEY>
list_id=4741
curl -X UPDATE -H "Content-type: application/json" \
-d '{
"dashboards": [
{
"type": "custom_screenboard",
"id": 1414
},
{
"type": "custom_timeboard",
"id": 5858
},
{
"type": "integration_screenboard",
"id": 67
},
{
"type": "integration_timeboard",
"id": 5
},
{
"type": "host_timeboard",
"id": 123456789
}
]
}' \
"https://api.datadoghq.com/api/v1/dashboard/lists/manual/${list_id}/dashboards?api_key=${api_key}&application_key=${app_key}"
응답 예시 (Example response)
Python
{
'dashboards': [
{
'type': 'custom_timeboard',
'id': 5858
},
{
'type': 'custom_screenboard',
'id': 1414
},
{
'type': 'integration_timeboard',
'id': 5
},
{
'type': 'integration_screenboard',
'id': 67
},
{
'type': 'host_timeboard',
'id': 123456789
}
]
}
Ruby
[
"200",
{
"dashboards" => [
{
"type" => "custom_timeboard",
"id" => 5858
},
{
"type" => "custom_screenboard",
"id" => 1414
},
{
"type" => "integration_timeboard",
"id" => 5
},
{
"type" => "integration_screenboard",
"id" => 67
},
{
"type" => "host_timeboard",
"id" => 123456789
}
]
}
]
Curl
{
"deleted_dashboards_from_list": [
{
"type": "custom_timeboard",
"id": 5858
},
{
"type": "custom_screenboard",
"id": 1414
},
{
"type": "integration_timeboard",
"id": 5
},
{
"type": "integration_screenboard",
"id": 67
},
{
"type": "host_timeboard",
"id": 123456789
}
]
}
대시보드 목록에서 항목 삭제하기 (Delete items from a dashboard list)
경고: 이 엔드포인트는 더 이상 사용되지 않습니다(outdated). 대신 대시보드 목록 v2 항목 삭제하기 엔드포인트를 사용하세요.
시그니처 (Signature)
DELETE https://api.datadoghq.com/api/v1/dashboard/lists/manual/<LIST_ID>/dashboards
인자 (Arguments)
dashboards[필수]: 목록에서 제거할 대시보드 목록입니다. 대시보드 정의는 다음 형식을 따릅니다:-
type[필수]: 대시보드의 유형입니다. 유형은 다음 중 하나여야 합니다:"custom_timeboard""custom_screenboard""integration_screenboard""integration_timeboard""host_timeboard"
-
id[필수]: 대시보드의 id입니다.
-
예시 (Examples)
요청 예시 (Example request)
Python
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': 1414
},
{
'type': 'custom_timeboard',
'id': 5858
},
{
'type': 'integration_screenboard',
'id': 67
},
{
'type': 'integration_timeboard',
'id': 5
},
{
'type': 'host_timeboard',
'id': 123456789
}
]
api.DashboardList.delete_items(list_id, dashboards=dashboards)
Ruby
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" => 1414
},
{
"type" => "custom_timeboard",
"id" => 5858
},
{
"type" => "integration_screenboard",
"id" => 67
},
{
"type" => "integration_timeboard",
"id" => 5
},
{
"type" => "host_timeboard",
"id" => 123456789
}
]
result = dog.delete_items_from_dashboard_list(list_id, dashboards)
Curl
api_key=<DATADOG_API_KEY>
app_key=<DATADOG_APPLICATION_KEY>
list_id=4741
curl -X DELETE -H "Content-type: application/json" \
-d '{
"dashboards": [
{
"type": "custom_screenboard",
"id": 1414
},
{
"type": "custom_timeboard",
"id": 5858
},
{
"type": "integration_screenboard",
"id": 67
},
{
"type": "integration_timeboard",
"id": 5
},
{
"type": "host_timeboard",
"id": 123456789
}
]
}' \
"https://api.datadoghq.com/api/v1/dashboard/lists/manual/${list_id}/dashboards?api_key=${api_key}&application_key=${app_key}"
응답 예시 (Example response)
Python
{
'deleted_dashboards_from_list': [
{
'type': 'custom_timeboard',
'id': 5858
},
{
'type': 'custom_screenboard',
'id': 1414
},
{
'type': 'integration_timeboard',
'id': 5
},
{
'type': 'integration_screenboard',
'id': 67
},
{
'type': 'host_timeboard',
'id': 123456789
}
]
}
Ruby
[
"200",
{
"deleted_dashboards_from_list" => [
{
"type" => "custom_timeboard",
"id" => 5858
},
{
"type" => "custom_screenboard",
"id" => 1414
},
{
"type" => "integration_timeboard",
"id" => 5
},
{
"type" => "integration_screenboard",
"id" => 67
},
{
"type" => "host_timeboard",
"id" => 123456789
}
]
}
]
Curl
{
"deleted_dashboards_from_list": [
{
"type": "custom_timeboard",
"id": 5858
},
{
"type": "custom_screenboard",
"id": 1414
},
{
"type": "integration_timeboard",
"id": 5
},
{
"type": "integration_screenboard",
"id": 67
},
{
"type": "host_timeboard",
"id": 123456789
}
]
}