{ "openapi": "3.0.0", "paths": { "/v1/scanner/reset": { "post": { "operationId": "ScanControllerV1_resetScanner_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetScannerDto" } } } }, "responses": { "201": { "description": "" } }, "summary": "Reset blockchain scan to a specific block number or offset from the current position", "tags": [ "v1/scanner" ] } }, "/v1/scanner/options": { "get": { "operationId": "ScanControllerV1_getWatchOptions_v1", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChainWatchOptionsDto" } } } } }, "summary": "Get the current watch options for the blockchain content event scanner", "tags": [ "v1/scanner" ] }, "post": { "operationId": "ScanControllerV1_setWatchOptions_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChainWatchOptionsDto" } } } }, "responses": { "201": { "description": "" } }, "summary": "Set watch options to filter the blockchain content scanner by schemas or MSA Ids", "tags": [ "v1/scanner" ] } }, "/v1/scanner/pause": { "post": { "operationId": "ScanControllerV1_pauseScanner_v1", "parameters": [], "responses": { "201": { "description": "" } }, "summary": "Pause the blockchain scanner", "tags": [ "v1/scanner" ] } }, "/v1/scanner/start": { "post": { "operationId": "ScanControllerV1_startScanner_v1", "parameters": [ { "name": "immediate", "required": false, "in": "query", "description": "Immediate: whether to resume scan immediately (true), or wait until next scheduled scan (false)", "schema": { "type": "boolean" } } ], "responses": { "201": { "description": "" } }, "summary": "Resume the blockchain content event scanner", "tags": [ "v1/scanner" ] } }, "/v1/search": { "post": { "operationId": "SearchControllerV1_search_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentSearchRequestDto" } } } }, "responses": { "200": { "description": "Returns a jobId to be used to retrieve the results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResponseDto" } } } } }, "summary": "Search for DSNP content by id and filters, starting from `upperBound` block and going back for `blockCount` number of blocks", "tags": [ "v1/search" ] } }, "/v1/webhooks": { "post": { "operationId": "WebhookControllerV1_registerWebhook_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookRegistrationDto" } } } }, "responses": { "201": { "description": "" } }, "summary": "Register a webhook to be called when new content is encountered on the chain", "tags": [ "v1/webhooks" ] }, "delete": { "operationId": "WebhookControllerV1_clearAllWebHooks_v1", "parameters": [], "responses": { "200": { "description": "" } }, "summary": "Clear all previously registered webhooks", "tags": [ "v1/webhooks" ] }, "get": { "operationId": "WebhookControllerV1_getRegisteredWebhooks_v1", "parameters": [], "responses": { "200": { "description": "Returns a list of registered webhooks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookRegistrationResponseDto" } } } } }, "summary": "Get the list of currently registered webhooks", "tags": [ "v1/webhooks" ] } }, "/healthz": { "get": { "operationId": "HealthController_healthz", "parameters": [], "responses": { "200": { "description": "Service is healthy" } }, "summary": "Check the health status of the service", "tags": [ "health" ] } }, "/livez": { "get": { "operationId": "HealthController_livez", "parameters": [], "responses": { "200": { "description": "Service is live" } }, "summary": "Check the live status of the service", "tags": [ "health" ] } }, "/readyz": { "get": { "operationId": "HealthController_readyz", "parameters": [], "responses": { "200": { "description": "Service is ready" } }, "summary": "Check the ready status of the service", "tags": [ "health" ] } }, "/metrics": { "get": { "operationId": "PrometheusController_index", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "Prometheus" ] } } }, "info": { "title": "Content Watcher Service API", "description": "Content Watcher Service API", "version": "1.0", "contact": {} }, "tags": [], "servers": [], "components": { "schemas": { "ResetScannerDto": { "type": "object", "properties": { "blockNumber": { "type": "number", "description": "The block number to reset the scanner to", "example": 0, "minimum": 0, "maximum": 4294967296 }, "rewindOffset": { "type": "number", "description": "Number of blocks to rewind the scanner to (from `blockNumber` if supplied; else from latest block)", "example": 100, "minimum": 0, "maximum": 4294967296 }, "immediate": { "type": "boolean", "description": "Whether to schedule the new scan immediately or wait for the next scheduled interval", "example": true } } }, "ChainWatchOptionsDto": { "type": "object", "properties": { "intentIds": { "description": "Specific Intent ids to watch for", "example": [ 1, 19 ], "minItems": 1, "uniqueItems": true, "type": "array", "items": { "type": "number" } }, "dsnpIds": { "description": "Specific dsnpIds (msa_id) to watch for", "example": [ "10074", "100001" ], "minItems": 1, "uniqueItems": true, "type": "array", "items": { "type": "string" } } } }, "ContentSearchRequestDto": { "type": "object", "properties": { "clientReferenceId": { "type": "string", "description": "An optional client-supplied reference ID by which it can identify the result of this search" }, "upperBoundBlock": { "type": "number", "description": "The highest block number to start the backward search from", "example": 100, "minimum": 0, "maximum": 4294967296 }, "blockCount": { "type": "number", "description": "The number of blocks to scan (backwards)", "example": 101, "minimum": 0, "maximum": 4294967296 }, "filters": { "description": "The schemaIds/dsnpIds to filter by", "allOf": [ { "$ref": "#/components/schemas/ChainWatchOptionsDto" } ] }, "webhookUrl": { "type": "string", "description": "A webhook URL to be notified of the results of this search", "example": "https://example.com", "format": "uri" } }, "required": [ "blockCount", "webhookUrl" ] }, "HttpStatus": { "type": "number", "enum": [ 100, 101, 102, 103, 200, 201, 202, 203, 204, 205, 206, 207, 208, 210, 300, 301, 302, 303, 304, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 421, 422, 423, 424, 428, 429, 456, 500, 501, 502, 503, 504, 505, 507, 508 ], "description": "Status of search response" }, "SearchResponseDto": { "type": "object", "properties": { "status": { "description": "Status of search response", "example": 200, "allOf": [ { "$ref": "#/components/schemas/HttpStatus" } ] }, "jobId": { "type": "string", "description": "Job id of search job", "example": "7b02edd742a653a3cf63bb0c84e43d3678aa045f" } }, "required": [ "status", "jobId" ] }, "AnnouncementTypeName": { "type": "string", "enum": [ "tombstone", "broadcast", "reply", "reaction", "profile", "update" ], "description": "Announcement types to send to the webhook" }, "WebhookRegistrationDto": { "type": "object", "properties": { "announcementTypes": { "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/AnnouncementTypeName" }, "description": "Announcement types to send to the webhook", "example": [ "broadcast", "reaction", "tombstone", "reply", "update" ] }, "url": { "type": "string", "description": "Webhook URL", "example": "https://example.com/webhook", "format": "uri" } }, "required": [ "announcementTypes", "url" ] }, "WebhookRegistrationResponseDto": { "type": "object", "properties": { "status": { "description": "Status of webhook registration response", "example": 200, "allOf": [ { "$ref": "#/components/schemas/HttpStatus" } ] }, "registeredWebhooks": { "description": "List of registered webhooks", "type": "array", "items": { "$ref": "#/components/schemas/WebhookRegistrationDto" } } }, "required": [ "status", "registeredWebhooks" ] } } }, "x-tagGroups": [ { "name": "health", "tags": [ "health" ] }, { "name": "scanner", "tags": [ "v1/scanner" ] }, { "name": "search", "tags": [ "v1/search" ] }, { "name": "webhooks", "tags": [ "v1/webhooks" ] } ] }