Create Application With Variant
curl --request POST \
--url https://api.egp.scale.com/v4/application-with-variant \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"application_spec_name": "<string>",
"application_spec_description": "<string>",
"variant": {
"name": "<string>",
"configuration": {
"nodes": [
{
"id": "<string>",
"configuration": {}
}
],
"edges": [
{
"from_node": "<string>",
"to_node": "<string>",
"from_field": "<string>",
"to_field": "<string>"
}
],
"metadata": {}
},
"version": "<string>",
"account_id": "<string>",
"description": "<string>",
"application_spec_id": "<string>",
"draft": true,
"published_at": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.egp.scale.com/v4/application-with-variant"
payload = {
"application_spec_name": "<string>",
"application_spec_description": "<string>",
"variant": {
"name": "<string>",
"configuration": {
"nodes": [
{
"id": "<string>",
"configuration": {}
}
],
"edges": [
{
"from_node": "<string>",
"to_node": "<string>",
"from_field": "<string>",
"to_field": "<string>"
}
],
"metadata": {}
},
"version": "<string>",
"account_id": "<string>",
"description": "<string>",
"application_spec_id": "<string>",
"draft": True,
"published_at": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_spec_name: '<string>',
application_spec_description: '<string>',
variant: {
name: '<string>',
configuration: {
nodes: [{id: '<string>', configuration: {}}],
edges: [
{
from_node: '<string>',
to_node: '<string>',
from_field: '<string>',
to_field: '<string>'
}
],
metadata: {}
},
version: '<string>',
account_id: '<string>',
description: '<string>',
application_spec_id: '<string>',
draft: true,
published_at: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.egp.scale.com/v4/application-with-variant', 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://api.egp.scale.com/v4/application-with-variant",
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([
'application_spec_name' => '<string>',
'application_spec_description' => '<string>',
'variant' => [
'name' => '<string>',
'configuration' => [
'nodes' => [
[
'id' => '<string>',
'configuration' => [
]
]
],
'edges' => [
[
'from_node' => '<string>',
'to_node' => '<string>',
'from_field' => '<string>',
'to_field' => '<string>'
]
],
'metadata' => [
]
],
'version' => '<string>',
'account_id' => '<string>',
'description' => '<string>',
'application_spec_id' => '<string>',
'draft' => true,
'published_at' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.egp.scale.com/v4/application-with-variant"
payload := strings.NewReader("{\n \"application_spec_name\": \"<string>\",\n \"application_spec_description\": \"<string>\",\n \"variant\": {\n \"name\": \"<string>\",\n \"configuration\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"configuration\": {}\n }\n ],\n \"edges\": [\n {\n \"from_node\": \"<string>\",\n \"to_node\": \"<string>\",\n \"from_field\": \"<string>\",\n \"to_field\": \"<string>\"\n }\n ],\n \"metadata\": {}\n },\n \"version\": \"<string>\",\n \"account_id\": \"<string>\",\n \"description\": \"<string>\",\n \"application_spec_id\": \"<string>\",\n \"draft\": true,\n \"published_at\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.egp.scale.com/v4/application-with-variant")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"application_spec_name\": \"<string>\",\n \"application_spec_description\": \"<string>\",\n \"variant\": {\n \"name\": \"<string>\",\n \"configuration\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"configuration\": {}\n }\n ],\n \"edges\": [\n {\n \"from_node\": \"<string>\",\n \"to_node\": \"<string>\",\n \"from_field\": \"<string>\",\n \"to_field\": \"<string>\"\n }\n ],\n \"metadata\": {}\n },\n \"version\": \"<string>\",\n \"account_id\": \"<string>\",\n \"description\": \"<string>\",\n \"application_spec_id\": \"<string>\",\n \"draft\": true,\n \"published_at\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/application-with-variant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_spec_name\": \"<string>\",\n \"application_spec_description\": \"<string>\",\n \"variant\": {\n \"name\": \"<string>\",\n \"configuration\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"configuration\": {}\n }\n ],\n \"edges\": [\n {\n \"from_node\": \"<string>\",\n \"to_node\": \"<string>\",\n \"from_field\": \"<string>\",\n \"to_field\": \"<string>\"\n }\n ],\n \"metadata\": {}\n },\n \"version\": \"<string>\",\n \"account_id\": \"<string>\",\n \"description\": \"<string>\",\n \"application_spec_id\": \"<string>\",\n \"draft\": true,\n \"published_at\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"configuration": {
"nodes": [
{
"id": "<string>",
"configuration": {}
}
],
"edges": [
{
"from_node": "<string>",
"to_node": "<string>",
"from_field": "<string>",
"to_field": "<string>"
}
],
"metadata": {}
},
"version": "<string>",
"application_spec_id": "<string>",
"draft": true,
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Applications
Create Application With Variant
Create an application with a variant in a single transaction.
POST
/
v4
/
application-with-variant
Create Application With Variant
curl --request POST \
--url https://api.egp.scale.com/v4/application-with-variant \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"application_spec_name": "<string>",
"application_spec_description": "<string>",
"variant": {
"name": "<string>",
"configuration": {
"nodes": [
{
"id": "<string>",
"configuration": {}
}
],
"edges": [
{
"from_node": "<string>",
"to_node": "<string>",
"from_field": "<string>",
"to_field": "<string>"
}
],
"metadata": {}
},
"version": "<string>",
"account_id": "<string>",
"description": "<string>",
"application_spec_id": "<string>",
"draft": true,
"published_at": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.egp.scale.com/v4/application-with-variant"
payload = {
"application_spec_name": "<string>",
"application_spec_description": "<string>",
"variant": {
"name": "<string>",
"configuration": {
"nodes": [
{
"id": "<string>",
"configuration": {}
}
],
"edges": [
{
"from_node": "<string>",
"to_node": "<string>",
"from_field": "<string>",
"to_field": "<string>"
}
],
"metadata": {}
},
"version": "<string>",
"account_id": "<string>",
"description": "<string>",
"application_spec_id": "<string>",
"draft": True,
"published_at": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_spec_name: '<string>',
application_spec_description: '<string>',
variant: {
name: '<string>',
configuration: {
nodes: [{id: '<string>', configuration: {}}],
edges: [
{
from_node: '<string>',
to_node: '<string>',
from_field: '<string>',
to_field: '<string>'
}
],
metadata: {}
},
version: '<string>',
account_id: '<string>',
description: '<string>',
application_spec_id: '<string>',
draft: true,
published_at: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.egp.scale.com/v4/application-with-variant', 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://api.egp.scale.com/v4/application-with-variant",
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([
'application_spec_name' => '<string>',
'application_spec_description' => '<string>',
'variant' => [
'name' => '<string>',
'configuration' => [
'nodes' => [
[
'id' => '<string>',
'configuration' => [
]
]
],
'edges' => [
[
'from_node' => '<string>',
'to_node' => '<string>',
'from_field' => '<string>',
'to_field' => '<string>'
]
],
'metadata' => [
]
],
'version' => '<string>',
'account_id' => '<string>',
'description' => '<string>',
'application_spec_id' => '<string>',
'draft' => true,
'published_at' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.egp.scale.com/v4/application-with-variant"
payload := strings.NewReader("{\n \"application_spec_name\": \"<string>\",\n \"application_spec_description\": \"<string>\",\n \"variant\": {\n \"name\": \"<string>\",\n \"configuration\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"configuration\": {}\n }\n ],\n \"edges\": [\n {\n \"from_node\": \"<string>\",\n \"to_node\": \"<string>\",\n \"from_field\": \"<string>\",\n \"to_field\": \"<string>\"\n }\n ],\n \"metadata\": {}\n },\n \"version\": \"<string>\",\n \"account_id\": \"<string>\",\n \"description\": \"<string>\",\n \"application_spec_id\": \"<string>\",\n \"draft\": true,\n \"published_at\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.egp.scale.com/v4/application-with-variant")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"application_spec_name\": \"<string>\",\n \"application_spec_description\": \"<string>\",\n \"variant\": {\n \"name\": \"<string>\",\n \"configuration\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"configuration\": {}\n }\n ],\n \"edges\": [\n {\n \"from_node\": \"<string>\",\n \"to_node\": \"<string>\",\n \"from_field\": \"<string>\",\n \"to_field\": \"<string>\"\n }\n ],\n \"metadata\": {}\n },\n \"version\": \"<string>\",\n \"account_id\": \"<string>\",\n \"description\": \"<string>\",\n \"application_spec_id\": \"<string>\",\n \"draft\": true,\n \"published_at\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/application-with-variant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_spec_name\": \"<string>\",\n \"application_spec_description\": \"<string>\",\n \"variant\": {\n \"name\": \"<string>\",\n \"configuration\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"configuration\": {}\n }\n ],\n \"edges\": [\n {\n \"from_node\": \"<string>\",\n \"to_node\": \"<string>\",\n \"from_field\": \"<string>\",\n \"to_field\": \"<string>\"\n }\n ],\n \"metadata\": {}\n },\n \"version\": \"<string>\",\n \"account_id\": \"<string>\",\n \"description\": \"<string>\",\n \"application_spec_id\": \"<string>\",\n \"draft\": true,\n \"published_at\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"configuration": {
"nodes": [
{
"id": "<string>",
"configuration": {}
}
],
"edges": [
{
"from_node": "<string>",
"to_node": "<string>",
"from_field": "<string>",
"to_field": "<string>"
}
],
"metadata": {}
},
"version": "<string>",
"application_spec_id": "<string>",
"draft": true,
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
- ApplicationVariantV0RequestWithoutSpecId
- ApplicationVariantAgentsServiceRequestWithoutSpecId
- OfflineApplicationVariantRequestWithoutSpecId
Show child attributes
Show child attributes
Response
Successful Response
- ApplicationVariantV0Response
- ApplicationVariantAgentsServiceResponse
- OfflineApplicationVariantResponse
Show child attributes
Show child attributes
Allowed value:
"V0"Boolean to indicate whether the variant is in draft mode
The ID of the account that owns the given entity.
The date and time when the entity was created in ISO format.
The date and time when the entity was last updated in ISO format.
Optional description of the application variant
The date and time that the variant was published.
The user who originally created the entity.
The type of identity that created the entity.
Available options:
user, service_account ⌘I

