Producer API (1.0.0)
Download OpenAPI specification:Download
Nodeos Producer API Specification. See developer documentation at https://docs.eosnetwork.com for information on enabling this plugin.
paused
Retrieves paused status for producer node. Takes no arguments and returns no values.
Authorizations:
Responses
Response samples
- 400
{- "code": 400,
- "message": "Invalid Request",
- "error": {
- "code": 3200006,
- "name": "invalid_http_request",
- "what": "invalid http request",
- "details": [
- {
- "message": "Unable to parse valid input from POST body",
- "file": "http_plugin.hpp",
- "line_number": 246,
- "method": "parse_params"
}
]
}
}
Response samples
- 201
- 400
{- "max_transaction_time": 100,
- "max_irreversible_block_age": -1,
- "produce_time_offset_us": -100000,
- "last_block_time_offset_us": -200000,
- "max_scheduled_transaction_time_per_block_ms": 100,
- "subjective_cpu_leeway_us": 10,
- "incoming_defer_ratio": "1.00000000000000000",
- "greylist_limit": 1000
}
update_runtime_options
Update runtime options for producer node. May post any of the runtime options in combination or alone.
Authorizations:
Request Body schema: application/json
max_transaction_time | integer Max transaction time |
max_irreversible_block_age | integer Max irreversible block age |
produce_time_offset_us | integer Time offset |
last_block_time_offset_us | integer Last block time offset |
max_scheduled_transaction_time_per_block_ms | integer Max scheduled transaction time per block in ms |
subjective_cpu_leeway_us | integer in micro seconds |
incoming_defer_ratio | string Incoming defer ratio, parsed to double |
greylist_limit | integer limit on number of Names supported by greylist |
Responses
Request samples
- Payload
{- "max_transaction_time": 100,
- "max_irreversible_block_age": -1,
- "produce_time_offset_us": -100000,
- "last_block_time_offset_us": -200000,
- "max_scheduled_transaction_time_per_block_ms": 100,
- "subjective_cpu_leeway_us": 10,
- "incoming_defer_ratio": "1.00000000000000000",
- "greylist_limit": 1000
}
Response samples
- 201
- 400
{- "result": "ok"
}
add_greylist_accounts
Adds accounts to greylist for producer node. At least one account is required.
Authorizations:
Request Body schema: application/json
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name) List of account names to add | |
Array Any of string (NamePrivileged) ^(eosio[\.][a-z1-5]{1,6})([a-j]{1})?$ String representation of privileged EOSIO name type |
Responses
Request samples
- Payload
{- "accounts": [
- "string"
]
}
Response samples
- 201
- 400
{- "result": "ok"
}
remove_greylist_accounts
Removes accounts from greylist for producer node. At least one account is required.
Authorizations:
Request Body schema: application/json
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name) List of account names to remove | |
Array Any of string (NamePrivileged) ^(eosio[\.][a-z1-5]{1,6})([a-j]{1})?$ String representation of privileged EOSIO name type |
Responses
Request samples
- Payload
{- "accounts": [
- "string"
]
}
Response samples
- 201
- 400
{- "result": "ok"
}
get_whitelist_blacklist
Retrieves the whitelist and blacklist for producer node. A JSON object containing whitelist and blacklist information.
Authorizations:
Responses
Response samples
- 201
- 400
{- "actor_whitelist": [
- "string"
], - "actor_blacklist": [
- "string"
], - "contract_whitelist": [
- "string"
], - "contract_blacklist": [
- "string"
], - "action_blacklist": [
- [
- "string"
]
], - "key_blacklist": [
- "uint64"
]
}
set_whitelist_blacklist
Defines the whitelist and blacklist for a producer node. Takes a JSON object containing whitelist and blacklist information.
Authorizations:
Request Body schema: application/json
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name) | |
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name) | |
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name) | |
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name) | |
Array of (Name (NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string))) or CppSignature (string)[ items ] | |
key_blacklist | Array of strings (KeyType) Items Enum: "uint64" "double" |
Responses
Request samples
- Payload
{- "actor_whitelist": [
- "string"
], - "actor_blacklist": [
- "string"
], - "contract_whitelist": [
- "string"
], - "contract_blacklist": [
- "string"
], - "action_blacklist": [
- [
- "string"
]
], - "key_blacklist": [
- "uint64"
]
}
Response samples
- 201
- 400
{- "result": "ok"
}
create_snapshot
Creates a snapshot for producer node. Returns error when unable to create a snapshot.
Authorizations:
Responses
Response samples
- 201
- 400
{- "head_block_id": "string",
- "head_block_num": 5102,
- "head_block_time": "2020-11-16T00:00:00.000",
- "version": 6,
- "snapshot_name": "/home/me/nodes/node-name/snapshots/snapshot-0000999f99999f9f999f99f99ff9999f999f9fff99ff99ffff9f9f9fff9f9999.bin"
}
schedule_snapshot
Submits a request to automatically generate snapshots according to a schedule specified with given parameters. If request body is empty, schedules immediate snapshot generation. Returns error when unable to accept schedule.
Authorizations:
Request Body schema: application/json
block_spacing | integer Generate snapshot every block_spacing blocks |
start_block_num | integer Block number at which schedule starts |
end_block_num | integer Block number at which schedule ends |
snapshot_description | string Description of the snapshot |
Responses
Request samples
- Payload
{- "block_spacing": 0,
- "start_block_num": 5102,
- "end_block_num": 15102,
- "snapshot_description": "Daily snapshot"
}
Response samples
- 201
- 400
{- "snapshot_request_id": 0,
- "block_spacing": 0,
- "start_block_num": 5102,
- "end_block_num": 15102,
- "snapshot_description": "Daily snapshot"
}
Response samples
- 201
- 400
{- "snapshot_requests": [
- {
- "snapshot_request_id": 0,
- "block_spacing": 0,
- "start_block_num": 5102,
- "end_block_num": 15102,
- "snapshot_description": "Daily snapshot",
- "pending_snapshots": [
- {
- "head_block_id": "string",
- "head_block_num": 5102,
- "head_block_time": "2020-11-16T00:00:00.000",
- "version": 6,
- "snapshot_name": "/home/me/nodes/node-name/snapshots/snapshot-0000999f99999f9f999f99f99ff9999f999f9fff99ff99ffff9f9f9fff9f9999.bin"
}
]
}
]
}
unschedule_snapshot
Removes snapshot request identified by id. Returns error if referenced snapshot request does not exist.
Authorizations:
Request Body schema: application/json
snapshot_request_id | integer snapshot id |
Responses
Request samples
- Payload
{- "snapshot_request_id": 0
}
Response samples
- 201
- 400
{- "snapshot_request_id": 0,
- "block_spacing": 0,
- "start_block_num": 5102,
- "end_block_num": 15102,
- "snapshot_description": "Daily snapshot"
}
schedule_protocol_feature_activations
Schedule protocol feature activation for producer node. Note some features may require pre-activation. Will return error for duplicate requests or when feature required pre-activation.
Authorizations:
Request Body schema: application/json
protocol_features_to_activate | Array of strings (Sha256) List of protocol features to activate |
Responses
Request samples
- Payload
{- "protocol_features_to_activate": [
- "string"
]
}
Response samples
- 201
- 400
{- "result": "ok"
}
get_supported_protocol_features
Retrieves supported protocol features for producer node. Pass filters in as part of the request body.
Authorizations:
Request Body schema: application/json
exclude_disabled | boolean Default: false Exclude disabled protocol features |
exclude_unactivatable | boolean Default: false Exclude unactivatable protocol features |
Responses
Request samples
- Payload
{- "exclude_disabled": false,
- "exclude_unactivatable": false
}
Response samples
- 201
- 400
[- {
- "feature_digest": "string",
- "subjective_restrictions": {
- "enabled": true,
- "preactivation_required": true,
- "earliest_allowed_activation_time": "1970-01-01T00:00:00.000",
- "description_digest": "string",
- "dependencies": [
- "string"
], - "protocol_feature_type": "builtin",
- "specification": [
- {
- "name": "string",
- "value": "string"
}
]
}
}
]
get_account_ram_corrections
Retrieves accounts with ram corrections.
Authorizations:
Request Body schema: application/json
lower_bound | integer lowest account key |
upper_bound | integer highest account key |
limit | integer Default: 10 number of rows to scan |
reverse | boolean Default: false direction of search |
Responses
Request samples
- Payload
{- "lower_bound": 0,
- "upper_bound": 0,
- "limit": 10,
- "reverse": false
}
Response samples
- 201
- 400
{- "rows": [
- "string"
], - "more": [
- "string"
]
}
get_unapplied_transactions
Get Unapplied Transactions.
Authorizations:
Request Body schema: application/json
limit | integer Default: 100 limit number of transactions to return |
lower_bound | string (Sha256) ^[0-9A-Fa-f]{64}$ |
time_limit_ms | integer Default: "http-max-response-time-ms" |
Responses
Request samples
- Payload
{- "limit": 100,
- "lower_bound": "string",
- "time_limit_ms": 10
}
Response samples
- 200
- 400
{- "size": 12428,
- "incoming_size": 4475,
- "trxs": [
- {
- "trx_id": "string",
- "expiration": "2022-09-17T16:30:16",
- "trx_type": "aborted",
- "first_auth": "jkbsg.wam",
- "first_receiver": "m.federation",
- "first_action": "mine",
- "total_actions": 1,
- "billed_cpu_time_us": 504,
- "size": 934
}
], - "more": "string"
}