HTTP API

Almanac

GET/api/v1/almanac/worlds
GET
/api/v1/almanac/worlds

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds"
{  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  },  "worlds": [    {      "calendar": {        "day_phases": [          {            "name": "string",            "start_hour": 0          }        ],        "days_per_month": 0,        "hours_per_day": 0,        "months": [          "string"        ],        "seasons": [          {            "length_months": 0,            "name": "string",            "start_month": 0          }        ]      },      "clock": {        "accumulated_pause_ms": 0,        "paused": true,        "paused_at_real": "2019-08-24T14:15:22Z",        "real_epoch": "2019-08-24T14:15:22Z",        "segments": [          {            "dilation": 0.1,            "effective_from": "2019-08-24T14:15:22Z"          }        ],        "virtual_epoch_ms": 0      },      "created_at": "2019-08-24T14:15:22Z",      "created_by": "string",      "description": "string",      "metadata": null,      "name": "string",      "updated_at": "2019-08-24T14:15:22Z",      "version": 0,      "weather": {        "front_speed_kph": 0.1,        "geo_index": "string",        "model": "string",        "seasonal_bias": null,        "seed": 0,        "volatility": 0.1      },      "world_id": "string"    }  ]}
POST/api/v1/almanac/worlds
POST
/api/v1/almanac/worlds

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/almanac/worlds" \  -H "Content-Type: application/json" \  -d '{    "calendar": {      "day_phases": [        {          "name": "string",          "start_hour": 0        }      ],      "days_per_month": 0,      "hours_per_day": 0,      "months": [        "string"      ],      "seasons": [        {          "length_months": 0,          "name": "string",          "start_month": 0        }      ]    },    "dilation": 0.1,    "name": "string",    "weather": {      "front_speed_kph": 0.1,      "model": "string",      "seed": 0,      "volatility": 0.1    }  }'
{  "created_at": "2019-08-24T14:15:22Z",  "name": "string",  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}
GET
/api/v1/almanac/worlds/{world_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string"
{  "calendar": {    "day_phases": [      {        "name": "string",        "start_hour": 0      }    ],    "days_per_month": 0,    "hours_per_day": 0,    "months": [      "string"    ],    "seasons": [      {        "length_months": 0,        "name": "string",        "start_month": 0      }    ]  },  "clock": {    "accumulated_pause_ms": 0,    "paused": true,    "paused_at_real": "2019-08-24T14:15:22Z",    "real_epoch": "2019-08-24T14:15:22Z",    "segments": [      {        "dilation": 0.1,        "effective_from": "2019-08-24T14:15:22Z"      }    ],    "virtual_epoch_ms": 0  },  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "description": "string",  "metadata": null,  "name": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0,  "weather": {    "front_speed_kph": 0.1,    "geo_index": "string",    "model": "string",    "seasonal_bias": null,    "seed": 0,    "volatility": 0.1  },  "world_id": "string"}
DELETE/api/v1/almanac/worlds/{world_id}
DELETE
/api/v1/almanac/worlds/{world_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/almanac/worlds/string"
{  "message": "string",  "world_id": "string"}
PUT/api/v1/almanac/worlds/{world_id}/clock
PUT
/api/v1/almanac/worlds/{world_id}/clock

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Adjust dilation or re-anchor the epoch from a boundary.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/almanac/worlds/string/clock" \  -H "Content-Type: application/json" \  -d '{    "dilation": 0.1  }'
{  "clock": {    "accumulated_pause_ms": 0,    "paused": true,    "paused_at_real": "2019-08-24T14:15:22Z",    "real_epoch": "2019-08-24T14:15:22Z",    "segments": [      {        "dilation": 0.1,        "effective_from": "2019-08-24T14:15:22Z"      }    ],    "virtual_epoch_ms": 0  },  "version": 0,  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/clock/now
GET
/api/v1/almanac/worlds/{world_id}/clock/now

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/clock/now"
{  "dilation": 0.1,  "paused": true,  "real_instant": "2019-08-24T14:15:22Z",  "virtual_ms": 0,  "virtual_time": {    "day": 0,    "hour": 0,    "minute": 0,    "month": "string",    "month_index": 0,    "phase": "string",    "year": 0  },  "world_id": "string"}
POST/api/v1/almanac/worlds/{world_id}/clock/pause
POST
/api/v1/almanac/worlds/{world_id}/clock/pause

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Pause/resume reason and audit context.

Response Body

application/json

curl -X POST "https://example.com/api/v1/almanac/worlds/string/clock/pause" \  -H "Content-Type: application/json" \  -d '{}'
{  "clock": {    "accumulated_pause_ms": 0,    "paused": true,    "paused_at_real": "2019-08-24T14:15:22Z",    "real_epoch": "2019-08-24T14:15:22Z",    "segments": [      {        "dilation": 0.1,        "effective_from": "2019-08-24T14:15:22Z"      }    ],    "virtual_epoch_ms": 0  },  "version": 0,  "world_id": "string"}
POST/api/v1/almanac/worlds/{world_id}/clock/resume
POST
/api/v1/almanac/worlds/{world_id}/clock/resume

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Pause/resume reason and audit context.

Response Body

application/json

curl -X POST "https://example.com/api/v1/almanac/worlds/string/clock/resume" \  -H "Content-Type: application/json" \  -d '{}'
{  "clock": {    "accumulated_pause_ms": 0,    "paused": true,    "paused_at_real": "2019-08-24T14:15:22Z",    "real_epoch": "2019-08-24T14:15:22Z",    "segments": [      {        "dilation": 0.1,        "effective_from": "2019-08-24T14:15:22Z"      }    ],    "virtual_epoch_ms": 0  },  "version": 0,  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/now
GET
/api/v1/almanac/worlds/{world_id}/now

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Query Parameters

region?string

Region identifier for regional weather resolution

user_local_tz?string

User-local IANA timezone for timezone-fair window anchoring

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/now"
{  "active_windows": [    {      "ends_in_real_ms": 0,      "instance": 0,      "window_id": "string"    }  ],  "next_transitions": [    {      "at_real": "2019-08-24T14:15:22Z",      "window_id": "string"    }  ],  "paused": true,  "season": "string",  "virtual_time": {    "day": 0,    "hour": 0,    "minute": 0,    "month": "string",    "month_index": 0,    "phase": "string",    "year": 0  },  "weather": null,  "world_id": "string"}
POST/api/v1/almanac/worlds/{world_id}/subscribe
POST
/api/v1/almanac/worlds/{world_id}/subscribe

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Subscription provisioning request for a world or region.

Response Body

application/json

curl -X POST "https://example.com/api/v1/almanac/worlds/string/subscribe" \  -H "Content-Type: application/json" \  -d '{}'
{  "pubsub_channel": "string",  "region": "string",  "websocket_topic": "string",  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/transitions
GET
/api/v1/almanac/worlds/{world_id}/transitions

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Query Parameters

limit?integer

Maximum number of recent transitions to return

Range0 <= value

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/transitions"
{  "transitions": [    {      "at_real": "2019-08-24T14:15:22Z",      "contents": [        "string"      ],      "instance": 0,      "kind": "rotation",      "next_transition_real": "2019-08-24T14:15:22Z",      "phase": "string",      "previous_instance": 0,      "season": "string",      "stream_id": "string",      "virtual_ms": 0,      "window_id": "string",      "window_name": "string",      "world_id": "string"    }  ],  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/until-phase
GET
/api/v1/almanac/worlds/{world_id}/until-phase

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Query Parameters

phase*string

Name of the day phase to count down to (e.g. dawn, dusk)

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/until-phase?phase=string"
{  "at_real": "2019-08-24T14:15:22Z",  "current_phase": "string",  "phase": "string",  "until_real_ms": 0,  "until_virtual_ms": 0,  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/weather/forecast
GET
/api/v1/almanac/worlds/{world_id}/weather/forecast

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Query Parameters

region?string

Region identifier

virtual_hours?integer

How many virtual hours ahead to forecast

Formatint32
Range0 <= value

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/weather/forecast"
{  "points": [    {      "condition": "string",      "intensity": 0.1,      "virtual_hour_offset": 0    }  ],  "region": "string",  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/weather/overrides
GET
/api/v1/almanac/worlds/{world_id}/weather/overrides

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/weather/overrides"
{  "overrides": [    {      "condition": "string",      "from_virtual_day": 0,      "intensity": 0,      "region": "string",      "to_virtual_day": 0    }  ],  "world_id": "string"}
PUT/api/v1/almanac/worlds/{world_id}/weather/overrides
PUT
/api/v1/almanac/worlds/{world_id}/weather/overrides

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Designer weather override request: replaces the ordered override patch list.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/almanac/worlds/string/weather/overrides" \  -H "Content-Type: application/json" \  -d '{    "overrides": [      {        "condition": "string"      }    ]  }'
{  "override_count": 0,  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/windows
GET
/api/v1/almanac/worlds/{world_id}/windows

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Query Parameters

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Page size

Formatint64
Range0 <= value
sort_by?string

Sort field (created_at, name)

sort_order?string

Sort order (asc or desc)

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/windows"
{  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  },  "windows": [    {      "created_at": "2019-08-24T14:15:22Z",      "hooks": {        "pubsub_channel": "string",        "timeline_stream": "string",        "webhook_event": "string"      },      "instance": 0,      "kind": "rotation",      "name": "string",      "preview_horizon_windows": 0,      "rotation": {        "slots": 0,        "source": "string"      },      "schedule": {        "anchor": "world_midnight",        "max_offset_changes_per_30d": 0,        "per_user_phase_offset": true,        "recurrence": "every_virtual_day",        "season_name": "string"      },      "updated_at": "2019-08-24T14:15:22Z",      "window_id": "string",      "world_id": "string"    }  ]}
POST/api/v1/almanac/worlds/{world_id}/windows
POST
/api/v1/almanac/worlds/{world_id}/windows

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/almanac/worlds/string/windows" \  -H "Content-Type: application/json" \  -d '{    "kind": "rotation",    "name": "string",    "rotation": {      "slots": 0,      "source": "string"    },    "schedule": {      "anchor": "world_midnight",      "recurrence": "every_virtual_day"    }  }'
{  "created_at": "2019-08-24T14:15:22Z",  "name": "string",  "window_id": "string",  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/windows/positions
GET
/api/v1/almanac/worlds/{world_id}/windows/positions

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/windows/positions"
{  "now": {    "dilation": 0.1,    "paused": true,    "real_instant": "2019-08-24T14:15:22Z",    "virtual_ms": 0,    "virtual_time": {      "day": 0,      "hour": 0,      "minute": 0,      "month": "string",      "month_index": 0,      "phase": "string",      "year": 0    },    "world_id": "string"  },  "positions": [    {      "cycle_virtual_ms": 0,      "instance": 0,      "next_transition_real": "2019-08-24T14:15:22Z",      "position_virtual_ms": 0,      "remaining_real_ms": 0,      "remaining_virtual_ms": 0,      "window_id": "string"    }  ],  "world_id": "string"}
GET/api/v1/almanac/worlds/{world_id}/windows/{window_id}/preview
GET
/api/v1/almanac/worlds/{world_id}/windows/{window_id}/preview

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

world_id*string
window_id*string

Query Parameters

count?integer

Number of future instances to resolve

Formatint32
Range0 <= value

Response Body

application/json

curl -X GET "https://example.com/api/v1/almanac/worlds/string/windows/string/preview"
{  "instances": [    {      "contents": [        "string"      ],      "ends_at_real": "2019-08-24T14:15:22Z",      "instance": 0,      "starts_at_real": "2019-08-24T14:15:22Z"    }  ],  "window_id": "string",  "world_id": "string"}

On this page