{
  "openapi": "3.1.0",
  "info": {
    "title": "streaming-resources",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://streams.v2.validic.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "query",
        "name": "token",
        "x-default": "6f46db36dd6543d2b82d91698fcd0896"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/streams?token={token}": {
      "post": {
        "summary": "Create a Stream",
        "description": "Before connecting to the Stream endpoint, a customer will need to create a stream. Validic allows a customer to create up to 5 streams (note that this number is the number of streams, not the number of client connections to the stream). Attempting to create more than the allowed number will result in an error. Please note that optional filters need to be assigned when creating a stream. This allows Validic to apply the filters for each client that connects to the created stream\u2019s connect endpoint, ensuring all clients receive a consistent view of the stream.",
        "operationId": "create-a-stream",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "Developer Key as supplied by Validic.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "A unique name for the stream."
                  },
                  "start_date": {
                    "type": "string"
                  },
                  "resource_filter": {
                    "type": "string",
                    "description": "Optional resource filter that is applied which will only send events if the event resource type is in the provided list. Supported Values: measurement, nutrition, sleep, summary, workout"
                  },
                  "event_type_filter": {
                    "type": "string",
                    "description": "Optional SSE filter that is applied which will only send events if the event type is in the provided list"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": \"59778dSAMPLE70001565a2d\",\n    \"name\": \"customer_meaningful_name\",\n    \"resource_filter\": [\n        \"summary\",\n        \"measurement\"\n    ],\n    \"start_date\": \"2017-07-25\",\n    \"group\": \"stream_59778d430b11e70001565a2d\",\n    \"members\": 0,\n    \"created_at\": \"2017-07-25T18:26:11Z\",\n    \"updated_at\": \"2017-07-25T18:26:11Z\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "59778dSAMPLE70001565a2d"
                    },
                    "name": {
                      "type": "string",
                      "example": "customer_meaningful_name"
                    },
                    "resource_filter": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "summary"
                      }
                    },
                    "start_date": {
                      "type": "string",
                      "example": "2017-07-25"
                    },
                    "group": {
                      "type": "string",
                      "example": "stream_59778d430b11e70001565a2d"
                    },
                    "members": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2017-07-25T18:26:11Z"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2017-07-25T18:26:11Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "text",
              "code": "POST https://streams.v2.validic.com/streams?token=6f46db3SAMPLEb82d91698fcd0896\n\n{\n  \"name\": \"customer_meaningful_name\",\n  \"start_date\": \"2017-01-01\",\n  \"resource_filter\": [\"summary\", \"measurement\"]\n}"
            },
            {
              "language": "curl",
              "code": "curl --request POST \\\n  --url 'https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896' \\\n  --header 'content-type: application/json' \\\n  --data '{\n  \"name\": \"customer-meaningful-name\",\n  \"start_date\": \"2017-07-25\",\n  \"resource_filter\": [\"summary\", \"measurement\"]\n}'"
            },
            {
              "language": "ruby",
              "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896\")\n\nhttp = Net::HTTP.new(url.host, url.port)\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n  \\\"name\\\": \\\"customer-meaningful-name\\\",\\n  \\\"start_date\\\": \\\"2017-07-25\\\",\\n  \\\"resource_filter\\\": [\\\"summary\\\", \\\"measurement\\\"]\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = \"https://streams.v2.validic.com/streams\"\n\nquerystring = {\"token\":\"6f46db36dd6543d2b82d91698fcd0896\"}\n\npayload = \"{\\n  \\\"name\\\": \\\"customer-meaningful-name\\\",\\n  \\\"start_date\\\": \\\"2017-07-25\\\",\\n  \\\"resource_filter\\\": [\\\"summary\\\", \\\"measurement\\\"]\\n}\"\nheaders = {'content-type': 'application/json'}\n\nresponse = requests.request(\"POST\", url, data=payload, headers=headers, params=querystring)\n\nprint(response.text)"
            },
            {
              "language": "php",
              "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\n  \\\"name\\\": \\\"customer-meaningful-name\\\",\\n  \\\"start_date\\\": \\\"2017-07-25\\\",\\n  \\\"resource_filter\\\": [\\\"summary\\\", \\\"measurement\\\"]\\n}\",\n  CURLOPT_HTTPHEADER => array(\n    \"content-type: application/json\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
            },
            {
              "language": "go",
              "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896\"\n\n\tpayload := strings.NewReader(\"{\\n  \\\"name\\\": \\\"customer-meaningful-name\\\",\\n  \\\"start_date\\\": \\\"2017-07-25\\\",\\n  \\\"resource_filter\\\": [\\\"summary\\\", \\\"measurement\\\"]\\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
            }
          ],
          "samples-languages": [
            "text",
            "curl",
            "ruby",
            "python",
            "php",
            "go"
          ]
        }
      },
      "get": {
        "summary": "Get a Stream",
        "description": "Returns a list of customer streams for the authenticated customer. The streams are returned sorted by creation date with the most recent streams appearing first.m.",
        "operationId": "get-a-stream",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "Developer Key as supplied by Validic.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "q",
            "in": "query",
            "description": "Used to query for a customer's streams. Ex: ?q=name=a",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Used to sort the results. Ex: ?sort[]=-created_at or ?sort[]=updated_at",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"streams\": [\n    {\n      \"id\": \"5978bfe10b11e70001748518\",\n      \"name\": \"RDWest\",\n      \"resource_filter\": [\n        \"summary\",\n        \"measurement\"\n      ],\n      \"start_date\": \"2017-07-25\",\n      \"group\": \"stream_5978bfe10b11e70001748518\",\n      \"members\": 0,\n      \"created_at\": \"2017-07-26T16:14:25Z\",\n      \"updated_at\": \"2017-07-26T16:14:25Z\"\n    },\n    {\n      \"id\": \"5978b73b0b11e70001645780\",\n      \"name\": \"hospital2\",\n      \"resource_filter\": [],\n      \"start_date\": null,\n      \"group\": \"stream_5978b73b0b11e70001645780\",\n      \"members\": 0,\n      \"created_at\": \"2017-07-26T15:37:31Z\",\n      \"updated_at\": \"2017-07-26T15:37:31Z\"\n    },\n    {\n      \"id\": \"59778d430b11e70001565a2d\",\n      \"name\": \"hospital1\",\n      \"resource_filter\": [\n        \"summary\",\n        \"measurement\"\n      ],\n      \"start_date\": \"2017-07-25\",\n      \"group\": \"stream_59778d430b11e70001565a2d\",\n      \"members\": 0,\n      \"created_at\": \"2017-07-25T18:26:11Z\",\n      \"updated_at\": \"2017-07-25T18:26:11Z\"\n    }\n  ],\n  \"meta\": {\n    \"offset\": 0,\n    \"limit\": 25,\n    \"total\": 3,\n    \"sort\": [\n      \"created_at DESC\"\n    ]\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "streams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "5978bfe10b11e70001748518"
                          },
                          "name": {
                            "type": "string",
                            "example": "RDWest"
                          },
                          "resource_filter": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "example": "summary"
                            }
                          },
                          "start_date": {
                            "type": "string",
                            "example": "2017-07-25"
                          },
                          "group": {
                            "type": "string",
                            "example": "stream_5978bfe10b11e70001748518"
                          },
                          "members": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2017-07-26T16:14:25Z"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2017-07-26T16:14:25Z"
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "offset": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "limit": {
                          "type": "integer",
                          "example": 25,
                          "default": 0
                        },
                        "total": {
                          "type": "integer",
                          "example": 3,
                          "default": 0
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "created_at DESC"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "text",
              "code": "https://streams.v2.validic.com/streams?token=6f46db36ddSAMPLE2d91698fcd0896&q=&sort=created_at"
            },
            {
              "language": "curl",
              "code": "curl --request GET \\\n  --url 'https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896' \\\n  --header 'content-type: application/json'"
            },
            {
              "language": "ruby",
              "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896\")\n\nhttp = Net::HTTP.new(url.host, url.port)\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"content-type\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = \"https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896\"\n\nquerystring = {\"token\":\"6f46db36dd6543d2b82d91698fcd0896\"}\n\nheaders = {'content-type': 'application/json'}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"
            },
            {
              "language": "php",
              "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
            },
            {
              "language": "go",
              "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://streams.v2.validic.com/streams?token=6f46db36dd6543d2b82d91698fcd0896\"\n\n\tpayload := strings.NewReader(\"{\\n  \\\"name\\\": \\\"customer-meaningful-name\\\",\\n  \\\"start_date\\\": \\\"2017-07-25\\\",\\n  \\\"resource_filter\\\": [\\\"summary\\\", \\\"measurement\\\"]\\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
            }
          ],
          "samples-languages": [
            "text",
            "curl",
            "ruby",
            "python",
            "php",
            "go"
          ]
        }
      }
    },
    "/streams/{id}?token={token}": {
      "get": {
        "summary": "Get a Stream By ID",
        "description": "Returns a list of customer streams for the authenticated customer. The streams are returned sorted by creation date with the most recent streams appearing first.m.",
        "operationId": "get-a-stream-by-id-1",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "Developer Key as supplied by Validic.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "description": "ID of stream defined when the stream was created",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": \"5978dc880b11e700010ae88b\",\n    \"name\": \"test1223\",\n    \"resource_filter\": [],\n    \"start_date\": null,\n    \"group\": \"stream_5978dc880b11e700010ae88b\",\n    \"members\": 0,\n    \"created_at\": \"2017-07-26T18:16:40Z\",\n    \"updated_at\": \"2017-07-26T18:16:40Z\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "5978dc880b11e700010ae88b"
                    },
                    "name": {
                      "type": "string",
                      "example": "test1223"
                    },
                    "resource_filter": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "start_date": {},
                    "group": {
                      "type": "string",
                      "example": "stream_5978dc880b11e700010ae88b"
                    },
                    "members": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2017-07-26T18:16:40Z"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2017-07-26T18:16:40Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request GET \\\n  --url 'https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896'"
            },
            {
              "language": "ruby",
              "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\")\n\nhttp = Net::HTTP.new(url.host, url.port)\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b\"\n\nquerystring = {\"token\":\"6f46db36dd6543d2b82d91698fcd0896\"}\n\nresponse = requests.request(\"GET\", url, params=querystring)\n\nprint(response.text)"
            },
            {
              "language": "php",
              "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
            },
            {
              "language": "go",
              "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
            }
          ],
          "samples-languages": [
            "curl",
            "ruby",
            "python",
            "php",
            "go"
          ]
        }
      },
      "put": {
        "summary": "Update a Stream",
        "description": "Returns a list of customer streams for the authenticated customer. The streams are returned sorted by creation date with the most recent streams appearing first.",
        "operationId": "update-a-stream-1",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "Developer Key as supplied by Validic.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "description": "ID of stream defined when the stream was created",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "A unique name for the stream."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": \"5978dc880b11e700010ae88b\",\n    \"name\": \"WilcoMemorial\",\n    \"resource_filter\": [],\n    \"start_date\": null,\n    \"group\": \"stream_5978dc880b11e700010ae88b\",\n    \"members\": 0,\n    \"created_at\": \"2017-07-26T18:16:40Z\",\n    \"updated_at\": \"2017-08-04T16:38:22Z\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "5978dc880b11e700010ae88b"
                    },
                    "name": {
                      "type": "string",
                      "example": "WilcoMemorial"
                    },
                    "resource_filter": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "start_date": {},
                    "group": {
                      "type": "string",
                      "example": "stream_5978dc880b11e700010ae88b"
                    },
                    "members": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2017-07-26T18:16:40Z"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2017-08-04T16:38:22Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request PUT \\\n  --url 'https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896' \\\n  --header 'content-type: application/json' \\\n  --data '{\n  \"name\": \"WilcoMemorial\"\n}"
            },
            {
              "language": "ruby",
              "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\")\n\nhttp = Net::HTTP.new(url.host, url.port)\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n  \\\"name\\\": \\\"WilcoMemorial\\\"\\n}\\n\"\n\nresponse = http.request(request)\nputs response.read_body"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b\"\n\nquerystring = {\"token\":\"6f46db36dd6543d2b82d91698fcd0896\"}\n\npayload = \"{\\n  \\\"name\\\": \\\"WilcoMemorial\\\"\\n}\\n\"\nheaders = {'content-type': 'application/json'}\n\nresponse = requests.request(\"PUT\", url, data=payload, headers=headers, params=querystring)\n\nprint(response.text)"
            },
            {
              "language": "php",
              "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{\\n  \\\"name\\\": \\\"WilcoMemorial\\\"\\n}\\n\",\n  CURLOPT_HTTPHEADER => array(\n    \"content-type: application/json\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
            },
            {
              "language": "go",
              "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\"\n\n\tpayload := strings.NewReader(\"{\\n  \\\"name\\\": \\\"WilcoMemorial\\\"\\n}\\n\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
            }
          ],
          "samples-languages": [
            "curl",
            "ruby",
            "python",
            "php",
            "go"
          ]
        }
      },
      "delete": {
        "summary": "Delete a Stream",
        "description": "Deletes a stream. Once a stream has been deleted it cannot be restored. You may create a new stream.",
        "operationId": "delete-a-stream-1",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "Developer Key as supplied by Validic.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "description": "ID of stream defined when the stream was created",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": \"5978dc880b11e700010ae88b\",\n    \"name\": \"WilcoMemorial\",\n    \"resource_filter\": [],\n    \"start_date\": null,\n    \"group\": \"stream_5978dc880b11e700010ae88b\",\n    \"members\": 0,\n    \"created_at\": \"2017-07-26T18:16:40Z\",\n    \"updated_at\": \"2017-08-04T16:38:22Z\",\n    \"deleted_at\": \"2017-08-04T17:02:11Z\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "5978dc880b11e700010ae88b"
                    },
                    "name": {
                      "type": "string",
                      "example": "WilcoMemorial"
                    },
                    "resource_filter": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "start_date": {},
                    "group": {
                      "type": "string",
                      "example": "stream_5978dc880b11e700010ae88b"
                    },
                    "members": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2017-07-26T18:16:40Z"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2017-08-04T16:38:22Z"
                    },
                    "deleted_at": {
                      "type": "string",
                      "example": "2017-08-04T17:02:11Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request DELETE \\\n  --url 'https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896' \\\n  --header 'content-type: application/json'"
            },
            {
              "language": "ruby",
              "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\")\n\nhttp = Net::HTTP.new(url.host, url.port)\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"content-type\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b\"\n\nquerystring = {\"token\":\"6f46db36dd6543d2b82d91698fcd0896\"}\n\npayload = \"\"\nheaders = {'content-type': 'application/json'}\n\nresponse = requests.request(\"DELETE\", url, data=payload, headers=headers, params=querystring)\n\nprint(response.text)"
            },
            {
              "language": "php",
              "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_POSTFIELDS => \"\",\n  CURLOPT_HTTPHEADER => array(\n    \"content-type: application/json\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
            },
            {
              "language": "go",
              "code": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://streams.v2.validic.com/streams/5978dc880b11e700010ae88b?token=6f46db36dd6543d2b82d91698fcd0896\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
            }
          ],
          "samples-languages": [
            "curl",
            "ruby",
            "python",
            "php",
            "go"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}