Architecture Demos
Choose a capability, run one focused demonstration, and inspect what happened.
REST / OpenAPI
Run the focused REST contract and inspect its OpenAPI description.
OpenAPI 3.0.3
WizardGang REST demo 1.0.0
Anonymous CRUD records isolated by a signed visitor-session cookie. The separate /api/openapi.json document describes the bearer-capable machine API.
Servers
Live demo serverhttps://demo.wizardgang.ai
Security
visitorSessionapiKey · cookie · wg_demo_session
A signed, HttpOnly visitor-session cookie is issued on the first request and sent on later requests. Keep a cookie jar when using curl so create, read, update, and delete use the same isolated session.
Records
Cookie-isolated visitor records
GET/api /labs /rest-demo-recordsList records
Return up to 100 records in the current visitor session.
Parameters
No parameters.
Responses
200Records returned.application/json · object
{
"results": [
{
"id": 1,
"key": "hello",
"value": {
"message": "Hello from a Worker"
},
"createdAt": "2026-09-08T12:00:00.000Z",
"updatedAt": "2026-09-08T12:00:00.000Z"
}
],
"count": 1
}Try it out
Execute this operation to inspect the actual response.
- Request URL
- Curl command
- Request
- Status
- Duration
- Headers
- Body
POST/api /labs /rest-demo-recordsCreate a record
Create a record under a unique key in the current visitor session.
Parameters
No parameters.
Request body
The key and value for the new record. required
application/json · RecordInput
{
"key": "hello",
"value": {
"message": "Hello from a Worker"
}
}Responses
201Record created.application/json · Record
{
"id": 1,
"key": "hello",
"value": {
"message": "Hello from a Worker"
},
"createdAt": "2026-09-08T12:00:00.000Z",
"updatedAt": "2026-09-08T12:00:00.000Z"
}400Request body or key is invalid.application/json · Error
{
"error": "invalid_key",
"detail": "key must be 1–64 letters, numbers, dots, underscores, or hyphens."
}409The key already exists.application/json · Error
{
"error": "record_already_exists",
"detail": "POST creates a new resource. Use PUT to replace an existing key."
}Try it out
Execute this operation to inspect the actual response.
- Request URL
- Curl command
- Request
- Status
- Duration
- Headers
- Body
GET/api /labs /rest-demo-records /{id}Read a record
Return one record by its key.
Parameters
idpath · requiredstring· The record key. Example:hello
Responses
200Record returned.application/json · Record
{
"id": 1,
"key": "hello",
"value": {
"message": "Hello from a Worker"
},
"createdAt": "2026-09-08T12:00:00.000Z",
"updatedAt": "2026-09-08T12:00:00.000Z"
}404Record does not exist.application/json · Error
{
"error": "record_not_found",
"detail": "No record exists for this key."
}Try it out
Execute this operation to inspect the actual response.
- Request URL
- Curl command
- Request
- Status
- Duration
- Headers
- Body
PUT/api /labs /rest-demo-records /{id}Replace a record
Replace the complete representation at a key, creating the record when it does not exist.
Parameters
idpath · requiredstring· The record key. Example:hello
Request body
The complete replacement representation. required
application/json · RecordReplacement
{
"value": {
"message": "Replaced by a Worker"
}
}Responses
200Existing record replaced.application/json · Record
{
"id": 1,
"key": "hello",
"value": {
"message": "Replaced by a Worker"
},
"createdAt": "2026-09-08T12:00:00.000Z",
"updatedAt": "2026-09-08T12:00:00.000Z"
}201Record created.application/json · Record
{
"id": 1,
"key": "hello",
"value": {
"message": "Replaced by a Worker"
},
"createdAt": "2026-09-08T12:00:00.000Z",
"updatedAt": "2026-09-08T12:00:00.000Z"
}400Request body or key is invalid.application/json · Error
{
"error": "invalid_json"
}Try it out
Execute this operation to inspect the actual response.
- Request URL
- Curl command
- Request
- Status
- Duration
- Headers
- Body
PATCH/api /labs /rest-demo-records /{id}Update a record
Apply the supplied fields without requiring a complete replacement representation.
Parameters
idpath · requiredstring· The record key. Example:hello
Request body
Only the fields that should change. required
application/json · RecordPatch
{
"value": {
"message": "Patched by a Worker",
"priority": "high"
}
}Responses
200Existing record updated.application/json · Record
{
"id": 1,
"key": "hello",
"value": {
"message": "Patched by a Worker",
"priority": "high"
},
"createdAt": "2026-09-08T12:00:00.000Z",
"updatedAt": "2026-09-08T12:00:00.000Z"
}201Record created because the supplied key did not exist.application/json · Record
{
"id": 1,
"key": "hello",
"value": {
"message": "Patched by a Worker",
"priority": "high"
},
"createdAt": "2026-09-08T12:00:00.000Z",
"updatedAt": "2026-09-08T12:00:00.000Z"
}404Record does not exist and no value was supplied.application/json · Error
{
"error": "record_not_found",
"detail": "No record exists for this key."
}Try it out
Execute this operation to inspect the actual response.
- Request URL
- Curl command
- Request
- Status
- Duration
- Headers
- Body
DELETE/api /labs /rest-demo-records /{id}Delete a record
Delete one record by its key. Repeating the request is safe.
Parameters
idpath · requiredstring· The record key. Example:hello
Responses
204Record deleted. The response has no body.Try it out
Execute this operation to inspect the actual response.
- Request URL
- Curl command
- Request
- Status
- Duration
- Headers
- Body
Schemas
Record A stored visitor-scoped record.
idinteger- required
- Database identifier.
- Example:
1 keystring- required
- Stable resource key.
- Example:
"hello" valueobject- required
- Arbitrary JSON-compatible record value.
- Example:
{ "message": "Hello from a Worker" } createdAtstring (date-time)- required
- UTC creation timestamp.
- Example:
"2026-09-08T12:00:00.000Z" updatedAtstring (date-time)- required
- UTC timestamp of the latest change.
- Example:
"2026-09-08T12:02:00.000Z"
RecordInput Representation used to create a record.
keystring- required
- Unique key containing 1–64 letters, numbers, dots, underscores, or hyphens.
- Example:
"hello" valueobject- required
- Arbitrary JSON-compatible record value.
- Example:
{ "message": "Hello from a Worker" }
RecordReplacement Complete mutable representation used by PUT.
valueobject- required
- The complete replacement value.
- Example:
{ "message": "Replaced by a Worker" }
RecordPatch Partial mutable representation used by PATCH.
valueobject- optional
- A replacement value supplied only when it should change.
- Example:
{ "message": "Patched by a Worker", "priority": "high" }
Error A machine-readable API error.
errorstring- required
- Stable error code.
- Example:
"record_not_found" detailstring- optional
- Optional human-readable detail.
- Example:
"No record exists for this key."