SDK reference · Python SDK
prov.identify.get_assessment
prov.identify.get_assessment in Python SDK.
Signature
prov.identify.get_assessment(assessment_id: str) -> AnyParameters
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();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/identify/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"request": {
"method": "GET",
"url": "https://harborbean.example/products",
"headers": {
"user-agent": "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)"
}
}
}).json()
traffic_assessment_id = step1["id"]
data = httpx.get(f"{api}/v1/identify/assessments/{traffic_assessment_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()