View as Markdown

SDK reference · Node SDK

prov.identify.listAssessments

prov.identify.listAssessments in Node SDK. The recorded hosted checks, newest first, filtered and paged by the API.

Signature

prov.identify.listAssessments(params?: ListTrafficAssessmentsParams): Promise<{ data: TrafficAssessment[]; hasMore: boolean; nextCursor: string | null }>

Parameters

paramsListTrafficAssessmentsParams

Request fields

limitintegerquery
Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid.
cursorstringquery
Opaque; pass a response's next_cursor back to get the next page.
outcomearray of enumsquery
Only assessments with these decisions (decision.action). One value, or several separated by commas.
classarray of enumsquery
Only these classes. One value, or several separated by commas: an agent is signed_agent, declared_bot or suspected_bot; a person is likely_human.
signedenumquery
Only visits whose agent signature verified (true), or didn't (false). One of true, false.
bot_likelihoodarray of enumsquery
Only these bot likelihood bands. One value, or several separated by commas.
created_gtetimestampquery
Assessed at or after this time.
created_ltetimestampquery
Assessed at or before this time.

Returns

Promise<{ data: TrafficAssessment[]; hasMore: boolean; nextCursor: string | null }> The assessments.

HTTP operation

GET /v1/identify/assessments: List traffic assessments

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "request": {
      "method": "GET",
      "url": "https://harborbean.example/products",
      "headers": {
        "user-agent": "curl/8.7.1"
      }
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.