- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
GET /blueprint
List all of your saved blueprints.
Each entry includes the blueprint ID and name, access control, and user information.
The provided blueprint IDs are required to access the other blueprint-related APIs.
OK
{
"blueprints": [
{
"CreatorId": "us46e9aa-5806-4cd6-8e78-c22d58602d09",
"LastUserId": "us46e9aa-5806-4cd6-8e78-c22d58602d09",
"createdAt": "2022-01-01T20:54:47.302Z",
"id": "bp37712a-c507-4c62-ad8b-7d981cacb3be",
"name": "Web App Reference Architecture",
"updatedAt": "2022-01-01T20:55:52.876Z"
}
]
}
Unauthorized
curl --location 'https://api.cloudcraft.co/blueprint'
package main
import (
"context"
"log"
"os"
"github.com/DataDog/cloudcraft-go"
)
func main() {
// Get the API key from the environment.
key, ok := os.LookupEnv("CLOUDCRAFT_API_KEY")
if !ok {
log.Fatal("missing env var: CLOUDCRAFT_API_KEY")
}
// Create new Config to initialize a Client.
cfg := cloudcraft.NewConfig(key)
// Create a new Client instance with the given Config.
client, err := cloudcraft.NewClient(cfg)
if err != nil {
log.Fatal(err)
}
// List all blueprints in the Cloudcraft account.
blueprints, _, err := client.Blueprint.List(context.Background())
if err != nil {
log.Fatal(err)
}
// Print the name of each blueprint.
for _, blueprint := range blueprints {
log.Println(blueprint.Name)
}
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.cloudcraft.co/blueprint")
.method("GET", body)
.build();
Response response = client.newCall(request).execute();
from cloudcraftco import Cloudcraft
cloudcraft = Cloudcraft()
blueprints = cloudcraft.list_blueprints()
require "uri"
require "net/http"
url = URI("https://api.cloudcraft.co/blueprint")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://api.cloudcraft.co/blueprint", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
POST /blueprint
Create a new blueprint.
The body of the request should contain the blueprint document in JSON format. The response contains the created blueprint, including the newly assigned ID.
OK
{
"CreatorId": "us46e9aa-5806-4cd6-8e78-c22d58602d09",
"LastUserId": "us46e9aa-5806-4cd6-8e78-c22d58602d09",
"createdAt": "2022-01-01T20:59:57.340Z",
"data": {
"grid": "standard",
"name": "My new blueprint",
"version": 1
},
"id": "bp37712a-c507-4c62-ad8b-7d981cacb3be",
"updatedAt": "2022-01-01T20:59:57.340Z"
}
Unauthorized
Forbidden, insufficient privileges
curl --location 'https://api.cloudcraft.co/blueprint' \
--header 'Content-Type: application/json' \
--data '{"data": "%!s(<nil>)",
}'
package main
import (
"context"
"log"
"os"
"github.com/DataDog/cloudcraft-go"
)
func main() {
// Get the API key from the environment.
key, ok := os.LookupEnv("CLOUDCRAFT_API_KEY")
if !ok {
log.Fatal("missing env var: CLOUDCRAFT_API_KEY")
}
// Check if the command line arguments are correct.
if len(os.Args) != 2 {
log.Fatalf("usage: %s <blueprint-name>", os.Args[0])
}
// Create new Config to initialize a Client.
cfg := cloudcraft.NewConfig(key)
// Create a new Client instance with the given Config.
client, err := cloudcraft.NewClient(cfg)
if err != nil {
log.Fatal(err)
}
// Create a simple blueprint with the name coming from a command line argument.
blueprint, _, err := client.Blueprint.Create(
context.Background(),
&cloudcraft.Blueprint{
Data: &cloudcraft.BlueprintData{
Name: os.Args[1],
},
},
)
if err != nil {
log.Fatal(err)
}
// Print the blueprint ID.
log.Println(blueprint.ID)
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"AWS account name (for example prod or staging)\",\n \"roleArn\": \"arn:aws:iam::1234567890:role/cloudcraft\"\n}\n");
Request request = new Request.Builder()
.url("https://api.cloudcraft.co/blueprint")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
from cloudcraftco import Cloudcraft
cloudcraft = Cloudcraft()
data = {"data": {"grid": "standard", "name": "New blueprint"}}
result = cloudcraft.create_blueprint(data)
require "uri"
require "json"
require "net/http"
url = URI("https://api.cloudcraft.co/blueprint")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"data": "%!s(<nil>)",
})
response = https.request(request)
puts response.read_body
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
HERE"data": "%!s(<nil>)",
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cloudcraft.co/blueprint", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
DELETE /blueprint/{blueprint_id}
Delete a blueprint.
When the deletion succeeds, 204 No Content is returned.
OK
Unauthorized
Forbidden, insufficient privileges
Blueprint not found
curl --location --request DELETE 'https://api.cloudcraft.co/blueprint/{blueprint_id}'
package main
import (
"context"
"log"
"os"
"github.com/DataDog/cloudcraft-go"
)
func main() {
// Get the API key from the environment.
key, ok := os.LookupEnv("CLOUDCRAFT_API_KEY")
if !ok {
log.Fatal("missing env var: CLOUDCRAFT_API_KEY")
}
// Show usage if the number of command line arguments is not correct.
if len(os.Args) != 2 {
log.Fatalf("usage: %s <blueprint-id>", os.Args[0])
}
// Create new Config to initialize a Client.
cfg := cloudcraft.NewConfig(key)
// Create a new Client instance with the given Config.
client, err := cloudcraft.NewClient(cfg)
if err != nil {
log.Fatal(err)
}
// Delete the blueprint with the ID taken from a command line argument.
_, err = client.Blueprint.Delete(
context.Background(),
os.Args[1],
)
if err != nil {
log.Fatal(err)
}
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.cloudcraft.co/blueprint/{blueprint_id}")
.method("DELETE", body)
.build();
Response response = client.newCall(request).execute();
from cloudcraftco import Cloudcraft
cloudcraft = Cloudcraft()
blueprint_id = 1234
result = cloudcraft.delete_blueprint(blueprint_id)
require "uri"
require "net/http"
url = URI("https://api.cloudcraft.co/blueprint/{blueprint_id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = https.request(request)
puts response.read_body
var requestOptions = {
method: 'DELETE',
redirect: 'follow'
};
fetch("https://api.cloudcraft.co/blueprint/{blueprint_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
GET /blueprint/{blueprint_id}
Retrieve a blueprint in JSON format.
Retrieve blueprint
Unauthorized
Forbidden, insufficient privileges
Blueprint not found
curl --location 'https://api.cloudcraft.co/blueprint/{blueprint_id}'
package main
import (
"context"
"log"
"os"
"github.com/DataDog/cloudcraft-go"
)
func main() {
// Get the API key from the environment.
key, ok := os.LookupEnv("CLOUDCRAFT_API_KEY")
if !ok {
log.Fatal("missing env var: CLOUDCRAFT_API_KEY")
}
// Show usage if the number of command line arguments is not correct.
if len(os.Args) != 2 {
log.Fatalf("usage: %s <blueprint-id>", os.Args[0])
}
// Create new Config to initialize a Client.
cfg := cloudcraft.NewConfig(key)
// Create a new Client instance with the given Config.
client, err := cloudcraft.NewClient(cfg)
if err != nil {
log.Fatal(err)
}
// Get the blueprint with the ID taken from a command line argument.
blueprint, _, err := client.Blueprint.Get(
context.Background(),
os.Args[1],
)
if err != nil {
log.Fatal(err)
}
// Print the blueprint ID.
log.Println(blueprint.ID)
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.cloudcraft.co/blueprint/{blueprint_id}")
.method("GET", body)
.build();
Response response = client.newCall(request).execute();
from cloudcraftco import Cloudcraft
cloudcraft = Cloudcraft()
blueprint_id = 1234
blueprint = cloudcraft.read_blueprint(blueprint_id)
require "uri"
require "net/http"
url = URI("https://api.cloudcraft.co/blueprint/{blueprint_id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://api.cloudcraft.co/blueprint/{blueprint_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
PUT /blueprint/{blueprint_id}
Update an existing blueprint.
The body of the request should contain the updated blueprint document in JSON format.
Optionally, a conditional update of the blueprint can be perfomed by including the If-Match HTTP header with the same ETag value as provided by the “Retrieve blueprint” API. If the blueprint has been modified since the retrieval, the update is rejected with a 412 Resource out of date response. If the update succeeds, the new ETag is returned.
OK
Unauthorized
Forbidden, insufficient privileges
Blueprint not found
Resource out of date
curl --location --request PUT 'https://api.cloudcraft.co/blueprint/{blueprint_id}' \
--data '{"data": "%!s(<nil>)",
}'
package main
import (
"context"
"log"
"os"
"github.com/DataDog/cloudcraft-go"
)
func main() {
// Get the API key from the environment.
key, ok := os.LookupEnv("CLOUDCRAFT_API_KEY")
if !ok {
log.Fatal("missing env var: CLOUDCRAFT_API_KEY")
}
// Check if the command line arguments are correct.
if len(os.Args) != 3 {
log.Fatalf("usage: %s <blueprint-id> <blueprint-name>", os.Args[0])
}
// Create new Config to initialize a Client.
cfg := cloudcraft.NewConfig(key)
// Create a new Client instance with the given Config.
client, err := cloudcraft.NewClient(cfg)
if err != nil {
log.Fatal(err)
}
// Update the blueprint with the ID and name coming from command line
// arguments. Add a new EC2 node to the blueprint.
_, err = client.Blueprint.Update(
context.Background(),
&cloudcraft.Blueprint{
ID: os.Args[1],
Name: os.Args[2],
Data: &cloudcraft.BlueprintData{
Name: os.Args[2],
Nodes: []map[string]any{
{
"id": "98172baa-a059-4b04-832d-8a7f5d14b595",
"type": "ec2",
"region": "us-east-1",
"platform": "linux",
"instanceType": "m5",
"instanceSize": "large",
},
},
},
},
"",
)
if err != nil {
log.Fatal(err)
}
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"My updated AWS Account\",\n \"roleArn\": \"arn:aws:iam::1234567890:role/cloudcraft\"\n}\n");
Request request = new Request.Builder()
.url("https://api.cloudcraft.co/blueprint/{blueprint_id}")
.method("PUT", body)
.build();
Response response = client.newCall(request).execute();
from cloudcraftco import Cloudcraft
cloudcraft = Cloudcraft()
blueprint_id = 1234
data = {
"data": {
"grid": "standard",
"name": "Updated blueprint",
"text": [
{
"id": "label1",
"text": "Hello\nWorld!",
"type": "isotext",
"color": "#f5b720",
"mapPos": [0, 0],
"textSize": 15,
}
],
}
}
result = cloudcraft.update_blueprint(blueprint_id, data)
require "uri"
require "net/http"
url = URI("https://api.cloudcraft.co/blueprint/{blueprint_id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request.body = "{\n \"name\": \"My updated AWS Account\",\n \"roleArn\": \"arn:aws:iam::1234567890:role/cloudcraft\"\n}\n"
response = https.request(request)
puts response.read_body
var raw = "{\n \"name\": \"My updated AWS Account\",\n \"roleArn\": \"arn:aws:iam::1234567890:role/cloudcraft\"\n}\n";
var requestOptions = {
method: 'PUT',
body: raw,
redirect: 'follow'
};
fetch("https://api.cloudcraft.co/blueprint/{blueprint_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
GET /blueprint/{blueprint_id}/{format}
Render blueprint for export in SVG, PNG, PDF, or MxGraph format.
OK
Unauthorized
Forbidden, insufficient privileges
Blueprint not found
curl --location 'https://api.cloudcraft.co/blueprint/{blueprint_id}/{format}'
package main
import (
"context"
"log"
"os"
"github.com/DataDog/cloudcraft-go"
)
func main() {
// Get the API key from the environment.
key, ok := os.LookupEnv("CLOUDCRAFT_API_KEY")
if !ok {
log.Fatal("missing env var: CLOUDCRAFT_API_KEY")
}
// Check if the command line arguments are correct.
if len(os.Args) != 2 {
log.Fatalf("usage: %s <blueprint-id>", os.Args[0])
}
// Create new Config to initialize a Client.
cfg := cloudcraft.NewConfig(key)
// Create a new Client instance with the given Config.
client, err := cloudcraft.NewClient(cfg)
if err != nil {
log.Fatal(err)
}
// Export the blueprint as an image with the given blueprint-id coming from
// a command line argument.
image, _, err := client.Blueprint.ExportImage(
context.Background(),
os.Args[1],
"png",
&cloudcraft.ImageExportParams{
Width: 1920,
Height: 1080,
},
)
if err != nil {
log.Fatal(err)
}
// Save the blueprint export to a file.
if err := os.WriteFile("blueprint.png", image, 0o600); err != nil {
log.Fatal(err)
}
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.cloudcraft.co/blueprint/{blueprint_id}/{format}")
.method("GET", body)
.build();
Response response = client.newCall(request).execute();
from cloudcraftco import Cloudcraft
cloudcraft = Cloudcraft()
blueprints = cloudcraft.list_blueprints()
blueprint_id = 1234
bp_format = "png"
export = cloudcraft.export_blueprint(blueprint_id, bp_format)
with open(f'export.{bp_format}', "wb") as binary_file:
binary_file.write(export)
require "uri"
require "net/http"
url = URI("https://api.cloudcraft.co/blueprint/{blueprint_id}/{format}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://api.cloudcraft.co/blueprint/{blueprint_id}/{format}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));