curl --request POST \
--url https://app.diagramkit.ai/api/v1/diagrams/{id}/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"page": 1,
"text": [
{
"before": "<string>",
"after": "<string>"
}
],
"restyle": [
{
"part": "<string>",
"style": {
"stroke": "<string>",
"fill": "<string>",
"background-color": "<string>",
"color": "<string>",
"font-family": "<string>",
"font-size": "<string>",
"font-weight": "<string>",
"visibility": "<string>"
}
}
],
"hide": [
"<string>"
],
"show": [
"<string>"
],
"nudge": [
{
"part": "<string>",
"dx": 0,
"dy": 0,
"layout": "wide"
}
],
"place": [
{
"part": "<string>",
"relative_to": "<string>",
"gap": 40,
"layout": "wide"
}
],
"swap": [
{
"a": "<string>",
"b": "<string>",
"layout": "wide"
}
],
"move": [
{
"part": "<string>",
"dx": 0,
"dy": 0,
"layout": "wide"
}
],
"styles": [
{
"path": "<string>",
"style": {},
"label": "<string>",
"tag": "<string>"
}
],
"moves": [
{
"key": "<string>",
"dx": 123,
"dy": 123
}
]
}
'import requests
url = "https://app.diagramkit.ai/api/v1/diagrams/{id}/edits"
payload = {
"page": 1,
"text": [
{
"before": "<string>",
"after": "<string>"
}
],
"restyle": [
{
"part": "<string>",
"style": {
"stroke": "<string>",
"fill": "<string>",
"background-color": "<string>",
"color": "<string>",
"font-family": "<string>",
"font-size": "<string>",
"font-weight": "<string>",
"visibility": "<string>"
}
}
],
"hide": ["<string>"],
"show": ["<string>"],
"nudge": [
{
"part": "<string>",
"dx": 0,
"dy": 0,
"layout": "wide"
}
],
"place": [
{
"part": "<string>",
"relative_to": "<string>",
"gap": 40,
"layout": "wide"
}
],
"swap": [
{
"a": "<string>",
"b": "<string>",
"layout": "wide"
}
],
"move": [
{
"part": "<string>",
"dx": 0,
"dy": 0,
"layout": "wide"
}
],
"styles": [
{
"path": "<string>",
"style": {},
"label": "<string>",
"tag": "<string>"
}
],
"moves": [
{
"key": "<string>",
"dx": 123,
"dy": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
page: 1,
text: [{before: '<string>', after: '<string>'}],
restyle: [
{
part: '<string>',
style: {
stroke: '<string>',
fill: '<string>',
'background-color': '<string>',
color: '<string>',
'font-family': '<string>',
'font-size': '<string>',
'font-weight': '<string>',
visibility: '<string>'
}
}
],
hide: ['<string>'],
show: ['<string>'],
nudge: [{part: '<string>', dx: 0, dy: 0, layout: 'wide'}],
place: [{part: '<string>', relative_to: '<string>', gap: 40, layout: 'wide'}],
swap: [{a: '<string>', b: '<string>', layout: 'wide'}],
move: [{part: '<string>', dx: 0, dy: 0, layout: 'wide'}],
styles: [{path: '<string>', style: {}, label: '<string>', tag: '<string>'}],
moves: [{key: '<string>', dx: 123, dy: 123}]
})
};
fetch('https://app.diagramkit.ai/api/v1/diagrams/{id}/edits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.diagramkit.ai/api/v1/diagrams/{id}/edits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'page' => 1,
'text' => [
[
'before' => '<string>',
'after' => '<string>'
]
],
'restyle' => [
[
'part' => '<string>',
'style' => [
'stroke' => '<string>',
'fill' => '<string>',
'background-color' => '<string>',
'color' => '<string>',
'font-family' => '<string>',
'font-size' => '<string>',
'font-weight' => '<string>',
'visibility' => '<string>'
]
]
],
'hide' => [
'<string>'
],
'show' => [
'<string>'
],
'nudge' => [
[
'part' => '<string>',
'dx' => 0,
'dy' => 0,
'layout' => 'wide'
]
],
'place' => [
[
'part' => '<string>',
'relative_to' => '<string>',
'gap' => 40,
'layout' => 'wide'
]
],
'swap' => [
[
'a' => '<string>',
'b' => '<string>',
'layout' => 'wide'
]
],
'move' => [
[
'part' => '<string>',
'dx' => 0,
'dy' => 0,
'layout' => 'wide'
]
],
'styles' => [
[
'path' => '<string>',
'style' => [
],
'label' => '<string>',
'tag' => '<string>'
]
],
'moves' => [
[
'key' => '<string>',
'dx' => 123,
'dy' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.diagramkit.ai/api/v1/diagrams/{id}/edits"
payload := strings.NewReader("{\n \"page\": 1,\n \"text\": [\n {\n \"before\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"restyle\": [\n {\n \"part\": \"<string>\",\n \"style\": {\n \"stroke\": \"<string>\",\n \"fill\": \"<string>\",\n \"background-color\": \"<string>\",\n \"color\": \"<string>\",\n \"font-family\": \"<string>\",\n \"font-size\": \"<string>\",\n \"font-weight\": \"<string>\",\n \"visibility\": \"<string>\"\n }\n }\n ],\n \"hide\": [\n \"<string>\"\n ],\n \"show\": [\n \"<string>\"\n ],\n \"nudge\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"place\": [\n {\n \"part\": \"<string>\",\n \"relative_to\": \"<string>\",\n \"gap\": 40,\n \"layout\": \"wide\"\n }\n ],\n \"swap\": [\n {\n \"a\": \"<string>\",\n \"b\": \"<string>\",\n \"layout\": \"wide\"\n }\n ],\n \"move\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"styles\": [\n {\n \"path\": \"<string>\",\n \"style\": {},\n \"label\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"moves\": [\n {\n \"key\": \"<string>\",\n \"dx\": 123,\n \"dy\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.diagramkit.ai/api/v1/diagrams/{id}/edits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"page\": 1,\n \"text\": [\n {\n \"before\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"restyle\": [\n {\n \"part\": \"<string>\",\n \"style\": {\n \"stroke\": \"<string>\",\n \"fill\": \"<string>\",\n \"background-color\": \"<string>\",\n \"color\": \"<string>\",\n \"font-family\": \"<string>\",\n \"font-size\": \"<string>\",\n \"font-weight\": \"<string>\",\n \"visibility\": \"<string>\"\n }\n }\n ],\n \"hide\": [\n \"<string>\"\n ],\n \"show\": [\n \"<string>\"\n ],\n \"nudge\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"place\": [\n {\n \"part\": \"<string>\",\n \"relative_to\": \"<string>\",\n \"gap\": 40,\n \"layout\": \"wide\"\n }\n ],\n \"swap\": [\n {\n \"a\": \"<string>\",\n \"b\": \"<string>\",\n \"layout\": \"wide\"\n }\n ],\n \"move\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"styles\": [\n {\n \"path\": \"<string>\",\n \"style\": {},\n \"label\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"moves\": [\n {\n \"key\": \"<string>\",\n \"dx\": 123,\n \"dy\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.diagramkit.ai/api/v1/diagrams/{id}/edits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"page\": 1,\n \"text\": [\n {\n \"before\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"restyle\": [\n {\n \"part\": \"<string>\",\n \"style\": {\n \"stroke\": \"<string>\",\n \"fill\": \"<string>\",\n \"background-color\": \"<string>\",\n \"color\": \"<string>\",\n \"font-family\": \"<string>\",\n \"font-size\": \"<string>\",\n \"font-weight\": \"<string>\",\n \"visibility\": \"<string>\"\n }\n }\n ],\n \"hide\": [\n \"<string>\"\n ],\n \"show\": [\n \"<string>\"\n ],\n \"nudge\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"place\": [\n {\n \"part\": \"<string>\",\n \"relative_to\": \"<string>\",\n \"gap\": 40,\n \"layout\": \"wide\"\n }\n ],\n \"swap\": [\n {\n \"a\": \"<string>\",\n \"b\": \"<string>\",\n \"layout\": \"wide\"\n }\n ],\n \"move\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"styles\": [\n {\n \"path\": \"<string>\",\n \"style\": {},\n \"label\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"moves\": [\n {\n \"key\": \"<string>\",\n \"dx\": 123,\n \"dy\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"version": 123,
"animated": true,
"created_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"preset": "<string>",
"progress": "<string>",
"image_url": "<string>",
"downloads": {},
"recommended_download": {
"format": "<string>",
"url": "<string>",
"options": {}
},
"error": {
"type": "generation_failed",
"message": "<string>"
},
"applied": [
{}
],
"moved": [
{
"part": "<string>",
"wide": [
123
],
"compact": [
123
]
}
],
"skipped": [
{}
]
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"version": 123,
"animated": true,
"created_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"preset": "<string>",
"progress": "<string>",
"image_url": "<string>",
"downloads": {},
"recommended_download": {
"format": "<string>",
"url": "<string>",
"options": {}
},
"error": {
"type": "generation_failed",
"message": "<string>"
},
"applied": [
{}
],
"moved": [
{
"part": "<string>",
"wide": [
123
],
"compact": [
123
]
}
],
"skipped": [
{}
]
}{
"error": {
"type": "<string>",
"message": "<string>",
"issues": [
"<string>"
]
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"issues": [
"<string>"
]
}
}Edit without the AI: wording, and by part: restyle, hide, show, nudge, place, swap, move, align, distribute
curl --request POST \
--url https://app.diagramkit.ai/api/v1/diagrams/{id}/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"page": 1,
"text": [
{
"before": "<string>",
"after": "<string>"
}
],
"restyle": [
{
"part": "<string>",
"style": {
"stroke": "<string>",
"fill": "<string>",
"background-color": "<string>",
"color": "<string>",
"font-family": "<string>",
"font-size": "<string>",
"font-weight": "<string>",
"visibility": "<string>"
}
}
],
"hide": [
"<string>"
],
"show": [
"<string>"
],
"nudge": [
{
"part": "<string>",
"dx": 0,
"dy": 0,
"layout": "wide"
}
],
"place": [
{
"part": "<string>",
"relative_to": "<string>",
"gap": 40,
"layout": "wide"
}
],
"swap": [
{
"a": "<string>",
"b": "<string>",
"layout": "wide"
}
],
"move": [
{
"part": "<string>",
"dx": 0,
"dy": 0,
"layout": "wide"
}
],
"styles": [
{
"path": "<string>",
"style": {},
"label": "<string>",
"tag": "<string>"
}
],
"moves": [
{
"key": "<string>",
"dx": 123,
"dy": 123
}
]
}
'import requests
url = "https://app.diagramkit.ai/api/v1/diagrams/{id}/edits"
payload = {
"page": 1,
"text": [
{
"before": "<string>",
"after": "<string>"
}
],
"restyle": [
{
"part": "<string>",
"style": {
"stroke": "<string>",
"fill": "<string>",
"background-color": "<string>",
"color": "<string>",
"font-family": "<string>",
"font-size": "<string>",
"font-weight": "<string>",
"visibility": "<string>"
}
}
],
"hide": ["<string>"],
"show": ["<string>"],
"nudge": [
{
"part": "<string>",
"dx": 0,
"dy": 0,
"layout": "wide"
}
],
"place": [
{
"part": "<string>",
"relative_to": "<string>",
"gap": 40,
"layout": "wide"
}
],
"swap": [
{
"a": "<string>",
"b": "<string>",
"layout": "wide"
}
],
"move": [
{
"part": "<string>",
"dx": 0,
"dy": 0,
"layout": "wide"
}
],
"styles": [
{
"path": "<string>",
"style": {},
"label": "<string>",
"tag": "<string>"
}
],
"moves": [
{
"key": "<string>",
"dx": 123,
"dy": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
page: 1,
text: [{before: '<string>', after: '<string>'}],
restyle: [
{
part: '<string>',
style: {
stroke: '<string>',
fill: '<string>',
'background-color': '<string>',
color: '<string>',
'font-family': '<string>',
'font-size': '<string>',
'font-weight': '<string>',
visibility: '<string>'
}
}
],
hide: ['<string>'],
show: ['<string>'],
nudge: [{part: '<string>', dx: 0, dy: 0, layout: 'wide'}],
place: [{part: '<string>', relative_to: '<string>', gap: 40, layout: 'wide'}],
swap: [{a: '<string>', b: '<string>', layout: 'wide'}],
move: [{part: '<string>', dx: 0, dy: 0, layout: 'wide'}],
styles: [{path: '<string>', style: {}, label: '<string>', tag: '<string>'}],
moves: [{key: '<string>', dx: 123, dy: 123}]
})
};
fetch('https://app.diagramkit.ai/api/v1/diagrams/{id}/edits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.diagramkit.ai/api/v1/diagrams/{id}/edits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'page' => 1,
'text' => [
[
'before' => '<string>',
'after' => '<string>'
]
],
'restyle' => [
[
'part' => '<string>',
'style' => [
'stroke' => '<string>',
'fill' => '<string>',
'background-color' => '<string>',
'color' => '<string>',
'font-family' => '<string>',
'font-size' => '<string>',
'font-weight' => '<string>',
'visibility' => '<string>'
]
]
],
'hide' => [
'<string>'
],
'show' => [
'<string>'
],
'nudge' => [
[
'part' => '<string>',
'dx' => 0,
'dy' => 0,
'layout' => 'wide'
]
],
'place' => [
[
'part' => '<string>',
'relative_to' => '<string>',
'gap' => 40,
'layout' => 'wide'
]
],
'swap' => [
[
'a' => '<string>',
'b' => '<string>',
'layout' => 'wide'
]
],
'move' => [
[
'part' => '<string>',
'dx' => 0,
'dy' => 0,
'layout' => 'wide'
]
],
'styles' => [
[
'path' => '<string>',
'style' => [
],
'label' => '<string>',
'tag' => '<string>'
]
],
'moves' => [
[
'key' => '<string>',
'dx' => 123,
'dy' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.diagramkit.ai/api/v1/diagrams/{id}/edits"
payload := strings.NewReader("{\n \"page\": 1,\n \"text\": [\n {\n \"before\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"restyle\": [\n {\n \"part\": \"<string>\",\n \"style\": {\n \"stroke\": \"<string>\",\n \"fill\": \"<string>\",\n \"background-color\": \"<string>\",\n \"color\": \"<string>\",\n \"font-family\": \"<string>\",\n \"font-size\": \"<string>\",\n \"font-weight\": \"<string>\",\n \"visibility\": \"<string>\"\n }\n }\n ],\n \"hide\": [\n \"<string>\"\n ],\n \"show\": [\n \"<string>\"\n ],\n \"nudge\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"place\": [\n {\n \"part\": \"<string>\",\n \"relative_to\": \"<string>\",\n \"gap\": 40,\n \"layout\": \"wide\"\n }\n ],\n \"swap\": [\n {\n \"a\": \"<string>\",\n \"b\": \"<string>\",\n \"layout\": \"wide\"\n }\n ],\n \"move\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"styles\": [\n {\n \"path\": \"<string>\",\n \"style\": {},\n \"label\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"moves\": [\n {\n \"key\": \"<string>\",\n \"dx\": 123,\n \"dy\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.diagramkit.ai/api/v1/diagrams/{id}/edits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"page\": 1,\n \"text\": [\n {\n \"before\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"restyle\": [\n {\n \"part\": \"<string>\",\n \"style\": {\n \"stroke\": \"<string>\",\n \"fill\": \"<string>\",\n \"background-color\": \"<string>\",\n \"color\": \"<string>\",\n \"font-family\": \"<string>\",\n \"font-size\": \"<string>\",\n \"font-weight\": \"<string>\",\n \"visibility\": \"<string>\"\n }\n }\n ],\n \"hide\": [\n \"<string>\"\n ],\n \"show\": [\n \"<string>\"\n ],\n \"nudge\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"place\": [\n {\n \"part\": \"<string>\",\n \"relative_to\": \"<string>\",\n \"gap\": 40,\n \"layout\": \"wide\"\n }\n ],\n \"swap\": [\n {\n \"a\": \"<string>\",\n \"b\": \"<string>\",\n \"layout\": \"wide\"\n }\n ],\n \"move\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"styles\": [\n {\n \"path\": \"<string>\",\n \"style\": {},\n \"label\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"moves\": [\n {\n \"key\": \"<string>\",\n \"dx\": 123,\n \"dy\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.diagramkit.ai/api/v1/diagrams/{id}/edits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"page\": 1,\n \"text\": [\n {\n \"before\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"restyle\": [\n {\n \"part\": \"<string>\",\n \"style\": {\n \"stroke\": \"<string>\",\n \"fill\": \"<string>\",\n \"background-color\": \"<string>\",\n \"color\": \"<string>\",\n \"font-family\": \"<string>\",\n \"font-size\": \"<string>\",\n \"font-weight\": \"<string>\",\n \"visibility\": \"<string>\"\n }\n }\n ],\n \"hide\": [\n \"<string>\"\n ],\n \"show\": [\n \"<string>\"\n ],\n \"nudge\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"place\": [\n {\n \"part\": \"<string>\",\n \"relative_to\": \"<string>\",\n \"gap\": 40,\n \"layout\": \"wide\"\n }\n ],\n \"swap\": [\n {\n \"a\": \"<string>\",\n \"b\": \"<string>\",\n \"layout\": \"wide\"\n }\n ],\n \"move\": [\n {\n \"part\": \"<string>\",\n \"dx\": 0,\n \"dy\": 0,\n \"layout\": \"wide\"\n }\n ],\n \"styles\": [\n {\n \"path\": \"<string>\",\n \"style\": {},\n \"label\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ],\n \"moves\": [\n {\n \"key\": \"<string>\",\n \"dx\": 123,\n \"dy\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"version": 123,
"animated": true,
"created_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"preset": "<string>",
"progress": "<string>",
"image_url": "<string>",
"downloads": {},
"recommended_download": {
"format": "<string>",
"url": "<string>",
"options": {}
},
"error": {
"type": "generation_failed",
"message": "<string>"
},
"applied": [
{}
],
"moved": [
{
"part": "<string>",
"wide": [
123
],
"compact": [
123
]
}
],
"skipped": [
{}
]
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"version": 123,
"animated": true,
"created_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"preset": "<string>",
"progress": "<string>",
"image_url": "<string>",
"downloads": {},
"recommended_download": {
"format": "<string>",
"url": "<string>",
"options": {}
},
"error": {
"type": "generation_failed",
"message": "<string>"
},
"applied": [
{}
],
"moved": [
{
"part": "<string>",
"wide": [
123
],
"compact": [
123
]
}
],
"skipped": [
{}
]
}{
"error": {
"type": "<string>",
"message": "<string>",
"issues": [
"<string>"
]
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"issues": [
"<string>"
]
}
}Authorizations
An API key (aid_…) from Settings › API.
Path Parameters
Body
At least one edit. Parts are named by their ids from GET /diagrams/{id}/parts.
Which page of a multi-page diagram.
1 <= x <= 100Wording. Also accepted as edits.
30Show child attributes
Show child attributes
100Show child attributes
Show child attributes
100A part id from the parts list: a name from what the part is, such as "node:api", "link:api->db", "text:monthly-revenue", "cell:0/2" or "mark:revenue/2024", which stays the same through edits; or its position, such as "0/2/1".
250Parts hidden earlier with hide.
100A part id from the parts list: a name from what the part is, such as "node:api", "link:api->db", "text:monthly-revenue", "cell:0/2" or "mark:revenue/2024", which stays the same through edits; or its position, such as "0/2/1".
250Shift a movable part dx, dy px from where it is now.
100Show child attributes
Show child attributes
Put a movable part beside another, centred on it across that side.
100Show child attributes
Show child attributes
Exchange two movable parts' positions, centre for centre.
50Show child attributes
Show child attributes
Offset in px from where diagramkit placed the part (0, 0 puts it back).
100Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The canvas editor's own form, by element position.
100Show child attributes
Show child attributes
The canvas editor's own form, by move key.
100Show child attributes
Show child attributes
Response
The finished job.
queued, running, succeeded, failed How many versions it has; 0 until the first is made.
What the diagram shows and any assumptions it made.
Where the diagram will be used, as it was made or last revised for; null without one.
png, jpg, svg, pdf, and mp4 and gif when animated.
Show child attributes
Show child attributes
With a preset, once there is a version: the download it offers first, as format, url and the query options in that url.
Show child attributes
Show child attributes
Why a failed job failed. type no_credits (the balance cannot pay for the planned pages) and too_many_pages (a set longer than max_pages or 100 pages) are refused before anything is drawn or charged; otherwise generation_failed.
Show child attributes
Show child attributes
Edits only: the wording changes made.
Edits only: each part an edit moved, with its new box [left, top, width, height] per layout.
Show child attributes
Show child attributes
Edits only: the wording changes not made, with a reason.