List compute pools
curl --request GET \
--url https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools', 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/{data_plane_id}/compute-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"type": "owned",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": 345,
"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>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"provider": {
"type": "snowflake_warehouse",
"warehouse_name": "<string>",
"size": "x_small",
"warehouse_type": "standard",
"auto_suspend": 123,
"auto_resume": true,
"min_cluster_count": 123,
"max_cluster_count": 123,
"scaling_policy": "standard",
"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"
}
},
"default_source": "company",
"description": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Compute Pools
List compute pools
Retrieve the active compute pools on the data plane that are accessible to the authenticated company. Archived pools are never listed. At most one pool in the response has a non-null default_source — that is the pool the company’s jobs run on when they don’t name one themselves.
GET
/
data-planes
/
{data_plane_id}
/
compute-pools
List compute pools
curl --request GET \
--url https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools', 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/{data_plane_id}/compute-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/data-planes/{data_plane_id}/compute-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"type": "owned",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": 345,
"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>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"provider": {
"type": "snowflake_warehouse",
"warehouse_name": "<string>",
"size": "x_small",
"warehouse_type": "standard",
"auto_suspend": 123,
"auto_resume": true,
"min_cluster_count": 123,
"max_cluster_count": 123,
"scaling_policy": "standard",
"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"
}
},
"default_source": "company",
"description": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Was this page helpful?

