Manage rules to streamline event management.
How to Get Rule Details
Returns a user based on a single ID.
Request Payload
- Replace
YOUR_ACCESS_TOKEN
with your API key for authentication. Learn how to get your API key here. - Replace
YOUR_RULE_ID
with the rule ID you want to retrieve.
curl -X GET "https://svc.Blockdaemon.com/streaming/v1/rules/YOUR_RULE_ID" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response Payload
The successful result will include the rule details.
{
"condition": [
{
"variable_id": "<VARIABLE_ID>",
"variable_type": "source-address"
},
{
"variable_id": "<VARIABLE_ID>",
"variable_type": "destination-address"
}
],
"condition_type": "match_var",
"created_at": "2024-02-05T13:29:23.2179Z",
"description": "Ethereum mainnet demo",
"id": "<RULE_ID>",
"isActive": true,
"name": "Ethereum mainnet demo",
"network": "mainnet",
"protocol": "ethereum",
"safeDistance": 0,
"safeTimeout": 0,
"target": "<TARGET_ID>",
"template": "ALL_DATA",
"type": "all",
"updated_at": "2024-02-05T13:29:23.2179Z"
}
How to Update Rule
Update an existing rule.
Request Payload
- Replace
YOUR_ACCESS_TOKEN
with your API key for authentication. Learn how to get your API key here. - Replace
YOUR_RULE_ID
with the rule ID you want to update.
curl -X PUT "https://svc.Blockdaemon.com/streaming/v1/rules/YOUR_RULE_ID" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"condition": [
{
"variable_id": "<VARIABLE_ID>",
"variable_type": "source-address"
},
{
"variable_id": "<VARIABLE_ID>",
"variable_type": "destination-address"
}
],
"condition_type": "match_var",
"created_at": "2024-02-05T13:29:23.2179Z",
"description": "Ethereum mainnet demo",
"id": "<RULE_ID>",
"isActive": true,
"name": "Ethereum mainnet demo",
"network": "mainnet",
"protocol": "ethereum",
"safeDistance": 0,
"safeTimeout": 0,
"target": "<TARGET_ID>",
"template": "ALL_DATA",
"type": "all",
}
Response Payload
The successful result will be the updated rule.
{
"condition": [
{
"variable_id": "<VARIABLE_ID>",
"variable_type": "source-address"
},
{
"variable_id": "<VARIABLE_ID>",
"variable_type": "destination-address"
}
],
"condition_type": "match_var",
"created_at": "2024-02-05T13:29:23.2179Z",
"description": "Updated desc Ethereum mainnet demo",
"id": "<RULE_ID>",
"isActive": true,
"name": "Ethereum mainnet demo",
"network": "mainnet",
"protocol": "ethereum",
"safeDistance": 0,
"safeTimeout": 0,
"target": "<TARGET_ID>",
"template": "ALL_DATA",
"type": "all",
"updated_at": "2024-02-05T13:41:12.271366Z"
}
How to Delete Rule
Delete a rule using its ID. This action can't be undone.
Request Payload
- Replace
YOUR_RULE_ID
with the rule ID you want to delete. - Replace
YOUR_ACCESS_TOKEN
with your API key for authentication. Learn how to get your API key here.
curl -X DELETE "https://svc.Blockdaemon.com/streaming/v1/rules/YOUR_RULE_ID" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response Payload
The status code "204 - No Content" indicates that the request was successful and the rule was deleted.
👋 Need Help?
Contact us through email or our support page for any issues, bugs, or assistance you may need.