Replace the collaborators on a data plane
curl --request PUT \
--url https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"participants": {
"type": "all"
},
"manage_compute_pools": {
"type": "all"
}
}
'import requests
url = "https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators"
payload = {
"participants": { "type": "all" },
"manage_compute_pools": { "type": "all" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({participants: {type: 'all'}, manage_compute_pools: {type: 'all'}})
};
fetch('https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators', 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}/collaborators",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'participants' => [
'type' => 'all'
],
'manage_compute_pools' => [
'type' => 'all'
]
]),
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/{data_plane_id}/collaborators"
payload := strings.NewReader("{\n \"participants\": {\n \"type\": \"all\"\n },\n \"manage_compute_pools\": {\n \"type\": \"all\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"participants\": {\n \"type\": \"all\"\n },\n \"manage_compute_pools\": {\n \"type\": \"all\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"participants\": {\n \"type\": \"all\"\n },\n \"manage_compute_pools\": {\n \"type\": \"all\"\n }\n}"
response = http.request(request)
puts response.read_bodyData Planes
Replace the collaborators on a data plane
Overwrites the entire collaborators object on the data plane, setting both participants (who may
use the data plane) and manage_compute_pools (which companies may create / edit / archive compute
pools on it). Mirrors the whole-object PUT pattern used by attributes.
The granular per-company PUT/DELETE /data-planes/{data_plane_id}/collaborators/{collaborator_company_id}
endpoints continue to work for incremental mutation of participants; this endpoint is the only way
to set manage_compute_pools.
PUT
/
data-planes
/
{data_plane_id}
/
collaborators
Replace the collaborators on a data plane
curl --request PUT \
--url https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"participants": {
"type": "all"
},
"manage_compute_pools": {
"type": "all"
}
}
'import requests
url = "https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators"
payload = {
"participants": { "type": "all" },
"manage_compute_pools": { "type": "all" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({participants: {type: 'all'}, manage_compute_pools: {type: 'all'}})
};
fetch('https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators', 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}/collaborators",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'participants' => [
'type' => 'all'
],
'manage_compute_pools' => [
'type' => 'all'
]
]),
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/{data_plane_id}/collaborators"
payload := strings.NewReader("{\n \"participants\": {\n \"type\": \"all\"\n },\n \"manage_compute_pools\": {\n \"type\": \"all\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"participants\": {\n \"type\": \"all\"\n },\n \"manage_compute_pools\": {\n \"type\": \"all\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/data-planes/{data_plane_id}/collaborators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"participants\": {\n \"type\": \"all\"\n },\n \"manage_compute_pools\": {\n \"type\": \"all\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Collaborators replaced
Was this page helpful?
⌘I

