curl --request POST \
--url https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"capture_binding": "<string>",
"shape": "<string>",
"entities": [
{
"type": "<string>",
"ref": "<string>",
"name": "<string>",
"description": "<string>",
"properties": {},
"shape": "<string>",
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
]
}
],
"relationships": [
{
"type": "<string>",
"from": "<string>",
"to": "<string>",
"ref": "<string>",
"properties": {},
"shape": "<string>",
"bridge": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
]
}
]
}
'import requests
url = "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture"
payload = {
"idempotency_key": "<string>",
"capture_binding": "<string>",
"shape": "<string>",
"entities": [
{
"type": "<string>",
"ref": "<string>",
"name": "<string>",
"description": "<string>",
"properties": {},
"shape": "<string>",
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
]
}
],
"relationships": [
{
"type": "<string>",
"from": "<string>",
"to": "<string>",
"ref": "<string>",
"properties": {},
"shape": "<string>",
"bridge": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence": [
{
"citation": "<string>",
"note": "<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({
idempotency_key: '<string>',
capture_binding: '<string>',
shape: '<string>',
entities: [
{
type: '<string>',
ref: '<string>',
name: '<string>',
description: '<string>',
properties: {},
shape: '<string>',
evidence: [{citation: '<string>', note: '<string>'}]
}
],
relationships: [
{
type: '<string>',
from: '<string>',
to: '<string>',
ref: '<string>',
properties: {},
shape: '<string>',
bridge: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
evidence: [{citation: '<string>', note: '<string>'}]
}
]
})
};
fetch('https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture', 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}/capture",
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>',
'capture_binding' => '<string>',
'shape' => '<string>',
'entities' => [
[
'type' => '<string>',
'ref' => '<string>',
'name' => '<string>',
'description' => '<string>',
'properties' => [
],
'shape' => '<string>',
'evidence' => [
[
'citation' => '<string>',
'note' => '<string>'
]
]
]
],
'relationships' => [
[
'type' => '<string>',
'from' => '<string>',
'to' => '<string>',
'ref' => '<string>',
'properties' => [
],
'shape' => '<string>',
'bridge' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'evidence' => [
[
'citation' => '<string>',
'note' => '<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.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"capture_binding\": \"<string>\",\n \"shape\": \"<string>\",\n \"entities\": [\n {\n \"type\": \"<string>\",\n \"ref\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\n }\n ],\n \"relationships\": [\n {\n \"type\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"ref\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"bridge\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\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}/capture")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"capture_binding\": \"<string>\",\n \"shape\": \"<string>\",\n \"entities\": [\n {\n \"type\": \"<string>\",\n \"ref\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\n }\n ],\n \"relationships\": [\n {\n \"type\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"ref\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"bridge\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture")
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 \"capture_binding\": \"<string>\",\n \"shape\": \"<string>\",\n \"entities\": [\n {\n \"type\": \"<string>\",\n \"ref\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\n }\n ],\n \"relationships\": [\n {\n \"type\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"ref\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"bridge\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\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>"
},
"staged": [
{
"kind": "entity",
"handle": "<string>",
"ref": "<string>",
"type_name": "<string>",
"name": "<string>",
"properties": {},
"binding": {
"shape_id": "<string>",
"artifact_digest": "<string>"
},
"evidence": [
{}
],
"created_at": "<string>"
}
],
"notes": [
"<string>"
],
"replayed": true,
"bindings": [
{
"shape_id": "<string>",
"artifact_digest": "<string>"
}
]
}
}Stage records
Stage entities and relationships in a workspace.
curl --request POST \
--url https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"capture_binding": "<string>",
"shape": "<string>",
"entities": [
{
"type": "<string>",
"ref": "<string>",
"name": "<string>",
"description": "<string>",
"properties": {},
"shape": "<string>",
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
]
}
],
"relationships": [
{
"type": "<string>",
"from": "<string>",
"to": "<string>",
"ref": "<string>",
"properties": {},
"shape": "<string>",
"bridge": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
]
}
]
}
'import requests
url = "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture"
payload = {
"idempotency_key": "<string>",
"capture_binding": "<string>",
"shape": "<string>",
"entities": [
{
"type": "<string>",
"ref": "<string>",
"name": "<string>",
"description": "<string>",
"properties": {},
"shape": "<string>",
"evidence": [
{
"citation": "<string>",
"note": "<string>"
}
]
}
],
"relationships": [
{
"type": "<string>",
"from": "<string>",
"to": "<string>",
"ref": "<string>",
"properties": {},
"shape": "<string>",
"bridge": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidence": [
{
"citation": "<string>",
"note": "<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({
idempotency_key: '<string>',
capture_binding: '<string>',
shape: '<string>',
entities: [
{
type: '<string>',
ref: '<string>',
name: '<string>',
description: '<string>',
properties: {},
shape: '<string>',
evidence: [{citation: '<string>', note: '<string>'}]
}
],
relationships: [
{
type: '<string>',
from: '<string>',
to: '<string>',
ref: '<string>',
properties: {},
shape: '<string>',
bridge: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
evidence: [{citation: '<string>', note: '<string>'}]
}
]
})
};
fetch('https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture', 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}/capture",
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>',
'capture_binding' => '<string>',
'shape' => '<string>',
'entities' => [
[
'type' => '<string>',
'ref' => '<string>',
'name' => '<string>',
'description' => '<string>',
'properties' => [
],
'shape' => '<string>',
'evidence' => [
[
'citation' => '<string>',
'note' => '<string>'
]
]
]
],
'relationships' => [
[
'type' => '<string>',
'from' => '<string>',
'to' => '<string>',
'ref' => '<string>',
'properties' => [
],
'shape' => '<string>',
'bridge' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'evidence' => [
[
'citation' => '<string>',
'note' => '<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.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"capture_binding\": \"<string>\",\n \"shape\": \"<string>\",\n \"entities\": [\n {\n \"type\": \"<string>\",\n \"ref\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\n }\n ],\n \"relationships\": [\n {\n \"type\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"ref\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"bridge\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\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}/capture")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"capture_binding\": \"<string>\",\n \"shape\": \"<string>\",\n \"entities\": [\n {\n \"type\": \"<string>\",\n \"ref\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\n }\n ],\n \"relationships\": [\n {\n \"type\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"ref\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"bridge\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture")
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 \"capture_binding\": \"<string>\",\n \"shape\": \"<string>\",\n \"entities\": [\n {\n \"type\": \"<string>\",\n \"ref\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\n }\n ],\n \"relationships\": [\n {\n \"type\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"ref\": \"<string>\",\n \"properties\": {},\n \"shape\": \"<string>\",\n \"bridge\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evidence\": [\n {\n \"citation\": \"<string>\",\n \"note\": \"<string>\"\n }\n ]\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>"
},
"staged": [
{
"kind": "entity",
"handle": "<string>",
"ref": "<string>",
"type_name": "<string>",
"name": "<string>",
"properties": {},
"binding": {
"shape_id": "<string>",
"artifact_digest": "<string>"
},
"evidence": [
{}
],
"created_at": "<string>"
}
],
"notes": [
"<string>"
],
"replayed": true,
"bindings": [
{
"shape_id": "<string>",
"artifact_digest": "<string>"
}
]
}
}http.graph.workspaces.capture
POST /v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/capture
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Required caller-chosen command identity. Reuse the same key and body after a lost reply; choose a fresh key for new intent, even if the content is identical. Replay returns the original receipt and never recreates edited or removed items.
1 - 200Named capture binding from the exact Shape artifact. Required links are checked when the workspace is submitted.
1 - 128Require this exact Shape artifact for every staged item. Set shape to its Shape id. A mismatched workspace binding or selected published head is refused before items are written.
Show child attributes
Show child attributes
Default Shape (name or id) for items in this call that do not name their own. Needed only when a type or relationship name is declared by several published Shapes.
1 - 200100Show child attributes
Show child attributes
100Show child attributes
Show child attributes
Response
Success.
Show child attributes
Show child attributes