{ "openapi": "3.0.0", "info": { "title": "Sailhouse API", "description": "Generated API documentation for Sailhouse", "version": "1.0.0" }, "paths": { "/topics/{topic_slug}/events": { "post": { "tags": ["events"], "summary": "Send an event", "description": "Send an event to Sailhouse", "operationId": "IngestEvent", "parameters": [ { "name": "topic_slug", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendEventRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendEventResponse" } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } }, "security": [ { "apiKey": [] } ] } }, "/topics/{topic_slug}/subscriptions/{subscription_slug}/events/pull": { "get": { "tags": ["events"], "summary": "Pull an event", "description": "Pull an event, locking it for 30s", "operationId": "PullEvent", "parameters": [ { "name": "topic_slug", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "subscription_slug", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PullEventResponse" } } } }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } }, "security": [ { "apiKey": [] } ] } }, "/topics/{topic_slug}/subscriptions/{subscription_slug}/events/{event_id}": { "post": { "tags": ["events"], "summary": "Acknowledge an event", "description": "Acknowledge an event, marking it as processed for a subscription", "operationId": "AcknowledgeEvent", "parameters": [ { "name": "topic_slug", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "subscription_slug", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "event_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success" }, "400": { "description": "Bad Request" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } }, "security": [ { "apiKey": [] } ] } } }, "components": { "schemas": { "PullEventResponse": { "type": "object", "properties": { "data": { "type": "object" }, "id": { "type": "string" }, "metadata": { "type": "object" }, "timestamp": { "type": "string", "description": "The timestamp of the event, in RFC3339 format" }, "topic_id": { "type": "string" } }, "required": ["id", "topic_id", "data", "metadata", "timestamp"] }, "SendEventRequest": { "type": "object", "properties": { "data": { "type": "object", "description": "The event data, as a JSON object" }, "metadata": { "type": "object", "description": "Additional metadata for the event" }, "send_at": { "type": "string", "nullable": true, "description": "RFC3339 formatted string for when the event should be sent to subscriptions" }, "wait_group_instance_id": { "type": "string", "nullable": true, "description": "ID of the wait group instance to which this event should be added to" } }, "required": ["data"] }, "SendEventResponse": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the event that was sent." } }, "required": ["id"] } }, "securitySchemes": { "apiKey": { "type": "apiKey", "in": "header", "name": "Authorization" }, "bearerAuth": { "type": "http", "scheme": "bearer" } } }, "security": [ { "bearerAuth": [] } ], "servers": [ { "url": "https://api.sailhouse.dev" } ] }