SDK reference · Python SDK

prov.identify.get_assessment

prov.identify.get_assessment in Python SDK.

Signature

prov.identify.get_assessment(assessment_id: str) -> Any

Parameters

assessment_idstrRequired

Request fields

idstringpathRequired
The assessment's ID (tas_…).

Returns

Any The assessment.

HTTP operation

GET /v1/identify/assessments/{id}: Retrieve a traffic assessment

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": "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)"
      }
    }
  }),
})).json();
const trafficAssessmentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments/${trafficAssessmentId}`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.