Orishare
API reference
POST
/levels/{id}/enrollments

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

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
If-Match*string

Required revision, checked in the owning transaction.

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

application/json

application/json

curl -X POST "https://example.com/levels/string/enrollments" \  -H "Idempotency-Key: string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_example",    "program_revision": 2,    "operation_key": "operation-example"  }'
{  "program_id": "string",  "program_version_id": "string",  "customer_id": "string",  "participation_id": "string",  "run_id": "string",  "state_revision": 0,  "occurrence": "string",  "basis": "string",  "current_level": "string",  "best_level": "string",  "next_threshold": "string",  "remaining": "string",  "attainment_ids": [    "string"  ],  "transition_ids": [    "string"  ],  "pending_qualification": true}
POST
/levels/{id}/evaluations

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

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
If-Match*string

Required revision, checked in the owning transaction.

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

application/json

curl -X POST "https://example.com/levels/string/evaluations" \  -H "Idempotency-Key: string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_example",    "program_revision": 2,    "operation_key": "operation-example"  }'
{  "program_id": "string",  "program_version_id": "string",  "customer_id": "string",  "participation_id": "string",  "run_id": "string",  "state_revision": 0,  "occurrence": "string",  "basis": "string",  "current_level": "string",  "best_level": "string",  "next_threshold": "string",  "remaining": "string",  "attainment_ids": [    "string"  ],  "transition_ids": [    "string"  ],  "pending_qualification": true}
POST
/levels/{id}/prestiges

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

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
If-Match*string

Required revision, checked in the owning transaction.

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

application/json

application/json

curl -X POST "https://example.com/levels/string/prestiges" \  -H "Idempotency-Key: string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_example",    "program_revision": 2,    "operation_key": "operation-example"  }'
{  "program_id": "string",  "program_version_id": "string",  "customer_id": "string",  "participation_id": "string",  "run_id": "string",  "state_revision": 0,  "occurrence": "string",  "basis": "string",  "current_level": "string",  "best_level": "string",  "next_threshold": "string",  "remaining": "string",  "attainment_ids": [    "string"  ],  "transition_ids": [    "string"  ],  "pending_qualification": true}
GET
/levels

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

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

Value in

  • "draft"
  • "active"
  • "paused"
  • "ended"
  • "archived"

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 GET "https://example.com/levels"
{  "data": [    {      "id": "string",      "environment_id": "string",      "kind": "tier",      "key": "string",      "name": "string",      "status": "draft",      "active_version_id": "string",      "authority": "legacy",      "legacy_table": "string",      "version": -9007199254740991,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "archived_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
GET
/levels/{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

application/json

curl -X GET "https://example.com/levels/string"
{  "id": "string",  "environment_id": "string",  "kind": "tier",  "key": "string",  "name": "string",  "status": "draft",  "active_version_id": "string",  "authority": "legacy",  "legacy_table": "string",  "version": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "archived_at": "2019-08-24T14:15:22Z"}
GET
/levels/{id}/participations

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

limit?integer
Range1 <= value <= 100
Default50
cursor?string
Lengthlength <= 2048
customer_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 GET "https://example.com/levels/string/participations"
{  "data": [    {      "id": "string",      "program_id": "string",      "program_version_id": "string",      "customer_id": "string",      "status": "enrolled",      "state_revision": "string",      "state": {        "schema": "orishare.mechanic-state/v1",        "revision": "string",        "kind": "tier",        "occurrence": "string",        "basis": "string",        "current_level": "string",        "best_level": "string",        "baseline": "string",        "pending_qualification": true      },      "effective_trust": "anonymous_claim",      "timezone": "string",      "timezone_source": "environment",      "tzdata_version": "string",      "enrolled_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "standing": "current"    }  ],  "next_cursor": "string",  "has_more": true}
GET
/levels/{id}/participations/{participation_id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length
participation_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 GET "https://example.com/levels/string/participations/string"
{  "id": "string",  "program_id": "string",  "program_version_id": "string",  "customer_id": "string",  "status": "enrolled",  "state_revision": "string",  "state": {    "schema": "orishare.mechanic-state/v1",    "revision": "string",    "kind": "tier",    "occurrence": "string",    "basis": "string",    "current_level": "string",    "best_level": "string",    "baseline": "string",    "pending_qualification": true  },  "effective_trust": "anonymous_claim",  "timezone": "string",  "timezone_source": "environment",  "tzdata_version": "string",  "enrolled_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "standing": "current"}