Skip to content

Commit 909a07f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add app-builder lifecycle endpoints to public OpenAPI spec (DataDog#3302)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 282eadc commit 909a07f

43 files changed

Lines changed: 4543 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 851 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Create Publish Request returns "Created" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
5+
6+
body = DatadogAPIClient::V2::CreatePublishRequestRequest.new({
7+
data: DatadogAPIClient::V2::CreatePublishRequestRequestData.new({
8+
attributes: DatadogAPIClient::V2::CreatePublishRequestRequestDataAttributes.new({
9+
description: "Adds new dashboard widgets and a few bug fixes.",
10+
title: "Release v1.2 to production",
11+
}),
12+
type: DatadogAPIClient::V2::PublishRequestType::PUBLISHREQUEST,
13+
}),
14+
})
15+
p api_instance.create_publish_request("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List App Versions returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
5+
p api_instance.list_app_versions("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Revert App returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
5+
p api_instance.revert_app("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "version")
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Update App Favorite Status returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
5+
6+
body = DatadogAPIClient::V2::UpdateAppFavoriteRequest.new({
7+
data: DatadogAPIClient::V2::UpdateAppFavoriteRequestData.new({
8+
attributes: DatadogAPIClient::V2::UpdateAppFavoriteRequestDataAttributes.new({
9+
favorite: true,
10+
}),
11+
type: DatadogAPIClient::V2::AppFavoriteType::FAVORITES,
12+
}),
13+
})
14+
api_instance.update_app_favorite("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Update App Self-Service Status returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
5+
6+
body = DatadogAPIClient::V2::UpdateAppSelfServiceRequest.new({
7+
data: DatadogAPIClient::V2::UpdateAppSelfServiceRequestData.new({
8+
attributes: DatadogAPIClient::V2::UpdateAppSelfServiceRequestDataAttributes.new({
9+
self_service: true,
10+
}),
11+
type: DatadogAPIClient::V2::AppSelfServiceType::SELFSERVICE,
12+
}),
13+
})
14+
api_instance.update_app_self_service("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Update App Tags returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
5+
6+
body = DatadogAPIClient::V2::UpdateAppTagsRequest.new({
7+
data: DatadogAPIClient::V2::UpdateAppTagsRequestData.new({
8+
attributes: DatadogAPIClient::V2::UpdateAppTagsRequestDataAttributes.new({
9+
tags: [
10+
"team:platform",
11+
"service:ops",
12+
],
13+
}),
14+
type: DatadogAPIClient::V2::AppTagsType::TAGS,
15+
}),
16+
})
17+
api_instance.update_app_tags("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Name App Version returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
5+
6+
body = DatadogAPIClient::V2::UpdateAppVersionNameRequest.new({
7+
data: DatadogAPIClient::V2::UpdateAppVersionNameRequestData.new({
8+
attributes: DatadogAPIClient::V2::UpdateAppVersionNameRequestDataAttributes.new({
9+
name: "v1.2.0 - bug fix release",
10+
}),
11+
type: DatadogAPIClient::V2::AppVersionNameType::VERSIONNAMES,
12+
}),
13+
})
14+
api_instance.update_app_version_name("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "version", body)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Update App Protection Level returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
5+
6+
body = DatadogAPIClient::V2::UpdateAppProtectionLevelRequest.new({
7+
data: DatadogAPIClient::V2::UpdateAppProtectionLevelRequestData.new({
8+
attributes: DatadogAPIClient::V2::UpdateAppProtectionLevelRequestDataAttributes.new({
9+
protection_level: DatadogAPIClient::V2::AppProtectionLevel::APPROVAL_REQUIRED,
10+
}),
11+
type: DatadogAPIClient::V2::AppProtectionLevelType::PROTECTIONLEVEL,
12+
}),
13+
})
14+
p api_instance.update_protection_level("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)

features/scenarios_model_mapping.rb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,6 +1355,40 @@
13551355
"v2.PublishApp" => {
13561356
"app_id" => "UUID",
13571357
},
1358+
"v2.UpdateAppFavorite" => {
1359+
"app_id" => "UUID",
1360+
"body" => "UpdateAppFavoriteRequest",
1361+
},
1362+
"v2.UpdateProtectionLevel" => {
1363+
"app_id" => "UUID",
1364+
"body" => "UpdateAppProtectionLevelRequest",
1365+
},
1366+
"v2.CreatePublishRequest" => {
1367+
"app_id" => "UUID",
1368+
"body" => "CreatePublishRequestRequest",
1369+
},
1370+
"v2.RevertApp" => {
1371+
"app_id" => "UUID",
1372+
"version" => "String",
1373+
},
1374+
"v2.UpdateAppSelfService" => {
1375+
"app_id" => "UUID",
1376+
"body" => "UpdateAppSelfServiceRequest",
1377+
},
1378+
"v2.UpdateAppTags" => {
1379+
"app_id" => "UUID",
1380+
"body" => "UpdateAppTagsRequest",
1381+
},
1382+
"v2.UpdateAppVersionName" => {
1383+
"app_id" => "UUID",
1384+
"version" => "String",
1385+
"body" => "UpdateAppVersionNameRequest",
1386+
},
1387+
"v2.ListAppVersions" => {
1388+
"app_id" => "UUID",
1389+
"limit" => "Integer",
1390+
"page" => "Integer",
1391+
},
13581392
"v2.ListAuditLogs" => {
13591393
"filter_query" => "String",
13601394
"filter_from" => "Time",

0 commit comments

Comments
 (0)