Note: You must contact Hive to have streams allocated to your project before you can use this feature.

This endpoint will stop a stream that is currently in process. This uses the stream id that is returned from the Submit a Stream endpoint, or the Get all Streams endpoints.

EXAMPLES


curl --request POST \
  --url https://api.thehive.ai/api/v2/stream/cancel \
  --header 'accept: application/json' \
  --header 'authorization: token <API_KEY>' \
  --form 'stream_id=<STREAM ID>'
var request = require("request");

var options = {
  method: 'POST',
  url: 'https://api.thehive.ai/api/v2/stream/cancel',
  headers: {
    accept: 'application/json',
    authorization: 'token <API_KEY>'
  },
  form: {stream_id:"<STREAM ID>"}
};  

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
import requests
url = 'https://api.thehive.ai/api/v2/stream/cancel'
headers = {"authorization": "token <API_KEY>", "accept": "application/json"}
data = {'stream_id': '<STREAM ID>'}
response = session.post("https://api.thehive.ai/api/v2/stream/cancel", headers = headers, data = data)

RESULTS


{
    "stream_id": "01daac40-1911-11ed-b992-b77ab60949a3",
    "message": "canceled"
}
{
    "return_code": 400,
    "message": "Invalid stream_id."
}
Form Data
string

The ID of the stream you want to cancel.

HEADERS
string
required

Project API Token from hive customer dashboard. Prepend with 'token'