Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.0

Update a Stream Status

POSThttps://api.moralis-streams.com/streams/aptos/:id/status

Update a Stream Status

PATH PARAMS
idstringrequired
the id of the aptos stream to update the status
BODY PARAM
statusstring

The stream status: [active] The Stream is healthy and processing blocks [paused] The Stream is paused and is not processing blocks [error] The Stream has encountered an error and is not processing blocks

Responses
API KEY
// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
method: 'POST',
headers: {
accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
};

fetch('https://api.moralis-streams.com/streams/aptos/%3Aid/status', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Response Example
{
"status": "",
"statusMessage": ""
}