Ulsav Docs

Reports

GET
/api/v1/organizations/{organization_id}/notification-preferences

Path Parameters

organization_id*string

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
preferences*array<>|null
Example Request
curl -X GET 'https://example.com/api/v1/organizations/string/notification-preferences'
Example Response
{  "$schema": "https://example.com/schemas/PreferencesOutputBody.json",  "preferences": [    {      "category": "string",      "channel": "string",      "enabled": true    }  ]}
PATCH
/api/v1/organizations/{organization_id}/notification-preferences

Path Parameters

organization_id*string

Request Body

application/json
  1. body
category*string
channel*string
enabled*boolean

Response Body

No Content

Example Request
curl -X PATCH 'https://example.com/api/v1/organizations/string/notification-preferences' \  -H 'Content-Type: application/json' \  -d '{  "category": "string",  "channel": "string",  "enabled": true}'
Example Response
Empty

Get one report run

GET
/api/v1/organizations/{organization_id}/report-runs/{run_id}

Path Parameters

organization_id*string
run_id*string

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
run*
Example Request
curl -X GET 'https://example.com/api/v1/organizations/string/report-runs/string'
Example Response
{  "$schema": "https://example.com/schemas/GetRunOutputBody.json",  "run": {    "completedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "id": "string",    "reportKey": "string",    "rowCount": 0,    "status": "string",    "summary": null  }}

List scheduled reports

GET
/api/v1/organizations/{organization_id}/report-schedules

Path Parameters

organization_id*string

Query Parameters

limit?integer

Page size (1-100)

Formatint64
Range1 <= value <= 100
Default20
cursor?string

Opaque cursor from meta.nextCursor

includeTotal?boolean

Set false to omit meta.total

Defaulttrue

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
data*array<>|null
meta*
Example Request
curl -X GET 'https://example.com/api/v1/organizations/string/report-schedules'
Example Response
{  "$schema": "https://example.com/schemas/PageScheduleView.json",  "data": [    {      "cadence": "string",      "enabled": true,      "format": "string",      "id": "string",      "lastRunAt": "2019-08-24T14:15:22Z",      "name": "string",      "nextRunAt": "2019-08-24T14:15:22Z",      "recipients": [        {          "accountId": "string",          "email": "string",          "kind": "string"        }      ],      "reportKey": "string",      "sendHour": 0    }  ],  "meta": {    "hasMore": true,    "limit": 0,    "nextCursor": "string",    "total": 0  }}
POST
/api/v1/organizations/{organization_id}/report-schedules

Path Parameters

organization_id*string

Request Body

application/json
  1. body
cadence*string

daily, weekly, or monthly.

name*string
recipients*array<>|null
reportKey*string
sendHour*integer

UTC hour 0-23.

Formatint32

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
schedule*
Example Request
curl -X POST 'https://example.com/api/v1/organizations/string/report-schedules' \  -H 'Content-Type: application/json' \  -d '{  "cadence": "string",  "name": "string",  "recipients": [    {      "kind": "string"    }  ],  "reportKey": "string",  "sendHour": 0}'
Example Response
{  "$schema": "https://example.com/schemas/ScheduleOutputBody.json",  "schedule": {    "cadence": "string",    "enabled": true,    "format": "string",    "id": "string",    "lastRunAt": "2019-08-24T14:15:22Z",    "name": "string",    "nextRunAt": "2019-08-24T14:15:22Z",    "recipients": [      {        "accountId": "string",        "email": "string",        "kind": "string"      }    ],    "reportKey": "string",    "sendHour": 0  }}
PATCH
/api/v1/organizations/{organization_id}/report-schedules/{schedule_id}

Path Parameters

organization_id*string
schedule_id*string

Request Body

application/json
  1. body
cadence*string

daily, weekly, or monthly.

enabled*boolean
name*string
recipients*array<>|null
sendHour*integer

UTC hour 0-23.

Formatint32

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
schedule*
Example Request
curl -X PATCH 'https://example.com/api/v1/organizations/string/report-schedules/string' \  -H 'Content-Type: application/json' \  -d '{  "cadence": "string",  "enabled": true,  "name": "string",  "recipients": [    {      "kind": "string"    }  ],  "sendHour": 0}'
Example Response
{  "$schema": "https://example.com/schemas/ScheduleOutputBody.json",  "schedule": {    "cadence": "string",    "enabled": true,    "format": "string",    "id": "string",    "lastRunAt": "2019-08-24T14:15:22Z",    "name": "string",    "nextRunAt": "2019-08-24T14:15:22Z",    "recipients": [      {        "accountId": "string",        "email": "string",        "kind": "string"      }    ],    "reportKey": "string",    "sendHour": 0  }}
DELETE
/api/v1/organizations/{organization_id}/report-schedules/{schedule_id}

Path Parameters

organization_id*string
schedule_id*string

Response Body

No Content

Example Request
curl -X DELETE 'https://example.com/api/v1/organizations/string/report-schedules/string'
Example Response
Empty
GET
/api/v1/organizations/{organization_id}/reports

Path Parameters

organization_id*string

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
reports*array<>|null
Example Request
curl -X GET 'https://example.com/api/v1/organizations/string/reports'
Example Response
{  "$schema": "https://example.com/schemas/ListOutputBody.json",  "reports": [    {      "capability": "string",      "description": "string",      "entries": true,      "key": "string",      "title": "string"    }  ]}
GET
/api/v1/organizations/{organization_id}/reports/{report_key}

Path Parameters

organization_id*string
report_key*string

Query Parameters

eventId?string
from?string

Inclusive lower bound, RFC 3339.

to?string

Exclusive upper bound, RFC 3339.

format?string

json or csv

Default"json"

Response Body

OK

Example Request
curl -X GET 'https://example.com/api/v1/organizations/string/reports/string'
Example Response
Empty
POST
/api/v1/organizations/{organization_id}/reports/{report_key}/runs

Path Parameters

organization_id*string
report_key*string

Query Parameters

eventId?string
from?string

Inclusive lower bound, RFC 3339.

to?string

Exclusive upper bound, RFC 3339.

format?string

json or csv

Default"json"

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
run*
Example Request
curl -X POST 'https://example.com/api/v1/organizations/string/reports/string/runs'
Example Response
{  "$schema": "https://example.com/schemas/CreateRunOutputBody.json",  "run": {    "completedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "id": "string",    "reportKey": "string",    "rowCount": 0,    "status": "string",    "summary": null  }}