Source contract versus running service
| Surface | Namespace | Availability |
|---|---|---|
| Native DocuSphere360 PDF Studio bridge | /api/docsphere360/v2/documents/{documentId}/studio | UAT: seven guarded operations registered; production: not registered; write and draft-sync release gates remain closed |
| ERP360 embedded session authentication | Same-origin authenticated web session; verified identity and CSRF for mutations | Contract design; application integration pending |
| Standalone Cloud API authorization | Separate certified bearer/OIDC profile required | Not certified for remote third-party access |
| Public API360 resource book | /api/public/v1/docusphere360 | Distinct API adapter; must not be treated as the native editor runtime |
Explore the Studio bridge operations
Search the seven native Studio bridge contracts below. Select an operation to review its behavior, prerequisites and release controls. These are documentation references, not live API calls.
/api/docsphere360/v2/documents/{documentId}/studio/sessionResolve authorised editor session, tenant scope and capabilities.
/{documentId}/studio/previewStream authorized current or historical PDF versions.
/{documentId}/studio/commentsRead up to 100 governed PDF review comments.
/{documentId}/studio/saveVersion-controlled PDF write; disabled until approval gates pass.
/{documentId}/studio/draftRead owner-scoped encrypted draft when synchronization is enabled.
/{documentId}/studio/draftUpsert recovery checkpoint using generation concurrency control.
/{documentId}/studio/draftRemove synchronized draft using generation preconditions.
Compare all seven documented operations in a table
| Method | Path suffix | Function / gate |
|---|---|---|
| GET | /{documentId}/studio/session | Authorized PDF session, tenant scope, editor and recovery availability |
| GET | /{documentId}/studio/preview | Stream current or authorized historical PDF, optional ?version_id=UUID |
| GET | /{documentId}/studio/comments | Read up to 100 governed review comments |
| POST | /{documentId}/studio/save | New canonical PDF revision; fail closed while editor/write gates disabled |
| GET | /{documentId}/studio/draft | Read owner-specific server draft; cloud sync disabled by default |
| PUT | /{documentId}/studio/draft | Upsert generation-controlled encrypted draft; cloud sync disabled by default |
| DELETE | /{documentId}/studio/draft | Discard synchronized draft with generation precondition; cloud sync disabled by default |
Identity, tenancy and CSRF
ERP-connected requests are designed for authenticated same-origin sessions with verified identity. Cookie-based mutations must include the application-approved CSRF token and use same-origin credentials. Cross-origin Cloud and machine-to-machine access must use a separately certified authorization profile; reusing a browser cookie for cross-origin access is not a supported shortcut.
const response = await fetch(
'/api/docsphere360/v2/documents/' + encodeURIComponent(documentId) + '/studio/session',
{ method: 'GET', credentials: 'same-origin',
headers: { Accept: 'application/json' } }
);
if (!response.ok) throw new Error('Studio session unavailable: ' + response.status);
const session = await response.json();
// Honor session.permissions and session.editor.engine_bound.
// Never infer edit permission from a successful PDF preview.Use the server-provided capability flags
{
"product": "docusphere360-pdf-studio",
"repository": "docsphere360",
"storage_mode": "canonical_document_versions",
"document": {
"id": "00000000-0000-4000-8000-000000000001",
"mime_type": "application/pdf",
"current_version": { "id": "00000000-0000-4000-8000-000000000002",
"content_sha256": "<64-character-sha256>" }
},
"permissions": {
"read": true,
"recover_draft": false,
"save_revision": false
},
"editor": { "engine_bound": false, "mode": "preview_and_versioned_revision" },
"recovery": { "scope": "<opaque-recovery-scope>",
"draft_sync_enabled": false,
"draft_endpoint": "/api/docsphere360/v2/documents/{id}/studio/draft"
},
"urls": { "preview": ".../studio/preview", "comments": ".../studio/comments",
"save": ".../studio/save", "versions": ".../versions",
"download": ".../download" }
}Do not synthesize server capability booleans. When editor.engine_bound or permissions.save_revision is false, offer preview/review only. When draft_sync_enabled is false, do not indicate that a local checkpoint has been synchronized to the server.
Current or historical preview and review data
GET .../studio/preview returns same-origin PDF bytes with Content-Type: application/pdf, X-Content-SHA256, Cache-Control: private, no-store and frame restrictions. The optional version_id must be an authorized version belonging to the same document.
GET .../studio/comments reads up to 100 non-deleted annotations within the resolved tenant. The source returns comments with identifiers, version/page references, text, state, creator and timestamp. Read access does not confer write permission.
Optimistic concurrency; immutable revision
When separately certified and enabled, POST .../studio/save requires a multipart PDF file (maximum 64 MiB in the candidate controller) plus base_version_id and a 64-character base_sha256. An optional version_label is limited to 64 characters.
file: <binary application/pdf>
base_version_id: <UUID of the current PDF version>
base_sha256: <64 hex characters of the current bytes>
version_label: "Reviewed changes" # optionalIf the authoritative PDF changed since the client opened it, the service returns 409 PDF_STUDIO_VERSION_CONFLICT. If revision-write or native-editor certification gates are disabled, it returns 503 PDF_STUDIO_REVISION_GATE_HOLD. A successful authorized write creates a new canonical version; it does not overwrite prior history.
Encrypted draft synchronization, when authorized
The three .../studio/draft operations use a tenant/user/document-scoped server record. The server draft is encrypted at rest and remains separate from the approved PDF version. The source controller refuses all draft operations until the sync flag is enabled and the recovery migration is installed.
{
"schema": 1,
"base_version_id": "00000000-0000-4000-8000-000000000002",
"base_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"note": "Review these figures before publishing",
"operations": [],
"updated_at": 1790000000000,
"generation": 1,
"expected_generation": 0
}| Field | Description | Limit / behavior |
|---|---|---|
| schema | Draft contract version | Integer 1 |
| base_version_id | Authoritative PDF version at edit time | UUID; must match document baseline |
| base_sha256 | Baseline integrity fingerprint | Exactly 64 hexadecimal characters |
| note | Review draft content | Up to 30,000 characters |
| operations | Future certified editor event records | Up to 500; each event up to 8 KiB |
| updated_at | Client checkpoint timestamp | Numeric |
| generation | Client checkpoint counter | Number; server acknowledges its own generation |
| expected_generation | Last server-acknowledged counter | Compare-and-swap precondition |
| payload size | JSON checkpoint size | Maximum 256 KiB |
Server drafts in the candidate are configured for 30-day expiry by default; governed purge procedures are still subject to release approval. A stale base revision returns 409 RECOVERY_BASE_VERSION_CONFLICT; concurrent generation returns 409 RECOVERY_GENERATION_CONFLICT; oversized data returns 413; the disabled release gate returns 503 RECOVERY_SYNC_GATE_HOLD.
Fail closed and preserve correlation context
| Status / code | Meaning | Client response |
|---|---|---|
| 401 / 403 | No session, tenant entitlement or object ACL | Reauthenticate or request authorization; do not retry blindly |
| 404 | Not found or security-trimmed object | Do not infer access from guessed IDs |
| 409 | Baseline revision or recovery generation conflict | Refresh metadata; reconcile before retrying |
| 413 | Draft or operation exceeds limits | Reduce eligible draft size; do not silently truncate |
| 415 | Document is not a PDF | Offer a supported PDF conversion workflow |
| 419 | CSRF validation rejected a cookie-based mutation | Refresh the authorized session; do not disable CSRF |
| 422 | Invalid format or validation failure | Correct request; preserve the original document |
| 503 | Release/provider/editor or recovery gate not enabled | Show unavailable; do not claim success |
Clients should retain safe request identifiers, status codes and redacted diagnostics. Do not log document plaintext, draft note text, credentials or private encryption material.
Download the source-contract OpenAPI and implementation notes
Integrators should certify authentication, object ACLs, CSRF, content streaming, concurrency conflicts, malware scanning, privacy, upload limits, key custody, crash recovery and rollout/rollback before making any authenticated production calls.
Continue working with PDF Studio
Browse the documentation or check verified releases and available platform installers.