Skip to content

Data Sources API

Data source endpoints manage custom EVM/Substrate sources, runtime status, and logs.

GET /api/v2/custom-sources

Returns custom data sources.

Arguments:

ArgumentLocationDescription
workspaceQueryOptional workspace fullname filter.

Payload: none.

Response: CustomSourceListView[].

GET /api/v2/custom-sources/create-capability

Checks whether the current account/workspace can create a custom source.

Arguments: none.

Payload: none.

Response: CustomSourceCreateCapability.

POST /api/v2/custom-sources/verify

Verifies a custom source config before saving.

Arguments: none.

Payload:

FieldRequiredDescription
workspaceYesWorkspace fullname.
nameYesSource name.
publicNoWhether the source is proposed/published as public.
kindYesevm or substrate.
endpointsYesArray of RPC/indexer endpoint URLs.
substrate.extensionsNoSubstrate metadata/extensions config.

Response: CustomSourceVerifyResult.

GET /api/v2/custom-sources/:fullname

Returns a custom source.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload: none.

Response: CustomSource.

PUT /api/v2/custom-sources/:fullname

Creates or updates a custom source.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname. Must match payload.fullname.

Payload:

FieldRequiredDescription
modeYescreate or update.
nameYesSource name.
fullnameYesSource fullname.
workspaceYesWorkspace fullname.
publicNoWhether the source is public.
kindYesevm or substrate.
endpointsYesArray of endpoint URLs.
batchMaxCountNoRuntime batch max count.
blockProcessingConcurrencyNoRuntime block processing concurrency.
maxQueuedBlocksNoRuntime queued block limit.
substrate.extensionsNoSubstrate extensions/types/rpc config.
meta.titleYesVisible title.
meta.descriptionNoDescription.
meta.icons.defaultNoIcon URL.

Response: CustomSource.

DELETE /api/v2/custom-sources/:fullname

Deletes a custom source.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload: none.

Response: OperationResult.

GET /api/v2/custom-sources/:fullname/logs

Returns custom source logs.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.
limitQuery50, 100, 250, or 500.
levelQueryinfo, warn, or error.
directionQuerybefore or after.
datetimeQueryCursor date-time.

Payload: none.

Response: CustomSourceLogsResult.

POST /api/v2/custom-sources/:fullname/test-status

Checks or simulates a custom source status transition.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload:

FieldRequiredDescription
typeYeserror or recovered.

Response: CustomSourceStatusTestResult.

POST /api/v2/custom-sources/:fullname/restart

Restarts the custom source runtime.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload: {}.

Response: CustomSourceRuntimeActionResult.

POST /api/v2/custom-sources/:fullname/reset-lag

Resets custom source lag.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload: {}.

Response: CustomSourceResetLagResult.