Edit staged records
curl --request POST \
--url https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"expected_revision": 123,
"description": "<string>",
"edit": [
{
"handle": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changes": {
"name": "<string>",
"description": "<string>",
"type": "<string>",
"properties": {},
"patch": {},
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
],
"keep_new": true,
"refresh": true
}
}
],
"remove": {
"entities": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"relationships": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
'import requests
url = "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify"
payload = {
"idempotency_key": "<string>",
"expected_revision": 123,
"description": "<string>",
"edit": [
{
"handle": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changes": {
"name": "<string>",
"description": "<string>",
"type": "<string>",
"properties": {},
"patch": {},
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
],
"keep_new": True,
"refresh": True
}
}
],
"remove": {
"entities": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"relationships": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
}
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({
idempotency_key: '<string>',
expected_revision: 123,
description: '<string>',
edit: [
{
handle: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
changes: {
name: '<string>',
description: '<string>',
type: '<string>',
properties: {},
patch: {},
evidence: [{citation: '<string>', note: '<string>'}],
keep_new: true,
refresh: true
}
}
],
remove: {
entities: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
relationships: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
})
};
fetch('https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify', 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.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify",
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([
'idempotency_key' => '<string>',
'expected_revision' => 123,
'description' => '<string>',
'edit' => [
[
'handle' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'changes' => [
'name' => '<string>',
'description' => '<string>',
'type' => '<string>',
'properties' => [
],
'patch' => [
],
'evidence' => [
[
'citation' => '<string>',
'note' => '<string>'
]
],
'keep_new' => true,
'refresh' => true
]
]
],
'remove' => [
'entities' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'relationships' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"expected_revision\": 123,\n \"description\": \"<string>\",\n \"edit\": [\n {\n \"handle\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"changes\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"properties\": {},\n \"patch\": {},\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ],\n \"keep_new\": true,\n \"refresh\": true\n }\n }\n ],\n \"remove\": {\n \"entities\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"relationships\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\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.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"expected_revision\": 123,\n \"description\": \"<string>\",\n \"edit\": [\n {\n \"handle\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"changes\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"properties\": {},\n \"patch\": {},\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ],\n \"keep_new\": true,\n \"refresh\": true\n }\n }\n ],\n \"remove\": {\n \"entities\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"relationships\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify")
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 \"idempotency_key\": \"<string>\",\n \"expected_revision\": 123,\n \"description\": \"<string>\",\n \"edit\": [\n {\n \"handle\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"changes\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"properties\": {},\n \"patch\": {},\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ],\n \"keep_new\": true,\n \"refresh\": true\n }\n }\n ],\n \"remove\": {\n \"entities\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"relationships\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workspace": {
"id": "<string>",
"creation_origin": "<string>",
"name": "<string>",
"description": "<string>",
"status": "open",
"revision": 0,
"item_count": 0,
"shape": {
"shape_id": "<string>",
"artifact_digest": "<string>"
},
"bindings": [
{
"shape_id": "<string>",
"artifact_digest": "<string>"
}
],
"bridge_set": {
"digest": "<string>",
"declaration_count": 0
},
"created_at": "<string>",
"updated_at": "<string>",
"applied_at": "<string>",
"replaced_by": "<string>"
},
"edited": [
"<unknown>"
],
"removed": [
"<unknown>"
],
"notes": [
"<string>"
]
}
}Review workspaces
Edit staged records
Edit or remove staged workspace items.
Edit staged records
curl --request POST \
--url https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"expected_revision": 123,
"description": "<string>",
"edit": [
{
"handle": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changes": {
"name": "<string>",
"description": "<string>",
"type": "<string>",
"properties": {},
"patch": {},
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
],
"keep_new": true,
"refresh": true
}
}
],
"remove": {
"entities": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"relationships": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
'import requests
url = "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify"
payload = {
"idempotency_key": "<string>",
"expected_revision": 123,
"description": "<string>",
"edit": [
{
"handle": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changes": {
"name": "<string>",
"description": "<string>",
"type": "<string>",
"properties": {},
"patch": {},
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
],
"keep_new": True,
"refresh": True
}
}
],
"remove": {
"entities": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"relationships": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
}
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({
idempotency_key: '<string>',
expected_revision: 123,
description: '<string>',
edit: [
{
handle: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
changes: {
name: '<string>',
description: '<string>',
type: '<string>',
properties: {},
patch: {},
evidence: [{citation: '<string>', note: '<string>'}],
keep_new: true,
refresh: true
}
}
],
remove: {
entities: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
relationships: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
})
};
fetch('https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify', 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.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify",
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([
'idempotency_key' => '<string>',
'expected_revision' => 123,
'description' => '<string>',
'edit' => [
[
'handle' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'changes' => [
'name' => '<string>',
'description' => '<string>',
'type' => '<string>',
'properties' => [
],
'patch' => [
],
'evidence' => [
[
'citation' => '<string>',
'note' => '<string>'
]
],
'keep_new' => true,
'refresh' => true
]
]
],
'remove' => [
'entities' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'relationships' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"expected_revision\": 123,\n \"description\": \"<string>\",\n \"edit\": [\n {\n \"handle\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"changes\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"properties\": {},\n \"patch\": {},\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ],\n \"keep_new\": true,\n \"refresh\": true\n }\n }\n ],\n \"remove\": {\n \"entities\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"relationships\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\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.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"expected_revision\": 123,\n \"description\": \"<string>\",\n \"edit\": [\n {\n \"handle\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"changes\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"properties\": {},\n \"patch\": {},\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ],\n \"keep_new\": true,\n \"refresh\": true\n }\n }\n ],\n \"remove\": {\n \"entities\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"relationships\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify")
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 \"idempotency_key\": \"<string>\",\n \"expected_revision\": 123,\n \"description\": \"<string>\",\n \"edit\": [\n {\n \"handle\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"changes\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"properties\": {},\n \"patch\": {},\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ],\n \"keep_new\": true,\n \"refresh\": true\n }\n }\n ],\n \"remove\": {\n \"entities\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"relationships\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workspace": {
"id": "<string>",
"creation_origin": "<string>",
"name": "<string>",
"description": "<string>",
"status": "open",
"revision": 0,
"item_count": 0,
"shape": {
"shape_id": "<string>",
"artifact_digest": "<string>"
},
"bindings": [
{
"shape_id": "<string>",
"artifact_digest": "<string>"
}
],
"bridge_set": {
"digest": "<string>",
"declaration_count": 0
},
"created_at": "<string>",
"updated_at": "<string>",
"applied_at": "<string>",
"replaced_by": "<string>"
},
"edited": [
"<unknown>"
],
"removed": [
"<unknown>"
],
"notes": [
"<string>"
]
}
}Operation ID:
http.graph.workspaces.modify
POST /v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/modify
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
2XX - application/json
Success.
Show child attributes
Show child attributes