HTTP Methods
API Calls
Retrieves the list of backfilling jobs.
f469559d4cc55170a26031a4a5123eb2
GET /backfill/job/ HTTP/1.1
Host: api.dh3.io
Accept: */*
Successful response
[
{
"id": "44",
"name": "scan-1",
"status": "COMPLETED",
"batch": "1",
"hooks": {
"data": "https://my.project.com/callback",
"status": null,
"metrics": null
},
"cpu_limit": "1",
"range": {
"blocks": {
"start": 164776968,
"end": 164754296
},
"time": {
"start": 1670110514,
"end": 1670120614
}
},
"filter": [
{
"include": {
"instructions": [
{
"address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
"discriminator": "10",
"discriminatorType": "u8"
}
]
}
}
],
"metrics": {
"cpu_time": 220,
"run_time": 220,
"txt_forward": 1313,
"txt_per_sec": 4279,
"txt_scanned": 941482,
"callback_error_count": 0,
"completed_percentage": 100,
"callback_success_count": 137,
"callback_bytes_transmit": 0
}
}
]
Creates a backfilling task that retrieves transactions based on specified filters and subsequently submits them to a predefined URL in the hook's data field.
f469559d4cc55170a26031a4a5123eb2
The name of job.
An array of filters to apply. Check the Transaction Filter for details.
Batch webhook calls. Specify the number of transactions to be batched in one call. Defaults to 1
Limit CPU for JOB, one CPU does ~20 000 transaction rescans. Speed can vary based on how many records are picked up and sent back. You can look at it as concurrency or threads, one CPU will always send one hook at the moment. Defaults to 1
POST /backfill/job/ HTTP/1.1
Host: api.dh3.io
Content-Type: application/json
Accept: */*
Content-Length: 360
{
"name": "scan-1",
"hooks": {
"data": "https://my.project.com/callback/"
},
"range": {
"time": {
"start": 1670110514,
"end": 1670120614
}
},
"filter": [
{
"name": "metaplex-CreateMetadataV2",
"include": {
"instructions": [
{
"address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
"discriminator": "10",
"discriminatorType": "u8"
}
]
}
}
],
"parser": {
"enabled": [
"data"
]
},
"cpu_limit": 1,
"batch": 10
}
Successful response
{
"id": 1
}
Retrieves full job information
44
f469559d4cc55170a26031a4a5123eb2
GET /backfill/job/{id} HTTP/1.1
Host: api.dh3.io
Accept: */*
Successful response
{
"id": "44",
"name": "scan-1",
"status": "COMPLETED",
"batch": "1",
"hooks": {
"data": "https://my.project.com/callback",
"status": null,
"metrics": null
},
"cpu_limit": "1",
"range": {
"blocks": {
"start": 164776968,
"end": 164754296
},
"time": {
"start": 1670110514,
"end": 1670120614
}
},
"filter": [
{
"include": {
"instructions": [
{
"address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
"discriminator": "10",
"discriminatorType": "u8"
}
]
}
}
],
"metrics": {
"cpu_time": 220,
"run_time": 220,
"txt_forward": 1313,
"txt_per_sec": 4279,
"txt_scanned": 941482,
"callback_error_count": 0,
"completed_percentage": 100,
"callback_success_count": 137,
"callback_bytes_transmit": 0
}
}
Delete backfilling job.
44
f469559d4cc55170a26031a4a5123eb2
DELETE /backfill/job/{id} HTTP/1.1
Host: api.dh3.io
Accept: */*
Successful response
{
"message": "ok"
}
Updates job params.
44
f469559d4cc55170a26031a4a5123eb2
PATCH /backfill/job/{id} HTTP/1.1
Host: api.dh3.io
Accept: */*
Successful response
{
"message": "ok"
}
Starts a backfilling process. If the time range is big, it could take up to a few minutes to start.
44
f469559d4cc55170a26031a4a5123eb2
PATCH /backfill/job/{id}/start HTTP/1.1
Host: api.dh3.io
Accept: */*
Successful response
{
"message": "ok"
}
Stops backfilling process. After that job will have PAUSE status.
44
f469559d4cc55170a26031a4a5123eb2
PATCH /backfill/job/{id}/stop HTTP/1.1
Host: api.dh3.io
Accept: */*
Successful response
{
"message": "ok"
}
Metrics can be received on demand via this call or by getting full job information. Also you can defined metrics web hook callback when creating job.
44
f469559d4cc55170a26031a4a5123eb2
GET /backfill/job/{id}/metrics HTTP/1.1
Host: api.dh3.io
Accept: */*
Successful response
{
"cpu_time": 220,
"run_time": 220,
"txt_forward": 1313,
"txt_per_sec": 4279,
"txt_scanned": 941482,
"callback_error_count": 0,
"completed_percentage": 100,
"callback_success_count": 137,
"callback_bytes_transmit": 0
}
Last updated