Skip to content

Data Sources API

Data source endpoints управляют custom EVM/Substrate sources, runtime status and logs.

GET /api/v2/custom-sources

Возвращает custom data sources.

Arguments:

ArgumentLocationDescription
workspaceQueryOptional workspace fullname filter.

Payload: нет.

Response: array of custom sources.

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

Проверяет, может ли текущий account/workspace создать custom source.

Arguments: нет.

Payload: нет.

Response: capability object.

POST /api/v2/custom-sources/verify

Проверяет custom source config перед сохранением.

Arguments: нет.

Payload:

FieldRequiredDescription
workspaceДаWorkspace fullname.
nameДаSource name.
publicНетWhether source is proposed/published as public.
kindДаevm или substrate.
endpointsДаArray of RPC/indexer endpoint URLs.
substrate.extensionsНетSubstrate metadata/extensions config.

Response: verification result, metadata and duplicate/public checks.

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

Возвращает custom source.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload: нет.

Response: custom source object.

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

Создает или обновляет custom source.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname. Должен совпадать с payload.fullname.

Payload:

FieldRequiredDescription
modeДаcreate или update.
nameДаSource name.
fullnameДаSource fullname.
workspaceДаWorkspace fullname.
publicНетWhether source is public.
kindДаevm или substrate.
endpointsДаArray of endpoint URLs.
batchMaxCountНетRuntime batch max count.
blockProcessingConcurrencyНетRuntime block processing concurrency.
maxQueuedBlocksНетRuntime queued block limit.
substrate.extensionsНетSubstrate extensions/types/rpc config.
meta.titleДаVisible title.
meta.descriptionНетDescription.
meta.icons.defaultНетIcon URL.

Response: saved custom source.

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

Удаляет custom source.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload: нет.

Response: operation result.

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

Возвращает custom source logs.

Arguments:

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

Payload: нет.

Response: log entries.

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

Проверяет или имитирует status transition custom source.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload:

FieldRequiredDescription
typeДаerror или recovered.

Response: status test result.

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

Перезапускает custom source runtime.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload: {}.

Response: restart result.

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

Сбрасывает lag custom source.

Arguments:

ArgumentLocationDescription
fullnamePathCustom source fullname.

Payload: {}.

Response: reset result.