Skip to main content
Version: 2.2

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": ""
}