Content Watcher Service API (1.0)

Download OpenAPI specification:

Content Watcher Service API

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

v1/scanner

Reset blockchain scan to a specific block number or offset from the current position

Request Body schema: application/json
required
blockNumber
number [ 0 .. 4294967296 ]

The block number to reset the scanner to

rewindOffset
number [ 0 .. 4294967296 ]

Number of blocks to rewind the scanner to (from blockNumber if supplied; else from latest block)

immediate
boolean

Whether to schedule the new scan immediately or wait for the next scheduled interval

Responses

Request samples

Content type
application/json
{
  • "blockNumber": 0,
  • "rewindOffset": 100,
  • "immediate": true
}

Get the current watch options for the blockchain content event scanner

Responses

Response samples

Content type
application/json
{
  • "schemaIds": [
    ],
  • "dsnpIds": [
    ]
}

Set watch options to filter the blockchain content scanner by schemas or MSA Ids

Request Body schema: application/json
required
schemaIds
Array of numbers non-empty unique

Specific schema ids to watch for

dsnpIds
Array of strings non-empty unique

Specific dsnpIds (msa_id) to watch for

Responses

Request samples

Content type
application/json
{
  • "schemaIds": [
    ],
  • "dsnpIds": [
    ]
}

Pause the blockchain scanner

Responses

Resume the blockchain content event scanner

query Parameters
immediate
boolean

Immediate: whether to resume scan immediately (true), or wait until next scheduled scan (false)

Responses

v1/search

Search for DSNP content by id and filters, starting from `upperBound` block and going back for `blockCount` number of blocks

Request Body schema: application/json
required
clientReferenceId
string

An optional client-supplied reference ID by which it can identify the result of this search

upperBoundBlock
number [ 0 .. 4294967296 ]

The highest block number to start the backward search from

blockCount
required
number [ 0 .. 4294967296 ]

The number of blocks to scan (backwards)

object

The schemaIds/dsnpIds to filter by

webhookUrl
required
string <uri>

A webhook URL to be notified of the results of this search

Responses

Request samples

Content type
application/json
{
  • "clientReferenceId": "string",
  • "upperBoundBlock": 100,
  • "blockCount": 101,
  • "filters": {
    },
  • "webhookUrl": "https://example.com"
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "jobId": "7b02edd742a653a3cf63bb0c84e43d3678aa045f"
}

v1/webhooks

Register a webhook to be called when new content is encountered on the chain

Request Body schema: application/json
required
announcementTypes
required
Array of strings (AnnouncementTypeName) non-empty
Items Enum: "tombstone" "broadcast" "reply" "reaction" "profile" "update"

Announcement types to send to the webhook

url
required
string <uri>

Webhook URL

Responses

Request samples

Content type
application/json
{}

Clear all previously registered webhooks

Responses

Get the list of currently registered webhooks

Responses

Response samples

Content type
application/json
{
  • "status": 200,
  • "registeredWebhooks": []
}