SDK reference · Node SDK

prov.attest.captureSessions.create

prov.attest.captureSessions.create in Node SDK.

Signature

prov.attest.captureSessions.create(params: CreateSessionParams): Promise<CaptureSession>

Parameters

paramsCreateSessionParamsRequired

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
device_idstringRequired
The capture or approving device's ID.
claim_idstringRequired
The claim, or case in another vertical, the asset belongs to.
chunk_duration_msintegerRequired
Each chunk's length, in milliseconds.

Returns

Promise<CaptureSession> The session, with its ID and nonce.

HTTP operation

POST /v1/attest/capture_sessions: Open a capture session

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/capture_sessions`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "device_id": "dev_00000000000000000000000000000001",
    "claim_id": "CLM-DOCS-VIDEO",
    "chunk_duration_ms": 2000
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.