Skip to content

Create an immutable review revision of current repository changes

GET
/v1/sessions/{sessionId}/repository/review
curl --request GET \
--url https://example.com/v1/sessions/9f2b7c14-59d3-4f7a-b8e1-2a6c05d4e731/repository/review \
--header 'Authorization: Bearer <token>'

Requires wamp.cloud.sessions:read, and reads the live sandbox rather than the database — so it needs an attached workspace and returns 409/503 when the lease is gone or still starting. The revision is a content hash of the whole diff against the merge base and is the only accepted value for a Publication’s revision: publish exactly what you reviewed, and if any file changed in between the publish attempt fails with review_changed rather than shipping something unreviewed. Re-reviewing produces the same revision for identical content, so it is safe to call repeatedly. patchTruncated marks that individual patches were elided for size; a workspace with no changes at all is a 409 no_changes when you try to publish it.

sessionId
required

A UUID identifying one Cloud resource; Session, Turn, Publication and Merge ids are minted by the caller so an ambiguous retry addresses the same durable command instead of creating a second one.

string format: uuid
Example
9f2b7c14-59d3-4f7a-b8e1-2a6c05d4e731

A UUID you mint and own; it is the idempotency key for creation and the address of every Turn, artifact and publication underneath

Review

Media typeapplication/json
object
review
required

A server-computed, immutable snapshot of what the agent changed in the Session’s repository. It is the unit a human approves, and the only thing a Publication is allowed to push.

object
revision
required

Digest binding the base commit to the exact reviewed tree, including file modes and symlinks; send it back on a Publication so a changed sandbox is rejected instead of silently republished

string
/^[a-f0-9]{64}$/
files
required

One entry per changed file — path, status (added, modified, deleted, renamed), additions, deletions, binary, an oldPath for renames, and a unified patch that is omitted or cut short once the review’s total patch budget is spent

Array<object>
object
key
additional properties
any
key
additional properties
any
Example
{
"review": {
"branch": "wamp/publications-v1/cloud-9f2b7c14-59d3-4f7a-b8e1-2a6c05-d8af1a5a",
"baseRef": "origin/main",
"revision": "88b7d76865ac445123d1adb83bf4e8e039e16bc02c5c675725a62a849f514441",
"files": [
{
"path": "src/payments/rateLimit.ts",
"status": "added",
"additions": 74,
"deletions": 0,
"binary": false,
"patch": "@@ -0,0 +1,74 @@\n+import { slidingWindow } from '../lib/limiter';\n+\n+export const paymentsRateLimit = slidingWindow({ limit: 100, windowMs: 60_000 });\n"
},
{
"path": "src/payments/router.ts",
"status": "modified",
"additions": 6,
"deletions": 1,
"binary": false,
"patch": "@@ -12,7 +12,12 @@\n-router.post('/charges', createCharge);\n+router.post('/charges', paymentsRateLimit, createCharge);\n"
}
],
"additions": 80,
"deletions": 1,
"patchTruncated": false
}
}

The resource is missing or inaccessible

Media typeapplication/json

Failure body returned with every non-2xx JSON response; branch on the machine code, never on prose or on the HTTP status alone.

object
error
required

Stable machine code

string
requiredScope

The installation capability the presented credential lacks, returned with insufficient_scope so an integrator knows exactly which capability to request

string
retryAfterSeconds

Advisory seconds to wait before retrying; returned on rate-limit denials, where the Retry-After header carries the same value

integer
>= 1
key
additional properties
any
Example
{
"error": "cloud_session_not_found"
}

Idempotency, lifecycle, revision or single-flight conflict

Media typeapplication/json

Failure body returned with every non-2xx JSON response; branch on the machine code, never on prose or on the HTTP status alone.

object
error
required

Stable machine code

string
requiredScope

The installation capability the presented credential lacks, returned with insufficient_scope so an integrator knows exactly which capability to request

string
retryAfterSeconds

Advisory seconds to wait before retrying; returned on rate-limit denials, where the Retry-After header carries the same value

integer
>= 1
key
additional properties
any
Example
{
"error": "cloud_session_conflict"
}