Disable Item
Disable an existing Item. When an item is disabled it means it will be remove from the queue to be detected for events and webhook/notifications call. Usually this happens in less than 30 min.
Request
POST https://api.arkhia.io/events/hedera/disable/:item/:x-api-key
HEADERS
x-api-secret | string | The Api Secret retrieved from an Arkhia project
PARAMETERS
item | string | `contract` or `ethtopic` or `account`
x-api-key | string | The Api Key retrieved from an Arkhia project
BODY PAYLOAD
item_id | string | `contract` or `account` -> hedera_item_id , `ethtopic` as an eth topic
network_id | number | `295` (mainnet) or `296` (testnet)
HEADERS
x-api-secret | string | The Api Secret retrieved from an Arkhia project
PARAMETERS
item | string | `contract` or `ethtopic` or `account`
x-api-key | string | The Api Key retrieved from an Arkhia project
BODY PAYLOAD
item_id | string | `contract` or `account` -> hedera_item_id , `ethtopic` as an eth topic
network_id | number | `295` (mainnet) or `296` (testnet)
Response
- Operational [200]
{
status: true,
response: {
id: 'clodtgmle000nf50iyf4f8t3i',
item_id: '0.0.5802863',
user_id: 'clod75irl0001fj0i1453nzwd',
network_id: 296,
type_id: 1,
enabled: false,
json_settings: { metadata: [Object], balance: [Object], expiration: [Object] },
status: 'QUEUED',
created_at: '2023-10-31T04:16:06.983Z',
updated_at: '2023-10-31T04:16:06.983Z',
job_health_timestamp: '1970-01-01T00:00:00.000Z',
request_fetch_limit: 100
}
}
Code Examples
cURL Examples
- cURL
- Node Js
Disable Account Event Settings
curl -X POST "https://api.arkhia.io/events/hedera/disable/account/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0.0.123456",
"network_id": 295
}
}'
Disable Contract Event Settings
curl -X POST "https://api.arkhia.io/events/hedera/disable/contract/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0.0.789012",
"network_id": 295
}
}'
Disable EthTopic Event Settings
curl -X POST "https://api.arkhia.io/events/hedera/disable/ethtopic/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "x-api-secret: YOUR_API_SECRET" \
-d '{
"scoutSettings": {
"item_id": "0x1234567890123456789012345678901234567890123456789012345678901234",
"network_id": 296
}
}'
const axios = require('axios');// Disable Account Event Settingsconst disableAccountItem = async () => { const restApiUrl = `https://api.arkhia.io/events/hedera/disable/account/YOUR_API_KEY`; const apiSecret = `YOUR_API_SECRET`; const headers = { headers: { "x-api-secret": apiSecret, "Content-Type": "application/json" } }; const bodyPayload = { scoutSettings: { item_id: '0.0.123456', network_id: 295 } }; try { const response = await axios.post(restApiUrl, bodyPayload, headers); return response; } catch(e) { console.error(e); }}// Disable Contract Event Settingsconst disableContractItem = async () => { const restApiUrl = `https://api.arkhia.io/events/hedera/disable/contract/YOUR_API_KEY`; const apiSecret = `YOUR_API_SECRET`; const headers = { headers: { "x-api-secret": apiSecret, "Content-Type": "application/json" } }; const bodyPayload = { scoutSettings: { item_id: '0.0.789012', network_id: 295 } }; try { const response = await axios.post(restApiUrl, bodyPayload, headers); return response; } catch(e) { console.error(e); }}// Disable EthTopic Event Settingsconst disableEthTopicItem = async () => { const restApiUrl = `https://api.arkhia.io/events/hedera/disable/ethtopic/YOUR_API_KEY`; const apiSecret = `YOUR_API_SECRET`; const headers = { headers: { "x-api-secret": apiSecret, "Content-Type": "application/json" } }; const bodyPayload = { scoutSettings: { item_id: '0x1234567890123456789012345678901234567890123456789012345678901234', network_id: 296 } }; try { const response = await axios.post(restApiUrl, bodyPayload, headers); return response; } catch(e) { console.error(e); }}