SDK reference · Node SDK
prov.identify.getDecision
prov.identify.getDecision in Node SDK. Slice 13: bot is what an assessment naming this visit would see with no request (the score, its band, the reason when unclassified, the named signals); agentPlatform the platform the verdict named.
Signature
prov.identify.getDecision(id: string): Promise<Record<string, unknown> & { bot: BotAssessment; agentPlatform: AgentPlatform | null }>Parameters
idstringRequired
Request fields
idstringpathRequired- The decision's ID.
Returns
Promise<Record<string, unknown> & { bot: BotAssessment; agentPlatform: AgentPlatform | null }> The decision.
HTTP operation
GET /v1/identify/decisions/{id}: Retrieve a traffic decision
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"
}
},
"ip": "35.180.4.77"
}),
})).json();
const trafficDecisionId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/decisions/${trafficDecisionId}`, {
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": "curl/8.7.1"
}
},
"ip": "35.180.4.77"
}).json()
traffic_decision_id = step1["id"]
data = httpx.get(f"{api}/v1/identify/decisions/{traffic_decision_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()