Skip to main content
PUT
/
data-planes
/
{data_plane_id}
/
default-compute-pool
/
{compute_pool_id}
Set the default compute pool for a data plane
curl --request PUT \
  --url https://api-dev.narrative.io/data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api-dev.narrative.io/data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.put(url, headers=headers)

print(response.text)
const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api-dev.narrative.io/data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}', 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}/default-compute-pool/{compute_pool_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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}/default-compute-pool/{compute_pool_id}"

req, _ := http.NewRequest("PUT", 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.put("https://api-dev.narrative.io/data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-dev.narrative.io/data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'

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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

data_plane_id
string<uuid>
required
compute_pool_id
string<uuid>
required

Response

Default compute pool set

type
enum<string>
required
Available options:
owned
id
string<uuid>
required
company_id
number
required
created_at
string<date-time>
required
display_name
string
required
external_id
string
required
platform
object
required
status
enum<string>
required
Available options:
active,
archived
updated_at
string<date-time>
required
collaborators
object
required
description
string
last_heartbeat_at
string<date-time>
tags
string[]
default_compute_pool_id
string<uuid>
compute_pools
object[]