SDK reference · Node SDK

prov.identify.summary

prov.identify.summary in Node SDK.

Signature

prov.identify.summary(window?: "24h" | "7d" | "30d"): Promise<Record<string, unknown>>

Parameters

window"24h" | "7d" | "30d"

Request fields

windowenumquery
The window. One of 24h, 7d, 30d.
bucketenumquery
30m with window=24h: 48 points of 30 minutes each instead of 24 of an hour. One of 30m.

Returns

Promise<Record<string, unknown>> The summary.

HTTP operation

GET /v1/identify/decisions/summary: Summarize traffic

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/summary?window=24h`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.