Delete a Stream

DELETE /streams/:id

Deletes a stream. Once a stream has been deleted it cannot be restored. You may create a new stream.

🚧

Changing Resource Filters

Once a stream is filtered to a specific set of resources, it cannot be changed. You must delete and recreate the stream.

Request Parameters

NameRequired FieldTypeDescription
IDrequiredstringUnique identifier assigned to a stream.

HTTP Response Status

Response CodeDescription
200 (Ok)Indicates the request was received and the object was deleted successfully.
404 (Not Found)Indicates that the stream could not be found.
409 (Conflict)Indicates inability to delete stream due to active clients connected to that particular stream.

Code Samples

curl --request DELETE \
  --url 'https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896' \
  --header 'content-type: application/json'
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896"

    req, _ := http.NewRequest("DELETE", url, nil)

    req.Header.Add("content-type", "application/json")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
import requests

url = "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b"

querystring = {"token":"6f46db36dd6543d2b82d91698fcd0896"}

payload = ""
headers = {'content-type': 'application/json'}

response = requests.request("DELETE", url, data=payload, headers=headers, params=querystring)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "id": "5978dc880b11e700010ae88b",
    "name": "WilcoMemorial",
    "resource_filter": [],
    "start_date": null,
    "group": "stream_5978dc880b11e700010ae88b",
    "members": 0,
    "created_at": "2017-07-26T18:16:40Z",
    "updated_at": "2017-08-04T16:38:22Z",
    "deleted_at": "2017-08-04T17:02:11Z"
}

Response Field Descriptions

NameTypeDescription
idstringUnique identifier for the stream.
namestringThe name of the stream provided by the customer.
groupstringValidic name for the stream.
membersintegerThe number of clients currently connected.
start_datestringOnly events with start times on or after this field are sent.
resource_filterarrayOnly events with resource types included in this list are sent.
created_atstringThe date and time the resource was created.
updated_atstringThe date and time the resource was updated.
deleted_astringThe date and time the resource was deleted.

What’s Next