Orishare
API reference
GET
/counter_definitions

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/counter_definitions"
{  "data": [    {      "id": "string",      "name": "string",      "event": "string",      "window": "none",      "filter": null,      "status": "backfilling",      "backfill": {        "cutoff": "2019-08-24T14:15:22Z",        "pending_events": 0,        "coverage": {          "from": "2019-08-24T14:15:22Z",          "to": "2019-08-24T14:15:22Z",          "first_seen_at": "2019-08-24T14:15:22Z",          "complete": true,          "events_scanned": 0,          "events_counted": 0,          "blocked": "history_unavailable",          "accepted": {            "at": "2019-08-24T14:15:22Z",            "by": "string"          }        }      },      "created_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/counter_definitions

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/counter_definitions" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "name": "purchases",    "event": "order.paid"  }'
{  "id": "string",  "name": "string",  "event": "string",  "window": "none",  "filter": null,  "status": "backfilling",  "backfill": {    "cutoff": "2019-08-24T14:15:22Z",    "pending_events": 0,    "coverage": {      "from": "2019-08-24T14:15:22Z",      "to": "2019-08-24T14:15:22Z",      "first_seen_at": "2019-08-24T14:15:22Z",      "complete": true,      "events_scanned": 0,      "events_counted": 0,      "blocked": "history_unavailable",      "accepted": {        "at": "2019-08-24T14:15:22Z",        "by": "string"      }    }  },  "created_at": "2019-08-24T14:15:22Z"}
GET
/counter_definitions/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/counter_definitions/string"
{  "id": "string",  "name": "string",  "event": "string",  "window": "none",  "filter": null,  "status": "backfilling",  "backfill": {    "cutoff": "2019-08-24T14:15:22Z",    "pending_events": 0,    "coverage": {      "from": "2019-08-24T14:15:22Z",      "to": "2019-08-24T14:15:22Z",      "first_seen_at": "2019-08-24T14:15:22Z",      "complete": true,      "events_scanned": 0,      "events_counted": 0,      "blocked": "history_unavailable",      "accepted": {        "at": "2019-08-24T14:15:22Z",        "by": "string"      }    }  },  "created_at": "2019-08-24T14:15:22Z"}
DELETE
/counter_definitions/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/counter_definitions/string"
Empty
POST
/counter_definitions/{id}/backfill

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/counter_definitions/string/backfill"
{  "status": "ready",  "mode": "inline",  "result": null}
POST
/counter_definitions/{id}/accept_coverage

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/counter_definitions/string/accept_coverage"
{  "id": "string",  "name": "string",  "event": "string",  "window": "none",  "filter": null,  "status": "backfilling",  "backfill": {    "cutoff": "2019-08-24T14:15:22Z",    "pending_events": 0,    "coverage": {      "from": "2019-08-24T14:15:22Z",      "to": "2019-08-24T14:15:22Z",      "first_seen_at": "2019-08-24T14:15:22Z",      "complete": true,      "events_scanned": 0,      "events_counted": 0,      "blocked": "history_unavailable",      "accepted": {        "at": "2019-08-24T14:15:22Z",        "by": "string"      }    }  },  "created_at": "2019-08-24T14:15:22Z"}
POST
/counter_definitions/{id}/rebuild

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/counter_definitions/string/rebuild"
{  "id": "string",  "name": "string",  "event": "string",  "window": "none",  "filter": null,  "status": "backfilling",  "backfill": {    "cutoff": "2019-08-24T14:15:22Z",    "pending_events": 0,    "coverage": {      "from": "2019-08-24T14:15:22Z",      "to": "2019-08-24T14:15:22Z",      "first_seen_at": "2019-08-24T14:15:22Z",      "complete": true,      "events_scanned": 0,      "events_counted": 0,      "blocked": "history_unavailable",      "accepted": {        "at": "2019-08-24T14:15:22Z",        "by": "string"      }    }  },  "created_at": "2019-08-24T14:15:22Z"}
GET
/counter_definitions/{id}/customers/{customer_id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length
customer_id*string
Length1 <= length

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/counter_definitions/string/customers/string"
{  "counter": "string",  "customer_id": "string",  "windows": [    {      "window_key": "string",      "count": 0    }  ],  "next_cursor": "string",  "has_more": true}