Orishare
API reference
GET
/analytics/retention

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

from?string
Match^\d{4}-\d{2}-\d{2}$
to?string
Match^\d{4}-\d{2}-\d{2}$
interval?string
Default"day"

Value in

  • "day"
  • "week"

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/analytics/retention"
{  "interval": "day",  "computed_at": "2019-08-24T14:15:22Z",  "cohorts": [    {      "cohort": "string",      "size": -9007199254740991,      "cells": [        {          "day_n": -9007199254740991,          "retained": -9007199254740991,          "rate": 0,          "ci_low": 0,          "ci_high": 0,          "mature": true        }      ]    }  ]}
GET
/analytics/activity

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

from?string
Match^\d{4}-\d{2}-\d{2}$
to?string
Match^\d{4}-\d{2}-\d{2}$

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/analytics/activity"
{  "computed_at": "2019-08-24T14:15:22Z",  "days": [    {      "day": "string",      "active_1d": -9007199254740991,      "active_7d": -9007199254740991,      "active_30d": -9007199254740991,      "new_customers": -9007199254740991    }  ]}
GET
/analytics/status

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

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/analytics/status"
{  "last_built_at": "2019-08-24T14:15:22Z",  "events_watermark": "2019-08-24T14:15:22Z",  "last_duration_ms": -9007199254740991,  "last_error": "string",  "stale": true}
POST
/analytics/builds

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/analytics/builds" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "events_folded": -9007199254740991,  "cohorts": -9007199254740991,  "experiments": -9007199254740991,  "complete": true,  "status": {    "last_built_at": "2019-08-24T14:15:22Z",    "events_watermark": "2019-08-24T14:15:22Z",    "last_duration_ms": -9007199254740991,    "last_error": "string",    "stale": true  }}