Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions examples/v2/app-builder/ListAppVersions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
List App Versions returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
from uuid import UUID

# there is a valid "app" in the system
APP_DATA_ID = environ["APP_DATA_ID"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = AppBuilderApi(api_client)
response = api_instance.list_app_versions(
app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
app_id=APP_DATA_ID,
)

print(response)
7 changes: 5 additions & 2 deletions examples/v2/app-builder/UpdateAppFavorite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Update App Favorite Status returns "No Content" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
from datadog_api_client.v2.model.app_favorite_type import AppFavoriteType
Expand All @@ -10,7 +11,9 @@
from datadog_api_client.v2.model.update_app_favorite_request_data_attributes import (
UpdateAppFavoriteRequestDataAttributes,
)
from uuid import UUID

# there is a valid "app" in the system
APP_DATA_ID = environ["APP_DATA_ID"]

body = UpdateAppFavoriteRequest(
data=UpdateAppFavoriteRequestData(
Expand All @@ -24,4 +27,4 @@
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = AppBuilderApi(api_client)
api_instance.update_app_favorite(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
api_instance.update_app_favorite(app_id=APP_DATA_ID, body=body)
7 changes: 5 additions & 2 deletions examples/v2/app-builder/UpdateAppSelfService.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Update App Self-Service Status returns "No Content" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
from datadog_api_client.v2.model.app_self_service_type import AppSelfServiceType
Expand All @@ -10,7 +11,9 @@
from datadog_api_client.v2.model.update_app_self_service_request_data_attributes import (
UpdateAppSelfServiceRequestDataAttributes,
)
from uuid import UUID

# there is a valid "app" in the system
APP_DATA_ID = environ["APP_DATA_ID"]

body = UpdateAppSelfServiceRequest(
data=UpdateAppSelfServiceRequestData(
Expand All @@ -24,4 +27,4 @@
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = AppBuilderApi(api_client)
api_instance.update_app_self_service(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
api_instance.update_app_self_service(app_id=APP_DATA_ID, body=body)
7 changes: 5 additions & 2 deletions examples/v2/app-builder/UpdateAppTags.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
Update App Tags returns "No Content" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
from datadog_api_client.v2.model.app_tags_type import AppTagsType
from datadog_api_client.v2.model.update_app_tags_request import UpdateAppTagsRequest
from datadog_api_client.v2.model.update_app_tags_request_data import UpdateAppTagsRequestData
from datadog_api_client.v2.model.update_app_tags_request_data_attributes import UpdateAppTagsRequestDataAttributes
from uuid import UUID

# there is a valid "app" in the system
APP_DATA_ID = environ["APP_DATA_ID"]

body = UpdateAppTagsRequest(
data=UpdateAppTagsRequestData(
Expand All @@ -25,4 +28,4 @@
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = AppBuilderApi(api_client)
api_instance.update_app_tags(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
api_instance.update_app_tags(app_id=APP_DATA_ID, body=body)
9 changes: 5 additions & 4 deletions examples/v2/app-builder/UpdateAppVersionName.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Name App Version returns "No Content" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
from datadog_api_client.v2.model.app_version_name_type import AppVersionNameType
Expand All @@ -10,7 +11,9 @@
from datadog_api_client.v2.model.update_app_version_name_request_data_attributes import (
UpdateAppVersionNameRequestDataAttributes,
)
from uuid import UUID

# there is a valid "app" in the system
APP_DATA_ID = environ["APP_DATA_ID"]

body = UpdateAppVersionNameRequest(
data=UpdateAppVersionNameRequestData(
Expand All @@ -24,6 +27,4 @@
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = AppBuilderApi(api_client)
api_instance.update_app_version_name(
app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), version="version", body=body
)
api_instance.update_app_version_name(app_id=APP_DATA_ID, version="latest", body=body)
7 changes: 5 additions & 2 deletions examples/v2/app-builder/UpdateProtectionLevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Update App Protection Level returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.app_builder_api import AppBuilderApi
from datadog_api_client.v2.model.app_protection_level import AppProtectionLevel
Expand All @@ -11,7 +12,9 @@
from datadog_api_client.v2.model.update_app_protection_level_request_data_attributes import (
UpdateAppProtectionLevelRequestDataAttributes,
)
from uuid import UUID

# there is a valid "app" in the system
APP_DATA_ID = environ["APP_DATA_ID"]

body = UpdateAppProtectionLevelRequest(
data=UpdateAppProtectionLevelRequestData(
Expand All @@ -25,6 +28,6 @@
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = AppBuilderApi(api_client)
response = api_instance.update_protection_level(app_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body=body)
response = api_instance.update_protection_level(app_id=APP_DATA_ID, body=body)

print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-18T19:51:47.462Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
interactions:
- request:
body: '{"data":{"attributes":{"description":"Adds new dashboard widgets and a
few bug fixes.","title":"Release v1.2 to production"},"type":"publishRequest"}}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e/publish-request
response:
body:
string: '{"errors":[{"status":"404","id":"c9247d40-2291-4860-90ac-9c2441ff23db","title":"app
not found","detail":"app with id 7addb29b-f935-472c-ae79-d1963979a23e not
found"}]}'
headers:
content-type:
- application/vnd.api+json
status:
code: 404
message: Not Found
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-18T19:51:53.216Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
interactions:
- request:
body: null
headers:
accept:
- application/json
method: GET
uri: https://api.datadoghq.com/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e/versions
response:
body:
string: '{"errors":[{"status":"404","id":"4dfd53b4-6987-4868-b330-af0535219c61","title":"app
not found","detail":"app with id 7addb29b-f935-472c-ae79-d1963979a23e not
found"}]}'
headers:
content-type:
- application/vnd.api+json
status:
code: 404
message: Not Found
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-18T19:51:53.386Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
interactions:
- request:
body: '{"data":{"attributes":{"components":[{"events":[],"name":"grid0","properties":{"backgroundColor":"default","children":[{"events":[],"name":"gridCell0","properties":{"children":[{"events":[],"name":"text0","properties":{"content":"#
Cat Facts","contentType":"markdown","isVisible":true,"textAlign":"left","verticalAlign":"top"},"type":"text"}],"isVisible":"true","layout":{"default":{"height":5,"width":4,"x":0,"y":0}}},"type":"gridCell"},{"events":[],"name":"gridCell2","properties":{"children":[{"events":[],"name":"table0","properties":{"columns":[{"dataPath":"fact","header":"fact","id":"0ae2ae9e-0280-4389-83c6-1c5949f7e674","isHidden":false},{"dataPath":"length","header":"length","id":"c9048611-0196-4a00-9366-1ef9e3ec0408","isHidden":true},{"dataPath":"Due
Date","disableSortBy":false,"formatter":{"format":"LARGE_WITHOUT_TIME","type":"formatted_time"},"header":"Unused
Old Column","id":"8fa9284b-7a58-4f13-9959-57b7d8a7fe8f","isDeleted":true}],"data":"${fetchFacts?.outputs?.body?.data}","globalFilter":false,"isLoading":"${fetchFacts?.isLoading}","isScrollable":"vertical","isSubRowsEnabled":false,"isVisible":true,"isWrappable":false,"pageSize":"${pageSize?.value}","paginationType":"server_side","rowButtons":[],"summary":true,"totalCount":"${fetchFacts?.outputs?.body?.total}"},"type":"table"}],"isVisible":"true","layout":{"default":{"height":96,"width":12,"x":0,"y":5}}},"type":"gridCell"},{"events":[],"name":"gridCell1","properties":{"children":[{"events":[],"name":"text1","properties":{"content":"##
Random Fact\n\n${randomFact?.outputs?.fact}","contentType":"markdown","isVisible":true,"textAlign":"left","verticalAlign":"top"},"type":"text"}],"isVisible":"true","layout":{"default":{"height":16,"width":12,"x":0,"y":101}}},"type":"gridCell"},{"events":[],"name":"gridCell3","properties":{"children":[{"events":[{"name":"click","type":"setStateVariableValue","value":"${pageSize?.value
+ 1}","variableName":"pageSize"}],"name":"button0","properties":{"iconLeft":"angleUp","iconRight":"","isBorderless":false,"isDisabled":false,"isLoading":false,"isPrimary":true,"isVisible":true,"label":"Increase
Page Size","level":"default"},"type":"button"}],"isVisible":"true","layout":{"default":{"height":4,"width":2,"x":10,"y":134}}},"type":"gridCell"},{"events":[],"name":"gridCell4","properties":{"children":[{"events":[{"name":"click","type":"setStateVariableValue","value":"${pageSize?.value
- 1}","variableName":"pageSize"}],"name":"button1","properties":{"iconLeft":"angleDown","iconRight":"","isBorderless":false,"isDisabled":false,"isLoading":false,"isPrimary":true,"isVisible":true,"label":"Decrease
Page Size","level":"default"},"type":"button"}],"isVisible":"true","layout":{"default":{"height":4,"width":2,"x":10,"y":138}}},"type":"gridCell"}]},"type":"grid"}],"description":"This
is a slightly complicated example app that fetches and displays cat facts","name":"Example
Cat Facts Viewer","queries":[{"events":[],"id":"92ff0bb8-553b-4f31-87c7-ef5bd16d47d5","name":"fetchFacts","properties":{"spec":{"connectionId":"5e63f4a8-4ce6-47de-ba11-f6617c1d54f3","fqn":"com.datadoghq.http.request","inputs":{"url":"https://catfact.ninja/facts","urlParams":[{"key":"limit","value":"${pageSize.value.toString()}"},{"key":"page","value":"${(table0.pageIndex
+ 1).toString()}"}],"verb":"GET"}}},"type":"action"},{"id":"afd03c81-4075-4432-8618-ba09d52d2f2d","name":"pageSize","properties":{"defaultValue":"${20}"},"type":"stateVariable"},{"id":"0fb22859-47dc-4137-9e41-7b67d04c525c","name":"randomFact","properties":{"outputs":"${(()
=> {const facts = fetchFacts.outputs.body.data\nreturn facts[Math.floor(Math.random()*facts.length)]\n})()}"},"type":"dataTransform"}],"rootInstanceName":"grid0"},"type":"appDefinitions"}}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/app-builder/apps
response:
body:
string: '{"data":{"id":"d928ecbc-acfe-4126-96f6-092fa0a01416","type":"appDefinitions"}}'
headers:
content-type:
- application/vnd.api+json
status:
code: 201
message: Created
- request:
body: null
headers:
accept:
- application/json
method: GET
uri: https://api.datadoghq.com/api/v2/app-builder/apps/d928ecbc-acfe-4126-96f6-092fa0a01416/versions
response:
body:
string: '{"data": [{"id": "98cd3a5a-644d-41fd-8ffa-e58e21e8e21b", "type": "appVersions",
"attributes": {"app_id": "d928ecbc-acfe-4126-96f6-092fa0a01416", "created_at":
"2026-05-18T19:51:53.59976Z", "has_ever_been_published": false, "updated_at":
"2026-05-18T19:51:53.59976Z", "user_id": 1445416, "user_name": "", "user_uuid":
"3ad549bf-eba0-11e9-a77a-0705486660d0", "version": 1}}], "meta": {"page":
{"totalCount": 1, "totalFilteredCount": 0}}}'
headers:
content-type:
- application/vnd.api+json
status:
code: 200
message: OK
- request:
body: null
headers:
accept:
- application/json
method: DELETE
uri: https://api.datadoghq.com/api/v2/app-builder/apps/d928ecbc-acfe-4126-96f6-092fa0a01416
response:
body:
string: '{"data": {"id": "d928ecbc-acfe-4126-96f6-092fa0a01416", "type": "appDefinitions"}}'
headers:
content-type:
- application/vnd.api+json
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-18T19:51:55.262Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
interactions:
- request:
body: '{"data":{"attributes":{"components":[{"events":[],"name":"grid0","properties":{"backgroundColor":"default","children":[{"events":[],"name":"gridCell0","properties":{"children":[{"events":[],"name":"text0","properties":{"content":"#
Cat Facts","contentType":"markdown","isVisible":true,"textAlign":"left","verticalAlign":"top"},"type":"text"}],"isVisible":"true","layout":{"default":{"height":5,"width":4,"x":0,"y":0}}},"type":"gridCell"},{"events":[],"name":"gridCell2","properties":{"children":[{"events":[],"name":"table0","properties":{"columns":[{"dataPath":"fact","header":"fact","id":"0ae2ae9e-0280-4389-83c6-1c5949f7e674","isHidden":false},{"dataPath":"length","header":"length","id":"c9048611-0196-4a00-9366-1ef9e3ec0408","isHidden":true},{"dataPath":"Due
Date","disableSortBy":false,"formatter":{"format":"LARGE_WITHOUT_TIME","type":"formatted_time"},"header":"Unused
Old Column","id":"8fa9284b-7a58-4f13-9959-57b7d8a7fe8f","isDeleted":true}],"data":"${fetchFacts?.outputs?.body?.data}","globalFilter":false,"isLoading":"${fetchFacts?.isLoading}","isScrollable":"vertical","isSubRowsEnabled":false,"isVisible":true,"isWrappable":false,"pageSize":"${pageSize?.value}","paginationType":"server_side","rowButtons":[],"summary":true,"totalCount":"${fetchFacts?.outputs?.body?.total}"},"type":"table"}],"isVisible":"true","layout":{"default":{"height":96,"width":12,"x":0,"y":5}}},"type":"gridCell"},{"events":[],"name":"gridCell1","properties":{"children":[{"events":[],"name":"text1","properties":{"content":"##
Random Fact\n\n${randomFact?.outputs?.fact}","contentType":"markdown","isVisible":true,"textAlign":"left","verticalAlign":"top"},"type":"text"}],"isVisible":"true","layout":{"default":{"height":16,"width":12,"x":0,"y":101}}},"type":"gridCell"},{"events":[],"name":"gridCell3","properties":{"children":[{"events":[{"name":"click","type":"setStateVariableValue","value":"${pageSize?.value
+ 1}","variableName":"pageSize"}],"name":"button0","properties":{"iconLeft":"angleUp","iconRight":"","isBorderless":false,"isDisabled":false,"isLoading":false,"isPrimary":true,"isVisible":true,"label":"Increase
Page Size","level":"default"},"type":"button"}],"isVisible":"true","layout":{"default":{"height":4,"width":2,"x":10,"y":134}}},"type":"gridCell"},{"events":[],"name":"gridCell4","properties":{"children":[{"events":[{"name":"click","type":"setStateVariableValue","value":"${pageSize?.value
- 1}","variableName":"pageSize"}],"name":"button1","properties":{"iconLeft":"angleDown","iconRight":"","isBorderless":false,"isDisabled":false,"isLoading":false,"isPrimary":true,"isVisible":true,"label":"Decrease
Page Size","level":"default"},"type":"button"}],"isVisible":"true","layout":{"default":{"height":4,"width":2,"x":10,"y":138}}},"type":"gridCell"}]},"type":"grid"}],"description":"This
is a slightly complicated example app that fetches and displays cat facts","name":"Example
Cat Facts Viewer","queries":[{"events":[],"id":"92ff0bb8-553b-4f31-87c7-ef5bd16d47d5","name":"fetchFacts","properties":{"spec":{"connectionId":"5e63f4a8-4ce6-47de-ba11-f6617c1d54f3","fqn":"com.datadoghq.http.request","inputs":{"url":"https://catfact.ninja/facts","urlParams":[{"key":"limit","value":"${pageSize.value.toString()}"},{"key":"page","value":"${(table0.pageIndex
+ 1).toString()}"}],"verb":"GET"}}},"type":"action"},{"id":"afd03c81-4075-4432-8618-ba09d52d2f2d","name":"pageSize","properties":{"defaultValue":"${20}"},"type":"stateVariable"},{"id":"0fb22859-47dc-4137-9e41-7b67d04c525c","name":"randomFact","properties":{"outputs":"${(()
=> {const facts = fetchFacts.outputs.body.data\nreturn facts[Math.floor(Math.random()*facts.length)]\n})()}"},"type":"dataTransform"}],"rootInstanceName":"grid0"},"type":"appDefinitions"}}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/app-builder/apps
response:
body:
string: '{"data":{"id":"850d5920-6bfb-4723-a3ff-91bfb2d898d8","type":"appDefinitions"}}'
headers:
content-type:
- application/vnd.api+json
status:
code: 201
message: Created
- request:
body: '{"data":{"attributes":{"name":"v1.2.0 - bug fix release"},"type":"versionNames"}}'
headers:
accept:
- '*/*'
content-type:
- application/json
method: PATCH
uri: https://api.datadoghq.com/api/v2/app-builder/apps/850d5920-6bfb-4723-a3ff-91bfb2d898d8/version-name?version=latest
response:
body:
string: ''
headers: {}
status:
code: 204
message: No Content
- request:
body: null
headers:
accept:
- application/json
method: DELETE
uri: https://api.datadoghq.com/api/v2/app-builder/apps/850d5920-6bfb-4723-a3ff-91bfb2d898d8
response:
body:
string: '{"data":{"id":"850d5920-6bfb-4723-a3ff-91bfb2d898d8","type":"appDefinitions"}}'
headers:
content-type:
- application/vnd.api+json
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-18T19:51:56.300Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
interactions:
- request:
body: '{"data":{"attributes":{"name":"v1.2.0 - bug fix release"},"type":"versionNames"}}'
headers:
accept:
- '*/*'
content-type:
- application/json
method: PATCH
uri: https://api.datadoghq.com/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e/version-name?version=latest
response:
body:
string: '{"errors":[{"status":"404","id":"16fc993f-2445-4b88-b1e7-c924feed5141","title":"app
not found","detail":"app with id 7addb29b-f935-472c-ae79-d1963979a23e not
found"}]}'
headers:
content-type:
- application/vnd.api+json
status:
code: 404
message: Not Found
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-18T19:51:58.197Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
interactions:
- request:
body: null
headers:
accept:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e/revert?version=1
response:
body:
string: '{"errors":[{"status":"404","id":"09483925-ee8b-44c8-882a-35b53e209584","title":"app
not found","detail":"app with id 7addb29b-f935-472c-ae79-d1963979a23e not
found"}]}'
headers:
content-type:
- application/vnd.api+json
status:
code: 404
message: Not Found
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-18T19:51:59.539Z
Loading
Loading