SDK reference · Node SDK

prov.trace.assessments.get

prov.trace.assessments.get in Node SDK. One assessment; wait (1 to 25 seconds) long-polls a challenge until a person decides it.

Signature

prov.trace.assessments.get(id: string, params?: { wait?: number }): Promise<TraceAssessment>

Parameters

idstringRequired
params{ wait?: number }

Request fields

idstringpathRequired
The assessment's ID (tsa_).
waitintegerquery
Long-poll a challenge: wait up to this many seconds for the person to decide.

Returns

Promise<TraceAssessment> The assessment.

HTTP operation

GET /v1/trace/assessments/{id}: Retrieve an assessment

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json", "Idempotency-Key": "tsa-reference-2" },
  body: JSON.stringify({ "action": { "tool": "crm.search" } }),
})).json();
const traceAssessmentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/assessments/${traceAssessmentId}`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.