Submit review workspace
curl --request POST \
--url https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 123,
"submission_sequence": 123
}
'import requests
url = "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit"
payload = {
"expected_revision": 123,
"submission_sequence": 123
}
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({expected_revision: 123, submission_sequence: 123})
};
fetch('https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit', 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}/submit",
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([
'expected_revision' => 123,
'submission_sequence' => 123
]),
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}/submit"
payload := strings.NewReader("{\n \"expected_revision\": 123,\n \"submission_sequence\": 123\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}/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 123,\n \"submission_sequence\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit")
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 \"expected_revision\": 123,\n \"submission_sequence\": 123\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>"
},
"outcome": "applied",
"diagnostics": [
{
"severity": "error",
"code": "<string>",
"message": "<string>",
"handle": "<string>",
"path": "<string>"
}
],
"handles": [
{
"handle": "<string>",
"ref": "<string>",
"resource_kind": "node",
"id": "<string>",
"revision": 0,
"operation": "created",
"type": "<string>",
"name": "<string>"
}
],
"receipts": {
"lifecycle": {
"kind": "graph_create",
"mode": "managed_atomic",
"outcome": "applied",
"replayed": true,
"request_id": "<string>",
"delta_id": "<string>",
"project_id": "<string>",
"surface_id": "<string>",
"native_scope_id": "<string>",
"plan_digest": "<string>",
"graph_receipt_id": "<string>",
"graph_commit_position": "<string>",
"local_refs": {},
"target_revision": "<string>",
"effect_receipt_ref": "<string>",
"timings_ms": {},
"mutations": [
{
"resource_kind": "node",
"id": "<string>",
"revision": 0,
"operation_index": 0,
"mutation_kind": "<string>",
"implicit": true
}
]
},
"create": {
"kind": "graph_create",
"mode": "managed_atomic",
"outcome": "applied",
"replayed": true,
"request_id": "<string>",
"delta_id": "<string>",
"project_id": "<string>",
"surface_id": "<string>",
"native_scope_id": "<string>",
"plan_digest": "<string>",
"graph_receipt_id": "<string>",
"graph_commit_position": "<string>",
"local_refs": {},
"target_revision": "<string>",
"effect_receipt_ref": "<string>",
"timings_ms": {},
"mutations": [
{
"resource_kind": "node",
"id": "<string>",
"revision": 0,
"operation_index": 0,
"mutation_kind": "<string>",
"implicit": true
}
]
},
"link": {
"kind": "graph_create",
"mode": "managed_atomic",
"outcome": "applied",
"replayed": true,
"request_id": "<string>",
"delta_id": "<string>",
"project_id": "<string>",
"surface_id": "<string>",
"native_scope_id": "<string>",
"plan_digest": "<string>",
"graph_receipt_id": "<string>",
"graph_commit_position": "<string>",
"local_refs": {},
"target_revision": "<string>",
"effect_receipt_ref": "<string>",
"timings_ms": {},
"mutations": [
{
"resource_kind": "node",
"id": "<string>",
"revision": 0,
"operation_index": 0,
"mutation_kind": "<string>",
"implicit": true
}
]
}
},
"error": "<string>",
"fence": {
"schema": "penumbra.graph-fence",
"version": 1,
"project_id": "<string>",
"scope_id": "<string>",
"position": "<string>"
}
}
}Review workspaces
Submit review workspace
Apply a workspace’s staged changes to the project graph.
Submit review workspace
curl --request POST \
--url https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 123,
"submission_sequence": 123
}
'import requests
url = "https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit"
payload = {
"expected_revision": 123,
"submission_sequence": 123
}
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({expected_revision: 123, submission_sequence: 123})
};
fetch('https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit', 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}/submit",
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([
'expected_revision' => 123,
'submission_sequence' => 123
]),
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}/submit"
payload := strings.NewReader("{\n \"expected_revision\": 123,\n \"submission_sequence\": 123\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}/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 123,\n \"submission_sequence\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnbr.io/v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit")
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 \"expected_revision\": 123,\n \"submission_sequence\": 123\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>"
},
"outcome": "applied",
"diagnostics": [
{
"severity": "error",
"code": "<string>",
"message": "<string>",
"handle": "<string>",
"path": "<string>"
}
],
"handles": [
{
"handle": "<string>",
"ref": "<string>",
"resource_kind": "node",
"id": "<string>",
"revision": 0,
"operation": "created",
"type": "<string>",
"name": "<string>"
}
],
"receipts": {
"lifecycle": {
"kind": "graph_create",
"mode": "managed_atomic",
"outcome": "applied",
"replayed": true,
"request_id": "<string>",
"delta_id": "<string>",
"project_id": "<string>",
"surface_id": "<string>",
"native_scope_id": "<string>",
"plan_digest": "<string>",
"graph_receipt_id": "<string>",
"graph_commit_position": "<string>",
"local_refs": {},
"target_revision": "<string>",
"effect_receipt_ref": "<string>",
"timings_ms": {},
"mutations": [
{
"resource_kind": "node",
"id": "<string>",
"revision": 0,
"operation_index": 0,
"mutation_kind": "<string>",
"implicit": true
}
]
},
"create": {
"kind": "graph_create",
"mode": "managed_atomic",
"outcome": "applied",
"replayed": true,
"request_id": "<string>",
"delta_id": "<string>",
"project_id": "<string>",
"surface_id": "<string>",
"native_scope_id": "<string>",
"plan_digest": "<string>",
"graph_receipt_id": "<string>",
"graph_commit_position": "<string>",
"local_refs": {},
"target_revision": "<string>",
"effect_receipt_ref": "<string>",
"timings_ms": {},
"mutations": [
{
"resource_kind": "node",
"id": "<string>",
"revision": 0,
"operation_index": 0,
"mutation_kind": "<string>",
"implicit": true
}
]
},
"link": {
"kind": "graph_create",
"mode": "managed_atomic",
"outcome": "applied",
"replayed": true,
"request_id": "<string>",
"delta_id": "<string>",
"project_id": "<string>",
"surface_id": "<string>",
"native_scope_id": "<string>",
"plan_digest": "<string>",
"graph_receipt_id": "<string>",
"graph_commit_position": "<string>",
"local_refs": {},
"target_revision": "<string>",
"effect_receipt_ref": "<string>",
"timings_ms": {},
"mutations": [
{
"resource_kind": "node",
"id": "<string>",
"revision": 0,
"operation_index": 0,
"mutation_kind": "<string>",
"implicit": true
}
]
}
},
"error": "<string>",
"fence": {
"schema": "penumbra.graph-fence",
"version": 1,
"project_id": "<string>",
"scope_id": "<string>",
"position": "<string>"
}
}
}Operation ID:
http.graph.workspaces.submit
POST /v1/orgs/{org}/projects/{project}/graph/workspaces/{ws}/submit
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
1–200 printable ASCII characters, no surrounding spaces; '.' and '..' are reserved. Reuse this key with the same request when retrying an uncertain outcome. Required when an agent's request is held for approval.
Required string length:
1 - 200Pattern:
^(?!\.{1,2}$)[!-~](?:[ -~]*[!-~])?$Body
application/json
The exact open revision reviewed for a new submission, or the retained source_revision when resuming. Omit only for legacy agent behavior.
Required range:
x <= 9007199254740991Retained sequence when resuming a reviewed submission. Requires expected_revision; omit for a new open-workspace submission.
Required range:
x <= 9007199254740991Response
2XX - application/json
Success.
- Option 1
- Option 2
Show child attributes
Show child attributes