Create a data plane
curl --request POST \
--url https://api-dev.narrative.io/data-planes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"external_id": "<string>",
"platform": {
"type": "platform_aws",
"region": "<string>"
},
"tags": [
"<string>"
],
"description": "<string>"
}
'import requests
url = "https://api-dev.narrative.io/data-planes"
payload = {
"display_name": "<string>",
"external_id": "<string>",
"platform": {
"type": "platform_aws",
"region": "<string>"
},
"tags": ["<string>"],
"description": "<string>"
}
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({
display_name: '<string>',
external_id: '<string>',
platform: {type: 'platform_aws', region: '<string>'},
tags: ['<string>'],
description: '<string>'
})
};
fetch('https://api-dev.narrative.io/data-planes', 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-dev.narrative.io/data-planes",
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([
'display_name' => '<string>',
'external_id' => '<string>',
'platform' => [
'type' => 'platform_aws',
'region' => '<string>'
],
'tags' => [
'<string>'
],
'description' => '<string>'
]),
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://api-dev.narrative.io/data-planes"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"platform\": {\n \"type\": \"platform_aws\",\n \"region\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"description\": \"<string>\"\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://api-dev.narrative.io/data-planes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"platform\": {\n \"type\": \"platform_aws\",\n \"region\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/data-planes")
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 \"display_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"platform\": {\n \"type\": \"platform_aws\",\n \"region\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "owned",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"external_id": "<string>",
"platform": {
"type": "platform_aws",
"region": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z",
"collaborators": {
"participants": {
"type": "all"
},
"manage_compute_pools": {
"type": "all"
}
},
"description": "<string>",
"last_heartbeat_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"default_compute_pool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"compute_pools": [
{
"type": "owned",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": 123,
"data_plane_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": {
"type": "snowflake_warehouse",
"name": "<string>",
"alias": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"name": "<string>",
"display_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"provider": {
"type": "snowflake_warehouse",
"warehouse_name": "<string>",
"auto_suspend": 123,
"auto_resume": true,
"min_cluster_count": 123,
"max_cluster_count": 123,
"max_concurrency_level": 123,
"statement_queued_timeout_in_seconds": 123,
"statement_timeout_in_seconds": 123,
"enable_query_acceleration": true,
"query_acceleration_max_scale_factor": 123,
"resource_constraint": "<string>",
"comment": "<string>"
},
"collaborators": {
"use": {
"type": "all"
}
},
"description": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Data Planes
Create a data plane
Create a new data plane owned by the authenticated company.
POST
/
data-planes
Create a data plane
curl --request POST \
--url https://api-dev.narrative.io/data-planes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"external_id": "<string>",
"platform": {
"type": "platform_aws",
"region": "<string>"
},
"tags": [
"<string>"
],
"description": "<string>"
}
'import requests
url = "https://api-dev.narrative.io/data-planes"
payload = {
"display_name": "<string>",
"external_id": "<string>",
"platform": {
"type": "platform_aws",
"region": "<string>"
},
"tags": ["<string>"],
"description": "<string>"
}
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({
display_name: '<string>',
external_id: '<string>',
platform: {type: 'platform_aws', region: '<string>'},
tags: ['<string>'],
description: '<string>'
})
};
fetch('https://api-dev.narrative.io/data-planes', 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-dev.narrative.io/data-planes",
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([
'display_name' => '<string>',
'external_id' => '<string>',
'platform' => [
'type' => 'platform_aws',
'region' => '<string>'
],
'tags' => [
'<string>'
],
'description' => '<string>'
]),
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://api-dev.narrative.io/data-planes"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"platform\": {\n \"type\": \"platform_aws\",\n \"region\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"description\": \"<string>\"\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://api-dev.narrative.io/data-planes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"platform\": {\n \"type\": \"platform_aws\",\n \"region\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/data-planes")
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 \"display_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"platform\": {\n \"type\": \"platform_aws\",\n \"region\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "owned",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"external_id": "<string>",
"platform": {
"type": "platform_aws",
"region": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z",
"collaborators": {
"participants": {
"type": "all"
},
"manage_compute_pools": {
"type": "all"
}
},
"description": "<string>",
"last_heartbeat_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"default_compute_pool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"compute_pools": [
{
"type": "owned",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": 123,
"data_plane_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": {
"type": "snowflake_warehouse",
"name": "<string>",
"alias": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"name": "<string>",
"display_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"provider": {
"type": "snowflake_warehouse",
"warehouse_name": "<string>",
"auto_suspend": 123,
"auto_resume": true,
"min_cluster_count": 123,
"max_cluster_count": 123,
"max_concurrency_level": 123,
"statement_queued_timeout_in_seconds": 123,
"statement_timeout_in_seconds": 123,
"enable_query_acceleration": true,
"query_acceleration_max_scale_factor": 123,
"resource_constraint": "<string>",
"comment": "<string>"
},
"collaborators": {
"use": {
"type": "all"
}
},
"description": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200 - application/json
Created
- Option 1
- Option 2
Available options:
owned - Option 1
- Option 2
Show child attributes
Show child attributes
Available options:
active, archived Show child attributes
Show child attributes
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?
⌘I

