{"openapi":"3.0.1","info":{"version":"1.39.2","title":"bintu.live","description":"# Info\n© 2026 nanocosmos GmbH. All Rights Reserved.\n\nbintu.live is a stream management platform used by nanoStream for end to end live streaming services.\n\nbintu live can be used to create, manage, group and tag live streams."},"servers":[{"url":"https://bintu.nanostream.cloud","description":"Main server"}],"security":[{"X-BINTU-TOKEN":[]},{"X-BINTU-APIKEY":[]}],"tags":[{"name":"Stream"},{"name":"Stream Options"},{"name":"Tag"},{"name":"API Key"},{"name":"Metric Key"},{"name":"Organisation"},{"name":"User"},{"name":"Invite Token"},{"name":"Transcoding Profiles"},{"name":"User Roles"}],"components":{"securitySchemes":{"X-BINTU-TOKEN":{"type":"apiKey","in":"header","name":"X-BINTU-TOKEN","description":"Unique identifier of an organisation *with time limit*, which gives access rights to perform API calls. E.g. `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9`"},"X-BINTU-APIKEY":{"type":"apiKey","in":"header","name":"X-BINTU-APIKEY","description":"Unique identifier of an organisation *without time limit*, which gives access rights to perform API calls. E.g. `OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d`"},"X-BINTU-PLAYERKEY":{"name":"X-BINTU-PLAYERKEY","type":"apiKey","in":"header","description":"Unique identifier of an organisation *without time limit*, which gives access rights to perform ReadOnly API calls (`public/stream` and `public/stream/count`). E.g. `OERedfdazzb0kMyl7dw1Ir7d`"}},"parameters":{"X-BINTU-PLAYERKEY":{"name":"X-BINTU-PLAYERKEY","in":"header","required":true,"schema":{"type":"string","example":"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d"}},"id":{"name":"id","description":"Unique identifier for the object.","in":"path","required":true,"schema":{"type":"string","example":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14"}},"organisationid":{"name":"organisation","description":"Unique identifier for the object.","in":"path","required":true,"schema":{"type":"string","example":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14"}},"tag":{"name":"tag","description":"Keyword which helps describe an item and allows it to be found.","in":"query","required":true,"schema":{"type":"string","example":"delete_this_tag"}},"tags":{"name":"tags[]","description":"Keywords, which helps describe an item and allows it to be found. *Attention* You can add more tag objects with tags, to add/search for tags which includes all added tags.","in":"query","schema":{"type":"string","example":"foo_tag"}},"tagsRequired":{"name":"tags[]","required":true,"description":"Keywords, which helps describe an item and allows it to be found. *Attention* You can add more tag objects with tags, to add/search for tags which includes all added tags.","in":"query","schema":{"type":"string","example":"foo_tag"}},"limit":{"name":"limit","description":"Limits the tags by the number of the limit.","in":"query","schema":{"type":"integer","example":20}},"state":{"name":"state","description":"State of a stream. Can be created, live or ended.","in":"query","schema":{"type":"string","enum":["created","live","ended"],"example":"live"}},"offset":{"name":"offset","description":"Offset helps to retrieve a subset of records starting with the offset value.","in":"query","schema":{"type":"string","example":"10"}},"quantity":{"name":"quantity","description":"Quantity of the objects shown.","in":"query","schema":{"type":"string","example":"20"}},"from":{"name":"from","description":"Represents the earliest timestamp for any object contained in the query.","in":"query","schema":{"type":"string","example":"2019-08-15T11:03:51.466Z"}},"until":{"name":"until","description":"Represents the latest timestamp for any object contained in the query.","in":"query","schema":{"type":"string","example":"2019-08-25T10:13:31.526Z"}},"to":{"name":"to","description":"Represents the latest timestamp for any object contained in the query.","in":"query","schema":{"type":"string","example":"2019-08-25T10:13:31.526Z"}},"order":{"name":"order","description":"Used to sort the result set in ascending or descending order.","in":"query","schema":{"type":"string","enum":["asc","desc"],"example":"asc"}},"force":{"name":"force","in":"query","required":true,"schema":{"type":"boolean","example":"false"}},"asset_limit":{"name":"asset_limit","description":"Optional setting to restrict the number of previous recordings (VoDs) included in responses.\nUse it to optimize performance by setting it to `1` to just receive the latest one.\n**For stream groups, the limit is applied per stream and multiplied by the number of renditions**.\nFor example, a stream group with `3` streams and a `asset_limit` of `10` would result in a max of `30` VoDs.","in":"query","required":false,"schema":{"type":"string","example":"10"}},"optionName":{"name":"name","description":"Name of the stream option.","in":"query","schema":{"type":"string"},"examples":{"captions":{"value":"captions"},"overlay":{"value":"overlay"},"delay":{"value":"delay"},"chroma_key":{"value":"chroma_key"}}},"optionGroup":{"name":"group","description":"Group of the stream options of one type.","in":"query","schema":{"type":"string"},"examples":{"captions":{"value":"captions-1"},"overlay":{"value":"overlay-1"},"delay":{"value":"delay-1"},"chroma_key":{"value":"chroma_key-1"}}},"optionGroupRequired":{"name":"group","description":"Group of the stream options of one type","in":"query","schema":{"type":"string"},"required":true,"examples":{"captions":{"value":"captions-1"},"overlay":{"value":"overlay-1"},"delay":{"value":"delay-1"},"chroma_key":{"value":"chroma_key-1"}}}},"schemas":{"streamIds":{"description":"`streamIds` Array","type":"object","properties":{"streamIds":{"type":"array","items":{"type":"string"}}},"example":{"streamIds":["9d9dc062-2bdc-4bee-8bef-4c56b9953b14","396f0748-1f1d-4024-8602-3d5818df9158","b852f974-d645-44ea-8667-821a57754b4c"]}},"streamNames":{"description":"`streamNames` Array","type":"object","properties":{"streamNames":{"type":"array","items":{"type":"string"}}},"example":{"streamNames":["S9I9O-u3Bjd","S9I9O-0oUs7","S9I9O-9uzxs"]}},"tag":{"type":"object","description":"Keyword, which helps describe an item and allows it to be found.","properties":{"tag":{"type":"string"}},"example":{"tag":"foo"}},"Single":{"description":"Used for a single stream without transcodes.","properties":{"tags":{"type":"array","description":"Keywords, which helps describe an item and allows it to be found.","items":{"type":"string"},"example":["foo","bar"]},"processing":{"type":"array","description":"Define your target `processing` features for your stream. ","items":{"type":"object","properties":{"id":{"type":"string","description":"Name of the proceesing to setup. **Available values:**\n- `rec`\n- `replay`\n- `thumbs`\n- `motionclip`","required":true},"interval":{"type":"integer","description":"Defines the interval a thumbnail or motionclip is generated/updated. Allowed values between: `10` - `60` **in seconds**.\n\n**Defaults:**\n- **`motionclip`**: `30`\n- **`thumbs`**: `10`","required":false},"duration":{"type":"integer","description":"Defines for how long the stream is recorded. Allowed values between: `1` - `null (infinite)` **in seconds**.\n\n**Defaults:**\n- **`rec`**: `null`\n- **`replay`**: `null`","required":false},"format":{"type":"string","description":"Defines the format for the motionclip.","enum":["gif","mp4"],"default":"gif","required":false}},"example":[{"id":"replay","duration":30},{"id":"thumbs","interval":45},{"id":"rec","duration":null},{"id":"motionclip","duration":5,"interval":30,"format":"gif"}]}}}},"MBR":{"description":"Used for creating an MBR stream. **Optional.**","properties":{"tags":{"type":"array","description":"Keywords, which helps describe an item and allows it to be found.","items":{"type":"string"},"example":["foo","bar"]},"processing":{"type":"array","description":"Define your target `processing` features for your stream. ","items":{"type":"object","properties":{"id":{"type":"string","description":"Name of the proceesing to setup. **Available values:**\n- `rec`\n- `replay`\n- `thumbs`\n- `motionclip`","required":true},"interval":{"type":"integer","description":"Defines the interval a thumbnail or motionclip is generated/updated. Allowed values between: `10` - `60` **in seconds**.\n\n**Defaults:**\n- **`motionclip`**: `30`\n- **`thumbs`**: `10`","required":false},"duration":{"type":"integer","description":"Defines for how long the stream is recorded. Allowed values between: `1` - `null (infinite)` **in seconds**.\n\n**Defaults:**\n- **`rec`**: `null`\n- **`replay`**: `null`","required":false},"format":{"type":"string","description":"Defines the format for the motionclip.","enum":["gif","mp4"],"default":"gif","required":false}},"example":[{"id":"replay","duration":30},{"id":"thumbs","interval":45},{"id":"rec","duration":null},{"id":"motionclip","duration":5,"interval":30,"format":"gif"}]}},"transcodes":{"type":"array","items":{"type":"object","properties":{"profile":{"type":"string","description":"**Required** for transcodes","example":"vtrans-2000x30"},"tags":{"type":"array","description":"**Required** for transcodes","items":{"type":"string"},"example":["foo","bar"]},"processing":{"type":"array","description":"Define your target `processing` features for your stream. ","items":{"type":"object","properties":{"id":{"type":"string","description":"Name of the proceesing to setup. **Available values:**\n- `rec`\n- `replay`\n- `thumbs`\n- `motionclip`","required":true},"interval":{"type":"integer","description":"Defines the interval a thumbnail or motionclip is generated/updated. Allowed values between: `10` - `60` **in seconds**.\n\n**Defaults:**\n- **`motionclip`**: `30`\n- **`thumbs`**: `10`","required":false},"duration":{"type":"integer","description":"Defines for how long the stream is recorded. Allowed values between: `1` - `null (infinite)` **in seconds**.\n\n**Defaults:**\n- **`rec`**: `null`\n- **`replay`**: `null`","required":false}},"example":[{"id":"replay","duration":30},{"id":"thumbs","interval":45},{"id":"rec","duration":null},{"id":"motionclip","duration":5,"interval":30,"format":"gif"}]}}}}}}},"stream":{"type":"object","properties":{"stream":{"type":"string"}},"example":{"stream":"TASIK-MdGUQ"}},"push_url":{"type":"object","properties":{"url":{"type":"string"}},"example":{"url":"rtmp://myurl.de/rtmp/streamname"}},"opcode":{"type":"object","properties":{"opcode":{"type":"string","enum":["thumbs","none"],"description":"Creates a thumbnail for a vod stream every 30s for an overview of the complete vod stream."},"interval":{"type":"integer","description":"Number of seconds between thumbnails refresh (default value 30)"}},"example":{"opcode":"thumbs","interval":45}},"processing":{"type":"object","properties":{"processing":{"type":"array","description":"Define your target `processing` features for your stream. ","items":{"type":"object","properties":{"id":{"type":"string","description":"Name of the proceesing to setup. **Available values:**\n- `rec`\n- `replay`\n- `thumbs`\n- `motionclip`","required":true},"interval":{"type":"integer","description":"Defines the interval a thumbnail or motionclip is generated/updated. Allowed values between: `10` - `60` **in seconds**.\n\n**Defaults:**\n- **`motionclip`**: `30`\n- **`thumbs`**: `10`","required":false},"duration":{"type":"integer","description":"Defines for how long the stream is recorded. Allowed values between: `1` - `null (infinite)` **in seconds**.\n\n**Defaults:**\n- **`rec`**: `null`\n- **`replay`**: `null`","required":false},"format":{"type":"string","description":"Defines the format for the motionclip.","enum":["gif","mp4"],"default":"gif","required":false}}}}},"example":{"processing":[{"id":"replay","duration":30},{"id":"thumbs","interval":45},{"id":"rec","duration":null},{"id":"motionclip","duration":5,"interval":30,"format":"gif"}]}},"timecode":{"type":"object","properties":{"timecode":{"type":"boolean"},"interval":{"type":"integer","description":"Timecode values between: `500ms - 1h (3_600_600ms)`"}},"example":{"timecode":true,"interval":3600000}},"transcoding_profile":{"type":"object","properties":{"transcoding_profile":{"type":"string"}},"example":{"transcoding_profile":"vtrans-800k"}},"apikey":{"type":"object","properties":{"apikey":{"type":"string"}},"example":{"apikey":"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d"}},"webhook":{"type":"object","properties":{"webhook":{"type":"integer"}},"example":{"webhook":null}},"vod":{"type":"object","properties":{"vod":{"type":"string"}},"example":{"vod":"scTA6-vlaYD"}},"userId":{"description":"Unique identifier for the user.","type":"string","example":{"userId":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14"}},"User":{"type":"object","properties":{"email":{"type":"string","example":"example@nanocosmos.de"},"password":{"type":"string","example":"password"},"organisation":{"type":"string","example":"nanocosmos"}}},"UserValidate":{"type":"object","properties":{"email":{"type":"string","example":"example@nanocosmos.de"},"password":{"type":"string","example":"password"}}},"EmailPasswordToken":{"type":"object","properties":{"email":{"type":"string","example":"example@nanocosmos.de"},"password":{"type":"string","example":"password"},"token":{"type":"string","example":"iIsInR5c"}}},"InviteTokenCreate":{"type":"object","properties":{"role":{"type":"string","description":"The role has to be one of the following: `nanoAdmin`, `nanoUser`, `nanoReadOnly`. This property is optional. If omitted it will fallback to the default `nanoUser`.","example":"nanoReadOnly"}}},"CaptionsOptions":{"type":"object","required":["engine"],"description":"List of options set on the stream group for Live Captioning.\n","properties":{"engine":{"description":"Engine that is used for Live Captioning","type":"string","enum":["deepgram"]},"sourceLanguage":{"description":"The language that is spoken in the stream. If not set defaults to English.","type":"string","default":"en"},"targetLanguages":{"description":"A comma-separated list of language codes for transcription or translation. If not set defaults to English.","type":"string","example":"en,de","default":"en"}}},"OverlayOptions":{"type":"object","description":"List of options set on the stream group for overlay processing option.\n","properties":{"delay":{"description":"The delay that should be applied to the streamgroup where the overlay is applied. Can be set to values from 0 to 60 seconds\n","type":"number","minimum":0,"maximum":60,"default":0,"example":15},"watermark":{"description":"The name of the image that was uploaded to use as a watermark that is applied over the stream. If not specified, the default will be used if it is set up. Just the name should be set, without the extension. Example if the file uploaded is my_watermark.png, the watermark= \"my_watermark\"\n","type":"string","example":"my_watermark","default":"default"},"profile":{"description":"A transcoding profile. The list of the transcoding profiles can be acquired by using get /transcoding_profiles endpoint. Only the bitrate and fps will be extracted from the profile to use on the overlay. Ex. if you set transcoding profile to \"vtrans2-1280x720x1200x25\" then the bitrate of 1200 and fps of 25 will be applied for the passthrough of the overlaid streamgroup.\nThis parameter is optional and if not specified the default values will be applied (bitrate:1000, fps: 25)\n","type":"string","example":"vtrans2-1280x720x1200x25"}}},"DelayOptions":{"description":"List of options set on the stream group for delay processing option.\n","type":"object","required":["delay"],"properties":{"delay":{"description":"The delay that should be applied to the streamgroup. Can be set to values from 0 to 60 seconds\n","type":"number","minimum":0,"maximum":60,"example":15}}},"ChromaKeyTarget":{"type":"object","required":["streamId","background"],"description":"A target stream that receives the keyed stream composited over its own background.\n","properties":{"streamId":{"description":"ID of the target stream. Must be the UUID of an existing stream (the stream itself, not one of its transcoded renditions), unique within `targets`, and not the ID of the ingest stream.\n","type":"string","format":"uuid","example":"12345678-1234-1234-1234-123456789013"},"background":{"description":"Background placed behind the presenter. Either the file name of an uploaded MP4, PNG or JPG, with extension (uploaded in Backgrounds in the Chroma Setup Tuner, https://chromakey.nanocosmos.net/chroma-setup-tuner.html), or the stream name or stream ID of another live stream. Use the same resolution as your camera (1280x720 or 1920x1080). MP4s should be H.264 at 3-5 Mbps and no more than 8 Mbps.","type":"string","example":"my_background.mp4"},"foreground":{"description":"Optional overlay PNG (usually a transparent logo) placed on top of the keyed picture. Uploaded in Backgrounds in the Chroma Setup Tuner (https://chromakey.nanocosmos.net/chroma-setup-tuner.html).","type":"string","example":"logo.png"},"foreground_position":{"description":"Overlay position in pixels from the top-left corner, as `x=10:y=10`.","type":"string","example":"x=10:y=10"},"foreground_size":{"description":"Overlay size in pixels, as `width:height`, e.g. `200:100`.","type":"string","example":"200:100"}}},"ChromaKeyOptions":{"type":"object","required":["targets"],"description":"List of options set on the stream for the chroma key option.\n","properties":{"targets":{"description":"The target streams that will receive the keyed stream. At least 1 target is required, up to 20 targets are supported.\n","type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/ChromaKeyTarget"}},"filter":{"description":"Keying filter: `chromakey` (RGB key color) or `hsvkey` (HSV key color).\n","type":"string","enum":["chromakey","hsvkey"]},"color":{"description":"Key color. For `chromakey` use `#RRGGBB`, e.g. `#00ff00`. For `hsvkey` use `h:s:v`, e.g. `120:1:1`.\n","type":"string","example":"#00ff00"},"similarity":{"description":"How much of the color range around the key color is removed. 0-1. Too low leaves patches of screen; too high cuts holes in the presenter.","type":"number","minimum":0,"maximum":1,"example":0.3},"blend":{"description":"How softly the edge fades between presenter and background. 0-1.","type":"number","minimum":0,"maximum":1,"example":0.1},"bitrate":{"description":"Bitrate applied to all target streams.","type":"number","example":2000},"despill":{"description":"Removes the green or blue tint the screen reflects onto the presenter. `key=value:key=value`. All values are numbers, except `enable` (`0` or `1`).\nKeys: `type` (0 = green, 1 = blue), `mix`, `expand`, `red`, `green`, `blue`, `brightness`, `alpha`, `enable`.\n","type":"string","example":"type=0:mix=0.5:enable=1"},"eq":{"description":"Adjusts the presenter's picture after keying to match the background. `key=value:key=value`.\nKeys and ranges: `brightness` (-1 - 1), `contrast` (-1000 - 1000), `saturation` (0 - 3), `gamma` (0.1 - 10), `gamma_r` (0.1 - 10), `gamma_g` (0.1 - 10), `gamma_b` (0.1 - 10), `gamma_weight` (0 - 1), `eval` (`init` or `frame`), `enable` (`0` or `1`).\n","type":"string","example":"brightness=0.04:contrast=1.25"},"stages":{"description":"Up to 9 additional ffmpeg video filters. Each item is an ffmpeg filter string, e.g. `hue=s=1.2` (change saturation) or `unsharp=3:3:0.5` (sharpen).\n","type":"array","maxItems":9,"items":{"type":"string"},"example":["hue=s=1.2","unsharp=3:3:0.5"]}}},"ChromaKeyOptionsResponse":{"type":"object","properties":{"targets":{"type":"array","items":{"$ref":"#/components/schemas/ChromaKeyTarget"}},"filter":{"type":"string"},"color":{"type":"string"},"similarity":{"type":"number"},"blend":{"type":"number"},"bitrate":{"type":"number"},"despill":{"type":"string"},"eq":{"type":"string"},"stages":{"type":"array","items":{"type":"string"}}}},"CaptionsOptionsResponse":{"type":"object","properties":{"engine":{"type":"string","enum":["deepgram"]},"sourceLanguage":{"type":"string","default":"en"},"targetLanguages":{"type":"string","default":"en"}}},"OverlayOptionsResponse":{"type":"object","properties":{"delay":{"type":"number"},"watermark":{"type":"string"},"profile":{"type":"string"}}},"DelayOptionsResponse":{"type":"object","properties":{"delay":{"type":"number"}}},"ParameterRequiredError":{"description":"Parameter Required","example":{"error":{"message":"Parameter required","userinfo":{"required_parameter":"parameter"},"code":1002}}},"ParameterNotUniqueError":{"description":"Parameter not unique","example":{"error":{"message":"Parameter not unique","userinfo":{"required_parameter":"parameter"},"code":1003}}},"WrongDataTypeError":{"description":"Wrong Data Type","example":{"error":{"message":"Wrong Data Type","userinfo":{"required_parameter":"parameter","required_type":"type"},"code":1004}}},"InvalidValueError":{"description":"Invalid Value","example":{"error":{"message":"Invalid Value","userinfo":{"required_parameter":"parameter","required_value":"value"},"code":1005}}},"TooManyParametersError":{"description":"Too Many Parameters","example":{"error":{"message":"Too Many Parameters","userinfo":{"required_parameter":"parameter"},"code":1006}}},"TooManyTranscodingProfilesError":{"description":"too many / too few transcodes","example":{"error":{"message":"too many / too few transcodes","userinfo":{"min":"min","max":"max"},"code":16002}}},"TranscodingProfilesWithSameBitrateError":{"description":"you have choosen a profile with the same bitrate twice","example":{"error":{"message":"you have choosen a profile with the same bitrate twice","userinfo":{"bitrate":"bitrate"},"code":16003}}},"TranscodingProfilenameNotFoundError":{"description":"TranscodingProfile not found","example":{"error":{"message":"TranscodingProfile not found","userinfo":{"name":"name"},"code":20005}}},"JWTErrorResponse":{"description":"JWT error occured","example":{"error":{"message":"JWT error occured","userinfo":{"message":"error.message,","errorCode":"error.errorCode"},"code":17001}}},"JWTServiceNotReachableError":{"description":"JWT service not reachable","example":{"error":{"message":"JWT service not reachable","userinfo":{"message":"JWT service not reachable,","errorCode":400},"code":17002}}},"TagAlreadyExistsError":{"description":"Tag already exists for your organisation","example":{"error":{"message":"Tag already exists for your organisation","userinfo":{"tag":"tag","organisation":"foo-bar"},"code":10003}}},"TagAttachedToStreamError":{"description":"You are trying to delete an tag that´s still attached to some streams.","example":{"error":{"message":"You are trying to delete an tag that´s still attached to some streams.","userinfo":{"tag":"tag","streams":["98da24a4-4a45-4976-8968-47984664a906","79ccebc1-64cb-4202-848c-17facab55641","1298abc4-e4dd-4d26-9683-758adef4f6e"]},"code":10005}}},"TagTooLongError":{"description":"Tag too long, max size is 255 caracters.","example":{"error":{"message":"Tag too long, max size is 255 caracters.","userinfo":{"tag":"tag"},"code":10002}}},"StreamTypeNotAvailableError":{"description":"Stream Type is not available","example":{"error":{"message":"Stream Type is not available","userinfo":{"stream_type":"type"},"code":3002}}},"StreamOptionNotAvailableError":{"description":"Stream Option is not available for this organisation","example":{"error":{"message":"Stream Option is not available for this organisation","userinfo":{"option":"option"},"code":3003}}},"WrongStreamProtocol":{"description":"Protocol must be RTMP","example":{"error":{"message":"Protocol must be RTMP","userinfo":{"protocol":"protocol"},"code":3004}}},"FeatureNotEnabledError":{"example":{"error":{"message":"This feature is not enabled for your organisation","userinfo":{"password_token":"token"},"code":1009}}},"RtmpIngestServerDoesNotAcceptTheRequestError":{"example":{"error":{"message":"RTMP Ingest Point rejected the request","userinfo":{"stream_name":"streamname"},"code":9004}}},"RtmpIngestLockedError":{"example":{"error":{"message":"RTMP Ingest denied. The stream is locked! Unlock the stream or contact sales if the stream was locked by an admin.","userinfo":{"state":"state"},"code":9005}}},"StreamOptionNameNotSupportedError":{"example":{"error":{"message":"Stream option name is not supported","code":3021,"userinfo":{"name":"chromakey"}}}},"StreamOptionTypeNotSupportedError":{"example":{"error":{"message":"Stream option type is not supported","code":3022,"userinfo":{"type":"object"}}}},"LiveCaptionsBadRequestError":{"example":{"error":{"message":"Missing required properties.","code":23000,"userinfo":{"props":["engine"]}}}},"LiveCaptionsEngineNotSupported":{"example":{"error":{"message":"Engine ${engine} not supported.","code":23003,"userinfo":{"streamgroupId":"12345678-1234-1234-1234-123456789012"}}}},"LiveCaptionsSourceTargetLanguageConflict":{"example":{"error":{"message":"Translation cannot be configured when the target language matches the source language or its localized variant. To ensure stable and accurate output, please select a different target language.","code":23014,"userinfo":{"streamgroupId":"12345678-1234-1234-1234-123456789012","sourceLanguage":"es","targetLanguage":"es-419"}}}},"StreamOptionKeyNotSupported":{"example":{"error":{"message":"Stream option color not supported","code":3026,"userinfo":{"key":"color"}}}},"UserCredentialsNotValidError":{"description":"User Credentials are not valid","example":{"error":{"message":"User credentials are not valid","userinfo":{"user":"username"},"code":4002}}},"AccessDeniedError":{"example":{"error":{"message":"Access denied","code":2001,"userinfo":{"identifier":"identifier","request":"request"}}}},"StreamCustomNameAlreadyExistsError":{"example":{"error":{"message":"Custom streamname already exists","userinfo":{"stream":"streamname"},"code":3006}}},"StreamSelfReferenceError":{"example":{"error":{"message":"Self referencing a stream in pushUrl is not allowed","userinfo":{"stream":"streamname"},"code":3007}}},"OrganisationIsNotEnabledError":{"example":{"error":{"message":"Organisation is not enabled","userinfo":{"organisation":"oragnisationID"},"code":6002}}},"WebhookRejectedError":{"example":{"error":{"message":"Webhook was rejected","userinfo":{"webhook":"webhookUrl"},"code":6003}}},"DeleteLastUserError":{"example":{"error":{"message":"An organisation needs at least 1 active user","userinfo":{"property":"prop","value":"value"}},"code":4004}},"SingletonOpcodeUsedTwiceError":{"example":{"error":{"message":"Opcode can only be used once per stream","userinfo":{"opcode":"opcode"}},"code":3009}},"UrlInOrganisationName":{"example":{"error":{"message":"An organisation name cannot contain an URL","userinfo":{"organisation":"organisation"}},"code":4005}},"LastAdminUserError":{"example":{"error":{"message":"An organisation needs at least 1 active administrator","userinfo":{"user":"userId"}},"code":4006}},"NotPassthroughError":{"example":{"error":{"message":"The provided identifier is not a passthrough"},"code":3013}},"RemovingATranscodeDuringLiveStateIsNotAllowedError":{"example":{"error":{"message":"You can't delete a transcode as long as the stream is live"},"code":3014}},"LiveCaptioningNotEnabled":{"example":{"error":{"message":"Live captioning is not enabled for your organisation","code":23007,"userinfo":{"organisation":"12345678-1234-1234-1234-123456789012"}}}},"StreamGroupIsASubGroup":{"example":{"error":{"message":"Adding stream options directly to the subgroup is not supported. Use the main group of the processing options.","code":24000,"userinfo":{"streamgroupId":"12345678-1234-1234-1234-123456789012"}}}},"DelayIsOutsideAllowedLimits":{"example":{"error":{"message":"The delay 65s is outside of allowed limits. The delay can be set 0s-60s.","code":24001}}},"TargetStreamIdCantBeTheSameAsMainStreamId":{"example":{"error":{"message":"Using main stream id as target is not supported.","code":25000,"userinfo":{"streamId":"12345678-1234-1234-1234-123456789012","mainStreamId":"12345678-1234-1234-1234-123456789012"}}}},"StreamIdMustBeStreamGroupId":{"example":{"error":{"message":"The target stream id must be a streamgroup id, not a transcode id.","code":25001,"userinfo":{"streamId":"12345678-1234-1234-1234-123456789014","streamgroupId":"12345678-1234-1234-1234-123456789013"}}}},"NumberOfTargetsIsOutsideAllowedLimits":{"example":{"error":{"message":"The number of targets(21) is outside allowed limits. We support setting up to 20 targets.","code":25002,"userinfo":{"streamgroupId":"12345678-1234-1234-1234-123456789012"}}}},"StreamIdsMustBeUnique":{"example":{"error":{"message":"The streamIds used for targets must be unique.","code":25003,"userinfo":{"streamgroupId":"12345678-1234-1234-1234-123456789012","streamIds":["12345678-1234-1234-1234-123456789013","12345678-1234-1234-1234-123456789013"]}}}},"ColorOptionisNotValidHexColor":{"example":{"error":{"message":"The color","code":25004,"userinfo":{"color":"#00ff0","streamgroupId":"12345678-1234-1234-1234-123456789012"}}}},"ColorOptionisNotValidHSVColor":{"example":{"error":{"message":"The color green is not valid hsv color. The hue, saturation and value must be specified in numbers as h:s:v.","code":25004,"userinfo":{"color":"green","streamgroupId":"12345678-1234-1234-1234-123456789012"}}}},"FilterNotSupported":{"example":{"error":{"message":"The filter colorkey is not supported.","code":25005,"userinfo":{"streamgroupId":"12345678-1234-1234-1234-123456789012"}}}},"StreamOptionsMissingRequiredError":{"example":{"error":{"message":"Missing required properties.","code":3027,"userinfo":{"props":["targets"]}}}},"PropertyIsOutsideAllowedLimits":{"example":{"error":{"message":"The blend 2 is outside of allowed limits. The prop can be set 0-1.","code":3028}}},"StreamIdMustBeValidUuid":{"example":{"error":{"message":"StreamId 'abc123' is not a valid uuid.","code":3029}}},"ApiKeyNotFoundError":{"example":{"error":{"message":"Api Key not found","code":7001,"userinfo":{"apikey":"WEDONTLOGYOURAPIKEY"}}}},"StreamNotFoundError":{"example":{"error":{"message":"Stream not found","userinfo":{"stream_name":"foo-bar"},"code":3001}}},"TagNotFoundError":{"example":{"error":{"message":"Tag not found","userinfo":{"tag":"tag","organisation":"foo-bar"},"code":10001}}},"MetricKeyNotFoundError":{"example":{"error":{"message":"Metric Key not found","userinfo":{"metrickKey":"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7"},"code":15001}}},"OrganisationNotFoundError":{"example":{"error":{"message":"Organisation not found","userinfo":{"organisation":"organisationid"},"code":6001}}},"WebhookUnreachableError":{"example":{"error":{"message":"Webhook is unreachable","userinfo":{"webhook":"webhookUrl"},"code":6004}}},"UserNotFoundError":{"example":{"error":{"message":"User not found","userinfo":{"user":"userid"},"code":4001}}},"InviteTokenNotFoundError":{"example":{"error":{"message":"Invite Token not found","userinfo":{"invite_token":"token"},"code":5001}}},"TranscodingProfileNotFoundError":{"example":{"error":{"message":"TranscodingProfile not found","userinfo":{"id":"id"},"code":20001}}},"StreamgroupNotFoundError":{"example":{"error":{"message":"Streamgroup not found","userinfo":{"id":"id"},"code":30001}}},"PasswordTokenNotFound":{"example":{"error":{"message":"Password Token not found","userinfo":{"password_token":"token"},"code":12001}}},"DataNotFoundForCreationError":{"example":{"error":{"message":"Data not found for creating","userinfo":{"data":"data"},"code":1008}}},"HlsPlayoutNotFoundError":{"example":{"error":{"message":"HLS Playout not found","userinfo":{"hls_playout_id":"id"},"code":8001}}},"RtmpIngestNotFoundError":{"example":{"error":{"message":"RTMP Ingest not fround","userinfo":{"rtmp_ingest_id":"id"},"code":9001}}},"RtmpIngestForStreamNotFoundError":{"example":{"error":{"message":"RTMP Ingest for Stream not found","userinfo":{"stream_name":"id"},"code":9002}}},"VodNotFound":{"example":{"error":{"message":"VOD not found","userinfo":{"vod":"vod"},"code":18002}}},"s3DeleteObjectError":{"example":{"error":{"message":"S3 delete object error","userinfo":{"message":"error.message","errorCode":"error.errorCode"},"code":18002}}},"s3GetObjectError":{"example":{"error":{"message":"S3 get object error","userinfo":{"message":"error.message","errorCode":"error.errorCode"},"code":18003}}},"PermissionNotFoundError":{"example":{"error":{"message":"Permission not found","userinfo":{"id":"id"},"code":2003}}},"StreamOptionGroupNotFoundError":{"example":{"error":{"message":"Stream option with option group not found","userinfo":{"optionGroup":"optionGroup"},"code":3023}}},"VTransProfileNotFoundError":{"example":{"error":{"message":"VTransProfile not found","userinfo":{"id":"id"},"code":18001}}},"TranscodingProfileChangingNotAllowed":{"example":{"error":{"message":"Changing transcoding profile not allowed, not a vtrans pushUrl","userinfo":{"pushUrl":"pushUrl"},"code":20007}}},"ResolveHostnameError":{"example":{"error":{"message":"Couldnt resolve hostname","userinfo":{"hostname":"hostname"},"code":3008}}},"InviteTokenAlreadyRedeemedError":{"example":{"error":{"message":"Invite Token is already redeemed","userinfo":{"invite_token":"token"},"code":5002}}},"PasswordTokenExpiredError":{"example":{"error":{"message":"Password Token is expired","userinfo":{"password_token":"token"},"code":12002}}},"PasswordTokenAlreadyRedeemedError":{"example":{"error":{"message":"Password Token is already redeemed","userinfo":{"password_token":"token"},"code":12003}}},"StreamOptionsAlreadyExistsForStreamgroup":{"example":{"error":{"message":"Stream options ${optionName} already exists for this streamgroup","userinfo":{"optionName":"optionName","streamgroupId":"streamgroupId"},"code":3024}}},"ExpiredInviteTokenError":{"example":{"error":{"message":"Invite Token is expired","userinfo":{"invite_token":"token"},"code":5003}}}}},"paths":{"/stream/{id}":{"get":{"tags":["Stream"],"summary":"Stream Info","description":"Includes all the necessary information of a stream with the specified `id`.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Stream Info","parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/asset_limit"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","state":"created","type":"low-latency","tags":["foo","bar"],"ingest":{"rtmp":{"url":"rtmp://ws2.nanocosmos.de/live","streamname":"bH2k9-tx1HS"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"bH2k9-tx1HS"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"rtmp":[{"url":"rtmp://ws2.nanocosmos.de/live","streamname":"bH2k9-tx1HS","type":"live"}],"hls":[{"url":"http://ws2.nanocosmos.de/live/bH2k9-tx1HS/playlist.m3u8","type":"live"}],"web":[{"url":"https://bintu.nanostream.cloud/playout/9d9dc062-2bdc-4bee-8bef-4c56b9953b14","type":"live"}],"thumbnails":[{"url":"https://bintuvod.nanocosmos.de:443/vod/thumbnails/bH2k9-tx1HS.jpg","type":"image"}]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D\");\n\nreq.query({\n  \"asset_limit\": \"10\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'asset_limit' => '10'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/stream/%7Bid%7D?asset_limit=10\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D\"\n\nquerystring = {\"asset_limit\":\"10\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D?asset_limit=10\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"delete":{"tags":["Stream"],"summary":"Delete Stream","description":"Ability to delete an existing stream in your organisation with the specified `id`. **Attention:** Access to this route is restricted to organisation administrators, requiring an API key or JWT token with `nanoAdmin` permissions.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Delete Stream","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"message":"Stream deleted successfully"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/RtmpIngestServerDoesNotAcceptTheRequestError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/VodNotFound"},{"$ref":"#/components/schemas/s3DeleteObjectError"},{"$ref":"#/components/schemas/HlsPlayoutNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestForStreamNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/%7Bid%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.delete(\"https://bintu.nanostream.cloud/stream/%7Bid%7D\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"DELETE\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"DELETE\", \"/stream/%7Bid%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"DELETE\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D\");\nvar request = new RestRequest(Method.DELETE);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Delete,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/stop":{"put":{"tags":["Stream"],"summary":"Stop Stream","description":"Ability to stop the ingest of a stream with the specified `id` in the organisation, to prevent accidental reconnects to the stream. Please keep in mind that the state will be changed to **locked**. **Attention:** Access to this route is restricted to organisation administrators, requiring an API key or JWT token with `nanoAdmin` permissions.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Stop Stream","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"OK","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestForStreamNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/stop \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/stop');\n$request->setRequestMethod('PUT');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/stop\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"PUT\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/stop\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/group":{"get":{"tags":["Stream"],"summary":"Streamgroup Info","description":"Ability to get the streamgroup from a specific stream with id.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Streamgroup","parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/asset_limit"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"2be089fc-94ba-4e8d-9066-e1d1559ba5f7","streamgroup":"2be089fc-94ba-4e8d-9066-e1d1559ba5f7","state":"created","type":"low-latency","created_at":"2022-04-26T11:42:02.119Z","timecode":false,"timecode_interval":1000,"webrtc":false,"transcoding":false,"pushUrl":"rtmp://127.0.0.1/vtrans-2000x30/CeQ2q-pYSH1","rtmpPlayoutCount":0,"tags":["hallo"],"ingest":{"rtmp":{"url":"rtmp://bintu-stream.nanocosmos.de/live","streamname":"CeQ2q-Z4Ns2"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"CeQ2q-Z4Ns2"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"rtmp":[{"url":"rtmp://bintu-play.nanocosmos.de/play","streamname":"CeQ2q-Z4Ns2","type":"live","id":"2be089fc-94ba-4e8d-9066-e1d1559ba5f7","index":0},{"url":"rtmp://bintu-play.nanocosmos.de/play","streamname":"CeQ2q-pYSH1","type":"live","info":{"bitrate":800,"fps":0,"width":"0,","height":0},"id":"76429040-b5ce-4f9a-a0d1-b9cc4412fb6c","pushUrl":null,"tags":[],"index":1},{"url":"rtmp://bintu-play.nanocosmos.de/play","streamname":"CeQ2q-GYGk8","type":"live","info":{"bitrate":400,"fps":25,"width":640,"height":360},"id":"8ebf871c-08d6-4d14-8bfc-7958fd3b8fb6","pushUrl":null,"tags":[],"index":2}],"web":[{"url":"https://bintu.nanostream.cloud/playout/2be089fc-94ba-4e8d-9066-e1d1559ba5f7","type":"live","id":"2be089fc-94ba-4e8d-9066-e1d1559ba5f7","index":0},{"url":"https://bintu.nanostream.cloud/playout/f5dadce0-5941-4728-8626-bdf5d2c065c3","type":"live","info":{"bitrate":800,"fps":0,"width":0,"height":0},"id":"2be089fc-94ba-4e8d-9066-e1d1559ba5f7","pushUrl":null,"tags":[],"index":1},{"url":"https://bintu.nanostream.cloud/playout/8ebf871c-08d6-4d14-8bfc-7958fd3b8fb6","type":"live","info":{"bitrate":400,"fps":25,"width":640,"height":360},"id":"8ebf871c-08d6-4d14-8bfc-7958fd3b8fb6","pushUrl":"null,","tags":[],"index":2}],"hls":[{"url":"https://bintu-play.nanocosmos.de/hls/CeQ2q-Z4Ns2/index.m3u8","type":"live","id":"2be089fc-94ba-4e8d-9066-e1d1559ba5f7","index":0},{"url":"https://bintu-play.nanocosmos.de/hls/CeQ2q-pYSH1/index.m3u8","type":"live","info":{"bitrate":800,"fps":0,"width":0,"height":0},"id":"76429040-b5ce-4f9a-a0d1-b9cc4412fb6c","pushUrl":null,"tags":[],"index":1},{"url":"https://bintu-play.nanocosmos.de/hls/CeQ2q-GYGk8/index.m3u8","type":"live","info":{"bitrate":400,"fps":25,"width":640,"height":360},"id":"8ebf871c-08d6-4d14-8bfc-7958fd3b8fb6","pushUrl":"null,","tags":[],"index":2}],"thumbnails":[{"url":"https://bintuvod.nanocosmos.de:443/vod/thumbnails/CeQ2q-Z4Ns2.jpg","type":"image"}]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/StreamgroupNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/group\");\n\nreq.query({\n  \"asset_limit\": \"10\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/group');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'asset_limit' => '10'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/stream/%7Bid%7D/group?asset_limit=10\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/group\"\n\nquerystring = {\"asset_limit\":\"10\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/group?asset_limit=10\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream":{"get":{"tags":["Stream"],"summary":"Stream Collection Info","description":"Ability to list `50` stream objects as default. It is possible to change the maximum list length by using the query parameter `quantity`.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Stream Collection Info","parameters":[{"$ref":"#/components/parameters/tags"},{"$ref":"#/components/parameters/state"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/quantity"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/until"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","state":"live","type":"low-latency","created_at":"2016-04-13T21:02:35.686Z","tags":["foo"],"ingest":{"rtmp":{"url":"rtmp://bintu-stream.nanocosmos.de/live","streamname":"7HsDi-rQ6fw"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"7HsDi-rQ6fw"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"rtmp":[{"url":"rtmp://bintu-stream.nanocosmos.de/live","streamname":"7HsDi-rQ6fw","type":"live"}],"hls":[{"url":"http://bintu-stream.nanocosmos.de/live/7HsDi-rQ6fw/playlist.m3u8","type":"live"}],"web":[{"url":"https://bintu.nanostream.cloud/playout/c9ce0948-d99f-49ef-b97d-344cb9bb9929","type":"live"}]}},{"id":"52979kb9-fce0-4090-b51e-20df423cfbb7","state":"live","type":"low-latency","created_at":"2016-04-05T18:27:06.251Z","tags":["foo"],"ingest":{"rtmp":{"url":"rtmp://bintu-stream.nanocosmos.de/live","streamname":"7HsDi-rQ6fw"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"7HsDi-rQ6fw"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"rtmp":[{"url":"rtmp://bintu-stream.nanocosmos.de/live","streamname":"7HsDi-rQ6fw","type":"live"}],"hls":[{"url":"http://bintu-stream.nanocosmos.de/live/7HsDi-rQ6fw/playlist.m3u8","type":"live"}],"web":[{"url":"https://bintu.nanostream.cloud/playout/52979kb9-fce0-4090-b51e-20df423cfbb7","type":"live"}],"thumbnails":[{"url":"https://bintuvod.nanocosmos.de:443/vod/thumbnails/7HsDi-rQ6fw.jpg","type":"image"}]}}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/stream\");\n\nreq.query({\n  \"tags[]\": \"foo_tag\",\n  \"state\": \"live\",\n  \"offset\": \"10\",\n  \"quantity\": \"20\",\n  \"from\": \"2019-08-15T11:03:51.466Z\",\n  \"until\": \"2019-08-25T10:13:31.526Z\",\n  \"order\": \"asc\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'tags[]' => 'foo_tag',\n  'state' => 'live',\n  'offset' => '10',\n  'quantity' => '20',\n  'from' => '2019-08-15T11:03:51.466Z',\n  'until' => '2019-08-25T10:13:31.526Z',\n  'order' => 'asc'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream\"\n\nquerystring = {\"tags[]\":\"foo_tag\",\"state\":\"live\",\"offset\":\"10\",\"quantity\":\"20\",\"from\":\"2019-08-15T11:03:51.466Z\",\"until\":\"2019-08-25T10:13:31.526Z\",\"order\":\"asc\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream?tags%5B%5D=foo_tag&state=live&offset=10&quantity=20&from=2019-08-15T11%3A03%3A51.466Z&until=2019-08-25T10%3A13%3A31.526Z&order=asc\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"post":{"tags":["Stream"],"summary":"Create Stream","description":"\nAbility to create a stream with two different options:\n\n* create a single stream\n\n* create an MBR (Multi-BitRate) Stream. An MBR stream is transcoded into different quality streams to enable watching Ultra Low Latency streams\nwith a bad bandwidth.\n\n> To create an MBR stream, it is **required** to use the\n`transcodes` property.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |","operationId":"Create Stream","requestBody":{"content":{"application/json":{"schema":{"type":"object","oneOf":[{"$ref":"#/components/schemas/Single"},{"$ref":"#/components/schemas/MBR"}]}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"95088b6a-a96e-45a1-9552-8647942a67fb","state":"created","type":"low-latency","tags":["foo","bar"],"ingest":{"rtmp":{"url":"rtmp://ws2.nanocosmos.de/live","streamname":"7HsDi-rQ6fw"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"7HsDi-rQ6fw"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"rtmp":[{"url":"rtmp://ws2.nanocosmos.de/live","streamname":"7HsDi-rQ6fw","type":"live"}],"hls":[{"url":"http://ws2.nanocosmos.de/live/7HsDi-rQ6fw/playlist.m3u8","type":"live"}],"web":[],"thumbnails":[{"url":"https://bintuvod.nanocosmos.de:443/vod/thumbnails/7HsDi-rQ6fw.jpg","type":"image"}]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidValueError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/TooManyParametersError"},{"$ref":"#/components/schemas/StreamTypeNotAvailableError"},{"$ref":"#/components/schemas/StreamOptionNotAvailableError"},{"$ref":"#/components/schemas/TooManyTranscodingProfilesError"},{"$ref":"#/components/schemas/TranscodingProfilesWithSameBitrateError"},{"$ref":"#/components/schemas/TranscodingProfilenameNotFoundError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamCustomNameAlreadyExistsError"},{"$ref":"#/components/schemas/AccessDeniedError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/stream \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"tags\":[\"foo\",\"bar\"],\"processing\":[[{\"id\":\"replay\",\"duration\":30},{\"id\":\"thumbs\",\"interval\":45},{\"id\":\"rec\",\"duration\":null},{\"id\":\"motionclip\",\"duration\":5,\"interval\":30,\"format\":\"gif\"}]]}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream\"\n\n\tpayload := strings.NewReader(\"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/stream\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"tags\": [\n    \"foo\",\n    \"bar\"\n  ],\n  \"processing\": [\n    [\n      {\n        \"id\": \"replay\",\n        \"duration\": 30\n      },\n      {\n        \"id\": \"thumbs\",\n        \"interval\": 45\n      },\n      {\n        \"id\": \"rec\",\n        \"duration\": null\n      },\n      {\n        \"id\": \"motionclip\",\n        \"duration\": 5,\n        \"interval\": 30,\n        \"format\": \"gif\"\n      }\n    ]\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/stream\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/stream\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"tags\": [\n    \"foo\",\n    \"bar\"\n  ],\n  \"processing\": [\n    [\n      {\n        \"id\": \"replay\",\n        \"duration\": 30\n      },\n      {\n        \"id\": \"thumbs\",\n        \"interval\": 45\n      },\n      {\n        \"id\": \"rec\",\n        \"duration\": null\n      },\n      {\n        \"id\": \"motionclip\",\n        \"duration\": 5,\n        \"interval\": 30,\n        \"format\": \"gif\"\n      }\n    ]\n  ]\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"tags\":[\"foo\",\"bar\"],\"processing\":[[{\"id\":\"replay\",\"duration\":30},{\"id\":\"thumbs\",\"interval\":45},{\"id\":\"rec\",\"duration\":null},{\"id\":\"motionclip\",\"duration\":5,\"interval\":30,\"format\":\"gif\"}]]}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/stream\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream\"\n\npayload = {\n    \"tags\": [\"foo\", \"bar\"],\n    \"processing\": [[\n            {\n                \"id\": \"replay\",\n                \"duration\": 30\n            },\n            {\n                \"id\": \"thumbs\",\n                \"interval\": 45\n            },\n            {\n                \"id\": \"rec\",\n                \"duration\": None\n            },\n            {\n                \"id\": \"motionclip\",\n                \"duration\": 5,\n                \"interval\": 30,\n                \"format\": \"gif\"\n            }\n        ]]\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"tags\": [\"foo\", \"bar\"],\n  \"processing\": [[\n      [\n        \"id\": \"replay\",\n        \"duration\": 30\n      ],\n      [\n        \"id\": \"thumbs\",\n        \"interval\": 45\n      ],\n      [\n        \"id\": \"rec\",\n        \"duration\": \n      ],\n      [\n        \"id\": \"motionclip\",\n        \"duration\": 5,\n        \"interval\": 30,\n        \"format\": \"gif\"\n      ]\n    ]]\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"delete":{"tags":["Stream"],"summary":"Delete Multiple Streams","description":"Ability to delete multiple streams at once with either `StreamIds` or `StreamNames` **Attention:** Access to this route is restricted to organisation administrators, requiring an API key or JWT token with `nanoAdmin` permissions.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Delete Multiple Streams","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/streamIds"},{"$ref":"#/components/schemas/streamNames"}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"deleted":"3"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/TooManyParametersError"},{"$ref":"#/components/schemas/RtmpIngestServerDoesNotAcceptTheRequestError"},{"$ref":"#/components/schemas/RtmpIngestNotFoundError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/HlsPlayoutNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestForStreamNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://bintu.nanostream.cloud/stream \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"streamIds\":[\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\"396f0748-1f1d-4024-8602-3d5818df9158\",\"b852f974-d645-44ea-8667-821a57754b4c\"]}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream\"\n\n\tpayload := strings.NewReader(\"{\\\"streamIds\\\":[\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"396f0748-1f1d-4024-8602-3d5818df9158\\\",\\\"b852f974-d645-44ea-8667-821a57754b4c\\\"]}\")\n\n\treq, _ := http.NewRequest(\"DELETE\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.delete(\"https://bintu.nanostream.cloud/stream\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"streamIds\\\":[\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"396f0748-1f1d-4024-8602-3d5818df9158\\\",\\\"b852f974-d645-44ea-8667-821a57754b4c\\\"]}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"streamIds\": [\n    \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\n    \"396f0748-1f1d-4024-8602-3d5818df9158\",\n    \"b852f974-d645-44ea-8667-821a57754b4c\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://bintu.nanostream.cloud/stream\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"DELETE\", \"https://bintu.nanostream.cloud/stream\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"streamIds\": [\n    \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\n    \"396f0748-1f1d-4024-8602-3d5818df9158\",\n    \"b852f974-d645-44ea-8667-821a57754b4c\"\n  ]\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"streamIds\":[\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\"396f0748-1f1d-4024-8602-3d5818df9158\",\"b852f974-d645-44ea-8667-821a57754b4c\"]}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream');\n$request->setRequestMethod('DELETE');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"streamIds\\\":[\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"396f0748-1f1d-4024-8602-3d5818df9158\\\",\\\"b852f974-d645-44ea-8667-821a57754b4c\\\"]}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"DELETE\", \"/stream\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream\"\n\npayload = {\"streamIds\": [\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\", \"396f0748-1f1d-4024-8602-3d5818df9158\", \"b852f974-d645-44ea-8667-821a57754b4c\"]}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"DELETE\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"streamIds\\\":[\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"396f0748-1f1d-4024-8602-3d5818df9158\\\",\\\"b852f974-d645-44ea-8667-821a57754b4c\\\"]}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"streamIds\": [\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\", \"396f0748-1f1d-4024-8602-3d5818df9158\", \"b852f974-d645-44ea-8667-821a57754b4c\"]] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"DELETE\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"streamIds\\\":[\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"396f0748-1f1d-4024-8602-3d5818df9158\\\",\\\"b852f974-d645-44ea-8667-821a57754b4c\\\"]}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream\");\nvar request = new RestRequest(Method.DELETE);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"streamIds\\\":[\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"396f0748-1f1d-4024-8602-3d5818df9158\\\",\\\"b852f974-d645-44ea-8667-821a57754b4c\\\"]}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Delete,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"streamIds\\\":[\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"396f0748-1f1d-4024-8602-3d5818df9158\\\",\\\"b852f974-d645-44ea-8667-821a57754b4c\\\"]}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/count":{"get":{"tags":["Stream"],"summary":"Stream Collection Count","description":"Shows the amount of streams in the organisation.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Stream Collection Count","parameters":[{"$ref":"#/components/parameters/tags"},{"$ref":"#/components/parameters/state"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"count":112}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WrongDataTypeError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/stream/count\");\n\nreq.query({\n  \"tags[]\": \"foo_tag\",\n  \"state\": \"live\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/count');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'tags[]' => 'foo_tag',\n  'state' => 'live'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/stream/count?tags%5B%5D=foo_tag&state=live\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/count\"\n\nquerystring = {\"tags[]\":\"foo_tag\",\"state\":\"live\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/count?tags%5B%5D=foo_tag&state=live\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/public?tags[]=":{"get":{"tags":["Stream"],"summary":"Public Stream Collection Info","security":[{"X-BINTU-PLAYERKEY":[]}],"description":"Collection with `50` stream objects by default. It is possible to change the\nmaximum list length with the query parameter `quantity`. This controller only works with the Playerkey header.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Public Stream Collection Info","parameters":[{"$ref":"#/components/parameters/state"},{"$ref":"#/components/parameters/tagsRequired"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/quantity"},{"$ref":"#/components/parameters/X-BINTU-PLAYERKEY"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"id":"c9ce0948-d99f-49ef-b97d-344cb9bb9929","state":"live","type":"low-latency","streamgroup":"c9ce0948-d99f-49ef-b97d-344cb9bb9929","rtmpPlayoutCount":121,"updatedAt\"":"2022-10-18T15:00:31.311Z","playout":{"rtmp":[{"url":"rtmp://bintu-stream.nanocosmos.de/live","streamname":"7HsDi-rQ6fw","type":"live","StreamId":"70195620-a57d-4d18-bcd5-f083542e3892"}],"hls":[{"url":"http://bintu-stream.nanocosmos.de/live/7HsDi-rQ6fw/playlist.m3u8","type":"live","StreamId":"70195620-a57d-4d18-bcd5-f083542e3892"}],"web":[{"url":"https://bintu.nanostream.cloud/playout/c9ce0948-d99f-49ef-b97d-344cb9bb9929","type":"live","StreamId":"70195620-a57d-4d18-bcd5-f083542e3892"}],"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"7HsDi-rQ6fw"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}]}}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}}},"x-codegen-request-body-name":"tags","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20' \\\n  --header 'X-BINTU-PLAYERKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\")\n  .header(\"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\");\nxhr.setRequestHeader(\"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/stream/public\");\n\nreq.query({\n  \"state\": \"live\",\n  \"tags[]\": \"\",\n  \"offset\": \"10\",\n  \"quantity\": \"20\"\n});\n\nreq.headers({\n  \"X-BINTU-PLAYERKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/public');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'state' => 'live',\n  'tags[]' => '',\n  'offset' => '10',\n  'quantity' => '20'\n]));\n\n$request->setHeaders([\n  'X-BINTU-PLAYERKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-PLAYERKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/public\"\n\nquerystring = {\"state\":\"live\",\"tags[]\":\"\",\"offset\":\"10\",\"quantity\":\"20\"}\n\nheaders = {\"X-BINTU-PLAYERKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-PLAYERKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-PLAYERKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-PLAYERKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/public?state=live&tags%5B%5D=&offset=10&quantity=20\"),\n    Headers =\n    {\n        { \"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/public/count?tags[]=":{"get":{"tags":["Stream"],"security":[{"X-BINTU-PLAYERKEY":[]}],"summary":"Public Stream Collection Count","description":"Counts all objects in the collection. It is possible to count the objects with the query parameter `state` for specified results.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Public Stream Collection Count","parameters":[{"$ref":"#/components/parameters/state"},{"$ref":"#/components/parameters/tagsRequired"},{"$ref":"#/components/parameters/X-BINTU-PLAYERKEY"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"count":112}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}}},"x-codegen-request-body-name":"tags","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=' \\\n  --header 'X-BINTU-PLAYERKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=\")\n  .header(\"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=\");\nxhr.setRequestHeader(\"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/stream/public/count\");\n\nreq.query({\n  \"state\": \"live\",\n  \"tags[]\": \"\"\n});\n\nreq.headers({\n  \"X-BINTU-PLAYERKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/public/count');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'state' => 'live',\n  'tags[]' => ''\n]));\n\n$request->setHeaders([\n  'X-BINTU-PLAYERKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-PLAYERKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/stream/public/count?state=live&tags%5B%5D=\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/public/count\"\n\nquerystring = {\"state\":\"live\",\"tags[]\":\"\"}\n\nheaders = {\"X-BINTU-PLAYERKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-PLAYERKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-PLAYERKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-PLAYERKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/public/count?state=live&tags%5B%5D=\"),\n    Headers =\n    {\n        { \"X-BINTU-PLAYERKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/validate":{"post":{"tags":["Stream"],"summary":"Validate Stream","description":"Validates if a stream with the specified streamname exists in the organisation.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Validate Stream","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stream"}}},"required":false},"responses":{"200":{"description":"OK","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/TooManyParametersError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestForStreamNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/stream/validate \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"stream\":\"TASIK-MdGUQ\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/validate\"\n\n\tpayload := strings.NewReader(\"{\\\"stream\\\":\\\"TASIK-MdGUQ\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/stream/validate\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"stream\\\":\\\"TASIK-MdGUQ\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"stream\": \"TASIK-MdGUQ\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/stream/validate\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/stream/validate\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"stream\": \"TASIK-MdGUQ\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"stream\":\"TASIK-MdGUQ\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/validate');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"stream\\\":\\\"TASIK-MdGUQ\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/stream/validate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/validate\"\n\npayload = {\"stream\": \"TASIK-MdGUQ\"}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/validate\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"stream\\\":\\\"TASIK-MdGUQ\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"stream\": \"TASIK-MdGUQ\"] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/validate\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/validate\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"stream\\\":\\\"TASIK-MdGUQ\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/validate\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"stream\\\":\\\"TASIK-MdGUQ\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/validate\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"stream\\\":\\\"TASIK-MdGUQ\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/tag":{"put":{"tags":["Stream"],"summary":"Set Stream Tags","description":"Ability to set tags to categorize, identify and organize specific streams by words or phrases that act as keywords. **Optional.**\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Single"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"ingest":{"rtmp":{"url":"rtmp://bintu.nanocosmos.de/live","streamname":"7HsDi-rQ6fw"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"7HsDi-rQ6fw"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"hls":[{"url":"http://bintu.nanocosmos.de/live/7HsDi-rQ6fw/playlist.m3u8","type":"live"}],"rtmp":[{"url":"rtmp://bintu.nanocosmos.de/live","streamname":"7HsDi-rQ6fw","type":"live"}],"web":[{"url":"https://bintu.nanostream.cloud/playout/9d9dc062-2bdc-4bee-8bef-4c56b9953b14","type":"live"}],"thumbnails":[{"url":"https://bintuvod.nanocosmos.de:443/vod/thumbnails/7HsDi-rQ6fw.jpg","type":"image"}]},"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","created_at":"2016-03-18T12:30:22.210Z","type":"low-latency","state":"created","tags":["foo","bar"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/tag \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"tags\":[\"foo\",\"bar\"],\"processing\":[[{\"id\":\"replay\",\"duration\":30},{\"id\":\"thumbs\",\"interval\":45},{\"id\":\"rec\",\"duration\":null},{\"id\":\"motionclip\",\"duration\":5,\"interval\":30,\"format\":\"gif\"}]]}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/tag\"\n\n\tpayload := strings.NewReader(\"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"tags\": [\n    \"foo\",\n    \"bar\"\n  ],\n  \"processing\": [\n    [\n      {\n        \"id\": \"replay\",\n        \"duration\": 30\n      },\n      {\n        \"id\": \"thumbs\",\n        \"interval\": 45\n      },\n      {\n        \"id\": \"rec\",\n        \"duration\": null\n      },\n      {\n        \"id\": \"motionclip\",\n        \"duration\": 5,\n        \"interval\": 30,\n        \"format\": \"gif\"\n      }\n    ]\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"tags\": [\n    \"foo\",\n    \"bar\"\n  ],\n  \"processing\": [\n    [\n      {\n        \"id\": \"replay\",\n        \"duration\": 30\n      },\n      {\n        \"id\": \"thumbs\",\n        \"interval\": 45\n      },\n      {\n        \"id\": \"rec\",\n        \"duration\": null\n      },\n      {\n        \"id\": \"motionclip\",\n        \"duration\": 5,\n        \"interval\": 30,\n        \"format\": \"gif\"\n      }\n    ]\n  ]\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"tags\":[\"foo\",\"bar\"],\"processing\":[[{\"id\":\"replay\",\"duration\":30},{\"id\":\"thumbs\",\"interval\":45},{\"id\":\"rec\",\"duration\":null},{\"id\":\"motionclip\",\"duration\":5,\"interval\":30,\"format\":\"gif\"}]]}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/tag');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/tag\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\"\n\npayload = {\n    \"tags\": [\"foo\", \"bar\"],\n    \"processing\": [[\n            {\n                \"id\": \"replay\",\n                \"duration\": 30\n            },\n            {\n                \"id\": \"thumbs\",\n                \"interval\": 45\n            },\n            {\n                \"id\": \"rec\",\n                \"duration\": None\n            },\n            {\n                \"id\": \"motionclip\",\n                \"duration\": 5,\n                \"interval\": 30,\n                \"format\": \"gif\"\n            }\n        ]]\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"tags\": [\"foo\", \"bar\"],\n  \"processing\": [[\n      [\n        \"id\": \"replay\",\n        \"duration\": 30\n      ],\n      [\n        \"id\": \"thumbs\",\n        \"interval\": 45\n      ],\n      [\n        \"id\": \"rec\",\n        \"duration\": \n      ],\n      [\n        \"id\": \"motionclip\",\n        \"duration\": 5,\n        \"interval\": 30,\n        \"format\": \"gif\"\n      ]\n    ]]\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/tag\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"tags\\\":[\\\"foo\\\",\\\"bar\\\"],\\\"processing\\\":[[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]]}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/push_url":{"put":{"tags":["Stream"],"summary":"Set Push URL","description":"Ability to forward the (RTMP) stream to a third party website. To delete a push url, set `null` as a value in the body. **Important:** To apply the modifications, the stream needs to be restarted!\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"Set Push URL","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/push_url"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"ingest":{"rtmp":{"url":"rtmp://bintu.nanocosmos.de/live","streamname":"7HsDi-rQ6fw"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"7HsDi-rQ6fw"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"hls":[{"url":"http://bintu.nanocosmos.de/live/7HsDi-rQ6fw/playlist.m3u8","type":"live"}],"rtmp":[{"url":"rtmp://bintu.nanocosmos.de/live","streamname":"7HsDi-rQ6fw","type":"live"}],"thumbnails":[{"url":"https://bintuvod.nanocosmos.de:443/vod/thumbnails/7HsDi-rQ6fw.jpg","type":"image"}],"web":[{"url":"https://bintu.nanostream.cloud/playout/9d9dc062-2bdc-4bee-8bef-4c56b9953b14","type":"live"}]},"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","created_at":"2016-03-18T12:30:22.210Z","type":"low-latency","state":"created","tags":["foo","bar"],"webrtc":false,"transcoding":false,"pushUrl":"rtmp://144.76.112.234/live/test"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/WrongStreamProtocol"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/StreamSelfReferenceError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveHostnameError"}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"url\":\"rtmp://myurl.de/rtmp/streamname\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\"\n\n\tpayload := strings.NewReader(\"{\\\"url\\\":\\\"rtmp://myurl.de/rtmp/streamname\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"url\\\":\\\"rtmp://myurl.de/rtmp/streamname\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"url\": \"rtmp://myurl.de/rtmp/streamname\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"url\": \"rtmp://myurl.de/rtmp/streamname\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"url\":\"rtmp://myurl.de/rtmp/streamname\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"url\\\":\\\"rtmp://myurl.de/rtmp/streamname\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/push_url\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\"\n\npayload = {\"url\": \"rtmp://myurl.de/rtmp/streamname\"}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"url\\\":\\\"rtmp://myurl.de/rtmp/streamname\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"url\": \"rtmp://myurl.de/rtmp/streamname\"] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"url\\\":\\\"rtmp://myurl.de/rtmp/streamname\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"url\\\":\\\"rtmp://myurl.de/rtmp/streamname\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/push_url\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"url\\\":\\\"rtmp://myurl.de/rtmp/streamname\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/opcode":{"put":{"tags":["Stream"],"summary":"Set Thumbnail (Deprecated)","description":"Ability to set an operation code for an explicit stream.\n\n**Please note:**\nThis route is deprecated in favor of [Set stream processing](./#operation/processing). The new endpoint also provides access to new features, such as:\n- `motionclip`\n- `replay`\n- `rec`\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"opcode","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/opcode"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","streamgroup":"c9ce0948-d99f-49ef-b97d-344cb9bb9929","state":"created","type":"low-latency","created_at":"2016-03-18T12:30:22.210Z","ingested_at":"2016-03-18T12:30:22.210Z","timecode":"false","timcode_intervall":"1000","opcode":"thumbs","webrtc":"false","transcoding":"false"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/InvalidValueError"},{"$ref":"#/components/schemas/FeatureNotEnabledError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/SingletonOpcodeUsedTwiceError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestForStreamNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"opcode\":\"thumbs\",\"interval\":45}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\"\n\n\tpayload := strings.NewReader(\"{\\\"opcode\\\":\\\"thumbs\\\",\\\"interval\\\":45}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"opcode\\\":\\\"thumbs\\\",\\\"interval\\\":45}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"opcode\": \"thumbs\",\n  \"interval\": 45\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"opcode\": \"thumbs\",\n  \"interval\": 45\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"opcode\":\"thumbs\",\"interval\":45}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"opcode\\\":\\\"thumbs\\\",\\\"interval\\\":45}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/opcode\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\"\n\npayload = {\n    \"opcode\": \"thumbs\",\n    \"interval\": 45\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"opcode\\\":\\\"thumbs\\\",\\\"interval\\\":45}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"opcode\": \"thumbs\",\n  \"interval\": 45\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"opcode\\\":\\\"thumbs\\\",\\\"interval\\\":45}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"opcode\\\":\\\"thumbs\\\",\\\"interval\\\":45}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/opcode\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"opcode\\\":\\\"thumbs\\\",\\\"interval\\\":45}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/processing":{"put":{"tags":["Stream"],"summary":"Set live processing","description":"Enhance your streams with powerful processing features! We offer a range of options, including `thumbnail generation`, `motion clips`, `recording`, and `replay` functionality. **Please note that availability depends on your chosen package**.  \nSee also [Create stream options](#operation/createStreamOptions) and [Modify stream options](#operation/modifyStreamOptions) for additional processing - caption transcription, translation, applying overlay and delay on the stream.\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"processing","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/processing"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","streamgroup":"c9ce0948-d99f-49ef-b97d-344cb9bb9929","state":"created","type":"low-latency","created_at":"2016-03-18T12:30:22.210Z","ingested_at":"2016-03-18T12:30:22.210Z","timecode":"false","timcode_intervall":"1000","opcode":"thumbs","webrtc":false,"transcoding":false,"tags":["you are awesome"],"processing":[{"id":"rec","duration":null},{"id":"replay","duration":null},{"id":"thumbs","interval":10},{"id":"motionclip","duration":10,"interval":5,"format":"gif"}],"ingest":{"rtmp":{"url":"rtmp://bintu-stream.nanocosmos.de:1935/live","streamname":"CeQ2q-WUKxm"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"CeQ2q-WUKxm"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"rtmp":[{"url":"rtmp://bintu-play.nanocosmos.de:1935/play","streamname":"CeQ2q-WUKxm","type":"live"}],"hls":[{"url":"https://bintu-play.nanocosmos.de:443/hls/CeQ2q-WUKxm/index.m3u8","type":"live"}],"web":[{"url":"https://bintu.nanostream.cloud/playout/cbc27886-5c60-4c72-87da-04f4b9411b13","type":"live"}],"thumbnails":[{"url":"https://bintu-vod.nanocosmos.de:443/vod/thumbnails/CeQ2q-WUKxm.jpg","type":"image","streamId":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","streamname":"CeQ2q-WUKxm"}],"replay":[{"url":"https://web-demos.pages.nanocosmos.de/live-replay/main/demo/?streamname=CeQ2q-WUKxm&bintu=bintu-play.nanocosmos.de","type":"playout","index":0,"streamId":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","streamname":"CeQ2q-WUKxm"},{"url":"https://bintu-vod.nanocosmos.de/vod/CeQ2q-WUKxm.m3u8","type":"playlist","index":0,"streamId":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","streamname":"CeQ2q-WUKxm"}],"motionclip":[{"url":"https://bintu-vod.nanocosmos.de:443/vod/thumbnails/CeQ2q-WUKxm.jpg","type":"gif","index":0,"streamId":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","streamname":"CeQ2q-WUKxm"}]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/InvalidValueError"},{"$ref":"#/components/schemas/FeatureNotEnabledError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/SingletonOpcodeUsedTwiceError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestNotFoundError"},{"$ref":"#/components/schemas/RtmpIngestForStreamNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/processing \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"processing\":[{\"id\":\"replay\",\"duration\":30},{\"id\":\"thumbs\",\"interval\":45},{\"id\":\"rec\",\"duration\":null},{\"id\":\"motionclip\",\"duration\":5,\"interval\":30,\"format\":\"gif\"}]}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/processing\"\n\n\tpayload := strings.NewReader(\"{\\\"processing\\\":[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"processing\\\":[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"processing\": [\n    {\n      \"id\": \"replay\",\n      \"duration\": 30\n    },\n    {\n      \"id\": \"thumbs\",\n      \"interval\": 45\n    },\n    {\n      \"id\": \"rec\",\n      \"duration\": null\n    },\n    {\n      \"id\": \"motionclip\",\n      \"duration\": 5,\n      \"interval\": 30,\n      \"format\": \"gif\"\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"processing\": [\n    {\n      \"id\": \"replay\",\n      \"duration\": 30\n    },\n    {\n      \"id\": \"thumbs\",\n      \"interval\": 45\n    },\n    {\n      \"id\": \"rec\",\n      \"duration\": null\n    },\n    {\n      \"id\": \"motionclip\",\n      \"duration\": 5,\n      \"interval\": 30,\n      \"format\": \"gif\"\n    }\n  ]\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"processing\":[{\"id\":\"replay\",\"duration\":30},{\"id\":\"thumbs\",\"interval\":45},{\"id\":\"rec\",\"duration\":null},{\"id\":\"motionclip\",\"duration\":5,\"interval\":30,\"format\":\"gif\"}]}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/processing');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"processing\\\":[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/processing\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\"\n\npayload = {\"processing\": [\n        {\n            \"id\": \"replay\",\n            \"duration\": 30\n        },\n        {\n            \"id\": \"thumbs\",\n            \"interval\": 45\n        },\n        {\n            \"id\": \"rec\",\n            \"duration\": None\n        },\n        {\n            \"id\": \"motionclip\",\n            \"duration\": 5,\n            \"interval\": 30,\n            \"format\": \"gif\"\n        }\n    ]}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"processing\\\":[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"processing\": [\n    [\n      \"id\": \"replay\",\n      \"duration\": 30\n    ],\n    [\n      \"id\": \"thumbs\",\n      \"interval\": 45\n    ],\n    [\n      \"id\": \"rec\",\n      \"duration\": \n    ],\n    [\n      \"id\": \"motionclip\",\n      \"duration\": 5,\n      \"interval\": 30,\n      \"format\": \"gif\"\n    ]\n  ]] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"processing\\\":[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"processing\\\":[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/processing\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"processing\\\":[{\\\"id\\\":\\\"replay\\\",\\\"duration\\\":30},{\\\"id\\\":\\\"thumbs\\\",\\\"interval\\\":45},{\\\"id\\\":\\\"rec\\\",\\\"duration\\\":null},{\\\"id\\\":\\\"motionclip\\\",\\\"duration\\\":5,\\\"interval\\\":30,\\\"format\\\":\\\"gif\\\"}]}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/timecode":{"put":{"tags":["Stream"],"summary":"Set Timecode","description":"Ability to set an interval for an explicit stream at which metadata is injected.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Set Timecode","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/timecode"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/InvalidValueError"},{"$ref":"#/components/schemas/StreamOptionNotAvailableError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"timecode\":true,\"interval\":3600000}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\"\n\n\tpayload := strings.NewReader(\"{\\\"timecode\\\":true,\\\"interval\\\":3600000}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"timecode\\\":true,\\\"interval\\\":3600000}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"timecode\": true,\n  \"interval\": 3600000\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"timecode\": true,\n  \"interval\": 3600000\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"timecode\":true,\"interval\":3600000}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"timecode\\\":true,\\\"interval\\\":3600000}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/timecode\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\"\n\npayload = {\n    \"timecode\": True,\n    \"interval\": 3600000\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"timecode\\\":true,\\\"interval\\\":3600000}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"timecode\": true,\n  \"interval\": 3600000\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"timecode\\\":true,\\\"interval\\\":3600000}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"timecode\\\":true,\\\"interval\\\":3600000}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/timecode\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"timecode\\\":true,\\\"interval\\\":3600000}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/transcoding_profile":{"put":{"tags":["Stream"],"summary":"Update Transcoding Profile","description":"Ability to update the transcoding profile of a stream.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"Update Transcoding Profile","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transcoding_profile"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","streamgroup":"cbc27886-5c60-4c72-87da-04f4b9411b13","state":"created","type":"low-latency","created_at":"2022-04-26T13:50:03.005Z","timecode":false,"timecode_interval":1000,"webrtc":false,"transcoding":false,"rtmpPlayoutCount":0,"tags":["hallo"],"ingest":{"rtmp":{"url":"rtmp://bintu-stream.nanocosmos.de:1935/live","streamname":"CeQ2q-WUKxm"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"CeQ2q-WUKxm"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"rtmp":[{"url":"rtmp://bintu-play.nanocosmos.de:1935/play","streamname":"CeQ2q-WUKxm","type":"live"}],"hls":[{"url":"https://bintu-play.nanocosmos.de:443/hls/CeQ2q-WUKxm/index.m3u8","type":"live"}],"thumbnails":[{"url":"https://bintuvod.nanocosmos.de:443/vod/thumbnails/CeQ2q-WUKxm.jpg","type":"image"}],"web":[{"url":"https://bintu.nanostream.cloud/playout/cbc27886-5c60-4c72-87da-04f4b9411b13","type":"live"}]}}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/TranscodingProfileNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/DataNotFoundForCreationError"}]}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscodingProfileChangingNotAllowed"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"transcoding_profile\":\"vtrans-800k\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\"\n\n\tpayload := strings.NewReader(\"{\\\"transcoding_profile\\\":\\\"vtrans-800k\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"transcoding_profile\\\":\\\"vtrans-800k\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"transcoding_profile\": \"vtrans-800k\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"transcoding_profile\": \"vtrans-800k\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"transcoding_profile\":\"vtrans-800k\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"transcoding_profile\\\":\\\"vtrans-800k\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/transcoding_profile\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\"\n\npayload = {\"transcoding_profile\": \"vtrans-800k\"}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"transcoding_profile\\\":\\\"vtrans-800k\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"transcoding_profile\": \"vtrans-800k\"] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"transcoding_profile\\\":\\\"vtrans-800k\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"transcoding_profile\\\":\\\"vtrans-800k\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcoding_profile\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"transcoding_profile\\\":\\\"vtrans-800k\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/transcode":{"put":{"x-hidden":true,"tags":["Stream"],"summary":"Add Transcode To Existing Streamgroup","description":"Ability to add a new transcode to an existing streamgroup.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"AddTranscodeToExistingStreamgroup","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"example":{"profile":"vtrans2-640x360x400x25","tags":["a","b","c"]},"required":["profile"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"streamgroup":{"type":"string"},"state":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string"},"ingested_at":{"type":"string"},"updated_at":{"type":"string"},"timecode":{"type":"boolean"},"timecode_interval":{"type":"integer"},"opcode":{"type":"string"},"processing":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"duration":{"type":"integer"},"interval":{"type":"integer"},"format":{"type":"string"}}}},"webrtc":{"type":"boolean"},"transcoding":{"type":"boolean"},"pushUrl":{"type":"string"},"rtmpPlayoutCount":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}},"ingest":{"type":"object","properties":{"rtmp":{"type":"object","properties":{"url":{"type":"string"},"streamname":{"type":"string"}}}},"required":["rtmp"]},"playout":{"type":"object","properties":{"h5live":{"type":"array","items":{"type":"object"}},"rtmp":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"streamname":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"index":{"type":"integer"},"info":{"type":"object","properties":{"bitrate":{"type":"integer"},"fps":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}},"pushUrl":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}},"web":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"index":{"type":"integer"},"info":{"type":"object","properties":{"bitrate":{"type":"integer"},"fps":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}},"pushUrl":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}},"hls":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"index":{"type":"integer"},"info":{"type":"object","properties":{"bitrate":{"type":"integer"},"fps":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}},"pushUrl":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"example":{"id":"db3660c4-2517-43d3-ae11-e7183e3fbffa","streamgroup":"db3660c4-2517-43d3-ae11-e7183e3fbffa","state":"created","type":"low-latency","created_at":"2023-09-14T09:53:49.637Z","ingested_at":null,"updated_at":"2023-09-14T09:53:49.676Z","timecode":false,"timecode_interval":1000,"opcode":null,"webrtc":false,"transcoding":false,"pushUrl":null,"rtmpPlayoutCount":0,"tags":["tag1","tag2"],"ingest":{"rtmp":{"url":"rtmp://KKGfV-eQvJU.vtrans.glb.nanocosmos.de/live","streamname":"KKGfV-eQvJU"}},"playout":{"h5live":[{"rtmp":{"url":"rtmp://localhost:1935/play\"","streamname":"KKGfV-eQvJU"},"server":{"webtransport":"https://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","websocket":"wss://bintu-h5live.nanocosmos.de:443/h5live/stream/stream.mp4","progressive":"https://bintu-h5live.nanocosmos.de:443/h5live/http/stream.mp4","hls":"https://bintu-h5live.nanocosmos.de:443/h5live/http/playlist.m3u8"},"type":"live"}],"rtmp":[{"url":"rtmp://bintu-play.nanocosmos.de:1935/play","streamname":"KKGfV-eQvJU","type":"live","id":"db3660c4-2517-43d3-ae11-e7183e3fbffa","index":0},{"url":"rtmp://bintu-play.nanocosmos.de:1935/play","streamname":"KKGfV-gG0FO","type":"live","info":{"bitrate":400,"fps":25,"width":640,"height":360},"id":"60cba110-6419-4f23-ba19-8eec38e5ef79","pushUrl":null,"tags":["a","b","c"],"index":1}],"web":[{"url":"https://localhost:443/playout/db3660c4-2517-43d3-ae11-e7183e3fbffa","type":"live","id":"db3660c4-2517-43d3-ae11-e7183e3fbffa","index":0},{"url":"https://localhost:443/playout/60cba110-6419-4f23-ba19-8eec38e5ef79","type":"live","info":{"bitrate":400,"fps":25,"width":640,"height":360},"id":"60cba110-6419-4f23-ba19-8eec38e5ef79","pushUrl":null,"tags":["a","b","c"],"index":1}],"hls":[{"url":"https://bintu-play.nanocosmos.de:443/hls/KKGfV-eQvJU/index.m3u8","type":"live","id":"db3660c4-2517-43d3-ae11-e7183e3fbffa","index":0},{"url":"https://bintu-play.nanocosmos.de:443/hls/KKGfV-gG0FO/index.m3u8","type":"live","info":{"bitrate":400,"fps":25,"width":640,"height":360},"id":"60cba110-6419-4f23-ba19-8eec38e5ef79","pushUrl":null,"tags":["a","b","c"],"index":1}],"thumbnails":[{"url":"https://bintuvod.nanocosmos.de:443/vod/thumbnails/7HsDi-rQ6fw.jpg","type":"image"}]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/ParameterNotUniqueError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/TooManyTranscodingProfilesError"},{"$ref":"#/components/schemas/StreamTypeNotAvailableError"},{"$ref":"#/components/schemas/StreamOptionNotAvailableError"},{"$ref":"#/components/schemas/InvalidValueError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/NotPassthroughError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TranscodingProfileNotFoundError"},{"$ref":"#/components/schemas/TranscodingProfilenameNotFoundError"},{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"profile\":\"vtrans2-640x360x400x25\",\"tags\":[\"a\",\"b\",\"c\"]}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\"\n\n\tpayload := strings.NewReader(\"{\\\"profile\\\":\\\"vtrans2-640x360x400x25\\\",\\\"tags\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"profile\\\":\\\"vtrans2-640x360x400x25\\\",\\\"tags\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"profile\": \"vtrans2-640x360x400x25\",\n  \"tags\": [\n    \"a\",\n    \"b\",\n    \"c\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"profile\": \"vtrans2-640x360x400x25\",\n  \"tags\": [\n    \"a\",\n    \"b\",\n    \"c\"\n  ]\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"profile\":\"vtrans2-640x360x400x25\",\"tags\":[\"a\",\"b\",\"c\"]}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"profile\\\":\\\"vtrans2-640x360x400x25\\\",\\\"tags\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/transcode\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\"\n\npayload = {\n    \"profile\": \"vtrans2-640x360x400x25\",\n    \"tags\": [\"a\", \"b\", \"c\"]\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"profile\\\":\\\"vtrans2-640x360x400x25\\\",\\\"tags\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"profile\": \"vtrans2-640x360x400x25\",\n  \"tags\": [\"a\", \"b\", \"c\"]\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"profile\\\":\\\"vtrans2-640x360x400x25\\\",\\\"tags\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"profile\\\":\\\"vtrans2-640x360x400x25\\\",\\\"tags\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"profile\\\":\\\"vtrans2-640x360x400x25\\\",\\\"tags\\\":[\\\"a\\\",\\\"b\\\",\\\"c\\\"]}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/transcode/{transcode_id}":{"delete":{"x-hidden":true,"tags":["Stream"],"summary":"Delete Stream Transcode","description":"Ability to delete a transcode of a stream. **Attention:** Access to this route is restricted to organisation administrators, requiring an API key or JWT token with `nanoAdmin` permissions.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Delete Stream Transcode","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"transcode_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParameterRequiredError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/NotPassthroughError"},{"$ref":"#/components/schemas/RemovingATranscodeDuringLiveStateIsNotAllowedError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.delete(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"DELETE\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"DELETE\", \"/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"DELETE\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\");\nvar request = new RestRequest(Method.DELETE);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Delete,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/transcode/%7Btranscode_id%7D\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/unlock":{"put":{"tags":["Stream"],"summary":"Unlock Stream","description":"Allows unlocking a stream identified by its unique `id`.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"OK"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\"\n\n\treq, _ := http.NewRequest(\"PUT\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock');\n$request->setRequestMethod('PUT');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/unlock\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"PUT\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/unlock\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/stream/{id}/options":{"post":{"tags":["Stream Options"],"summary":"Create stream options","operationId":"createStreamOptions","description":"Create a new group of stream options for the stream identified by `id`.\nThe options can be of types boolean, number or string.  \nUsed to set Live Captioning, Overlay, Delay, and Chroma Key.  \nFor more processing options see [Set live processing](#operation/processing).\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n\n## Live Captioning setup\nBy configuring live captioning options, you can set up the transcription or translation for your stream.\n\nTranscription is performed when **targetLanguages** matches **sourceLanguage**.  \nTranslation is performed when **targetLanguages** differs from **sourceLanguage**.  \nYou can specify both by adding the source language to the list of target languages.  \nBy default, transcription is set up for English.\nBy modifying the **sourceLanguage** and **targetLanguages** parameters, you can configure transcription and translation for other languages.  \nYou should set it up before you start ingesting the stream - the captions will then start being generated automatically at the beginning of your stream.\n\n### Required parameters\n\n* **name** (*string*)  \n  Must be set to `captions`.\n\n* **engine** (*string*)   \n  Captioning engine to use.  \n  Currently supported value: `deepgram`.\n\n### Optional parameters\n\n* **sourceLanguage** (*string*)  \n  Language code of the input audio.  \n  Defaults to `en`.\n\n* **targetLanguages** (*string*)  \n  Comma-separated list of one or more language codes used for transcription or translation.  \n  Example: `en,fr,de`.   \n  Defaults to `en`.\n\n\n### Supported Languages:\n\n  | Language | Language codes | Deepgram |\n  | :---: | :---: | :---: |\n  | Arabic | ar, ar-AE, ar-SA, ar-QA, ar-KW, ar-SY, ar-LB, ar-PS, ar-JO, ar-EG, ar-SD, ar-TD, ar-MA, ar-DZ, ar-TN, ar-IQ, ar-IR | &check; |\n  | Belarusian | be | &check; |\n  | Bengali | bn | &check; |\n  | Bosnian | bs | &check; |\n  | Bulgarian | bg | &check; |\n  | Catalan | ca | &check; |\n  | Croatian | hr | &check; |\n  | Czech | cs | &check; |\n  | Danish | da, da-DK | &check; |\n  | Dutch | nl | &check; |\n  | English | en, en-US, en-AU, en-GB, en-IN, en-NZ | &check; |\n  | Estonian | et | &check; |\n  | Finnish | fi | &check; |\n  | Flemish | nl-BE | &check; |\n  | French | fr, fr-CA | &check; |\n  | German | de | &check; |\n  | German (Switzerland) | de-CH | &check; |\n  | Greek | el | &check; |\n  | Hebrew | he | &check; |\n  | Hindi | hi | &check; |\n  | Hungarian | hu | &check; |\n  | Indonesian | id | &check; |\n  | Italian | it | &check; |\n  | Japanese | ja | &check; |\n  | Kannada | kn | &check; |\n  | Korean | ko, ko-KR | &check; |\n  | Latvian | lv | &check; |\n  | Lithuanian | lt | &check; |\n  | Macedonian | mk | &check; |\n  | Malay | ms | &check; |\n  | Marathi | mr | &check; |\n  | Norwegian | no | &check; |\n  | Persian | fa | &check; |\n  | Polish | pl | &check; |\n  | Portuguese | pt, pt-BR, pt-PT | &check; |\n  | Romanian | ro | &check; |\n  | Russian | ru | &check; |\n  | Serbian | sr | &check; |\n  | Slovak | sk | &check; |\n  | Slovenian | sl | &check; |\n  | Spanish | es, es-419 | &check; |\n  | Swedish | sv, sv-SE | &check; |\n  | Tagalog | tl | &check; |\n  | Tamil | ta | &check; |\n  | Telugu | te | &check; |\n  | Turkish | tr | &check; |\n  | Ukrainian | uk | &check; |\n  | Urdu | ur | &check; |\n  | Vietnamese | vi | &check; |\n\n> **Note:** The source and target languages must not share the same base language. Localized variants are considered the same language (e.g., `es` and `es-419`, or `en` and `en-US`). The API will return error code `23013` if this rule is violated.\n\n## Overlay setup\nConfiguring overlay options creates **a new stream group** where both the overlay and an optional delay are applied. \nCheck `overlayTargetId` in the response - this is the stream group id where the overlay is applied.\n\n### Required parameters\n\n* **name** (*string*)  \n  Must be set to `overlay`.\n\n### Optional parameters\n\n * **delay** (*number*)  \n  Delay (in seconds) applied to the overlaid stream.  \n  Example: if **delay** is set to **10**, the stream with the overlay applied will be delayed by 10 seconds compared to the original stream.  \n  Allowed range: `0–60`.  \n  Defaults to `0`.\n\n* **watermark** (*string*)  \n  Name of the image file uploaded to the watermark manager that will be used as the overlay.\n  Only the file name should be provided, without the extension.  \n  Example: if the uploaded file is `my_watermark.png`, set watermark to `my_watermark`.\n  If not specified, the default watermark configured in the watermark manager is used.  \n  If not selecting a specific watermark, make sure a default watermark is configured, otherwise the overlay process will fail.  \n  Watermark manager is available in [studio](https://studio.nanostream.cloud/), where you can login with your usual dashboard account.\n\n* **profile** (*string*)  \n  Transcoding profile used to derive bitrate and fps (frames per second) for the passthrough of the overlaid stream group.\n  Available profiles can be listed using the **GET /transcoding_profiles** endpoint.\n  Only the bitrate and fps values are extracted from the profile.  \n  Example: using **vtrans2-1280x720x1200x25** applies a **bitrate** of **1200** and **fps** of **25**.  \n  Defaults to **bitrate**: `1000`, **fps**: `25`.\n\n\n## Delay setup\nConfiguring delay options creates **a new stream group** that is delayed relative to the original stream.\nCheck `delayTargetId` in the response - this is the stream group id where the delay is applied.\n\n### Required parameters\n\n* **name** (*string*)  \n  Must be set to `delay`.\n\n* **delay** (*number*)  \n  Delay (in seconds) applied to the stream.  \n  Example: if **delay** is set to **10**, the stream with the delay applied will be delayed by 10 seconds compared to the original stream.  \n  Allowed range: `0–60`.\n\n\n## Chroma Key setup\nChroma key removes a single color, usually a green screen, from a live stream and places the presenter over a new background. The keying runs in the nanoStream Cloud pipeline. You send **one** green-screen ingest, and nanoStream delivers a finished, keyed stream to each **target**, with its own background and optional logo overlay. One ingest can feed up to 20 targets, for example one per brand or channel.\n\nBackgrounds can be an **MP4** video (loops automatically), a **PNG** or **JPG** image, or another **live stream**. Overlays are **PNG** files, usually with transparency. Upload them in **Backgrounds** in the browser-based [Chroma Setup Tuner](https://chromakey.nanocosmos.net/chroma-setup-tuner.html), which also offers the same setup and a live tuning preview. For the full workflow and tuning guide, see the [nanoStudio documentation](https://docs.nanocosmos.net/docs/nanostudio/chroma_key_getting_started).\n\nHow to use it:\n\n1. **Create the streams.** Create the ingest stream, the one your green-screen video is sent to, and one stream per output. These are the targets. Each is a regular nanoStream stream with its own ingest and playout, and plays like any other stream.\n\n2. **Set the chroma key option on the ingest stream.** List the targets in `targets`, each with its background, and tune the key with the optional parameters (`filter`, `color`, `similarity`, `blend`, ...). The key settings are shared by all targets.\n\n3. **Publish the green-screen stream to the chroma key ingest server** with the ingest stream's stream key:\n\n   `rtmp://bintu-studio.nanocosmos.de/live`\n\n   Publishing to this server is what starts the chroma key. The keyed video is composited with each target's background and overlay, and delivered to the target streams. Your encoder only ever sends to the ingest, never to a target.\n\n> **Use the chroma key server.** If your encoder sends the stream key to another RTMP server, for example one copied from the Dashboard, the stream arrives but the chroma key doesn't start, and the targets stay black.\n\n> **One chroma key per stream.** A stream can have only one chroma key setup. Set it on the stream you ingest to, not on an output created by another option (such as the overlay or delay stream) or on a target of another chroma keyed stream.\n\n### Required parameters\n\n* **name** (*string*)  \n  Must be set to `chroma_key`.\n\n* **targets** (*array*)  \n  1–20 target streams, one object each:  \n\n  * **streamId** (*string*, required) - ID of the target stream. Must be the UUID of an existing stream (the stream itself, not one of its transcoded renditions), unique within `targets`, and not the ID of the ingest stream.\n\n  * **background** (*string*, required) - background placed behind the presenter. Either the file name of an uploaded **MP4**, **PNG** or **JPG**, with extension, e.g. `my_background.mp4`, or the stream name or stream ID of another live stream. Use the same resolution as your camera (1280×720 or 1920×1080). MP4s should be H.264 at 3–5 Mbps and no more than 8 Mbps.\n\n  * **foreground** (*string*, optional) - overlay **PNG** (usually a transparent logo) placed on top of the keyed picture, e.g. `logo.png`. Uploaded in **Backgrounds** in the [Chroma Setup Tuner](https://chromakey.nanocosmos.net/chroma-setup-tuner.html).\n\n  * **foreground_position** (*string*, optional) - overlay position in pixels from the top-left corner, as `x=10:y=10`.\n\n  * **foreground_size** (*string*, optional) - overlay size in pixels, as `width:height`, e.g. `200:100`.\n\n### Optional parameters\n\n* **filter** (*string*)  \n  Keying filter: `chromakey` (RGB key color) or `hsvkey` (HSV key color).\n\n* **color** (*string*)  \n  Key color. For `chromakey` use `#RRGGBB`, e.g. `#00ff00`. For `hsvkey` use `h:s:v`, e.g. `120:1:1`.\n\n* **similarity** (*number*)  \n  How much of the color range around the key color is removed. `0–1`. Too low leaves patches of screen; too high cuts holes in the presenter.\n\n* **blend** (*number*)  \n  How softly the edge fades between presenter and background. `0–1`.\n\n* **bitrate** (*number*)  \n  Bitrate applied to all target streams.\n\n* **despill** (*string*)  \n  Removes the green or blue tint the screen reflects onto the presenter. `key=value:key=value`, e.g. `type=0:mix=0.5:enable=1`.  \n  Keys: `type` (0 = green, 1 = blue), `mix`, `expand`, `red`, `green`, `blue`, `brightness`, `alpha` (numbers), `enable` (`0` or `1`).\n\n* **eq** (*string*)  \n  Adjusts the presenter's picture after keying to match the background. `key=value:key=value`, e.g. `brightness=0.04:contrast=1.25`.  \n  Keys: `brightness` (`-1–1`), `contrast` (`-1000–1000`), `saturation` (`0–3`), `gamma`, `gamma_r`, `gamma_g`, `gamma_b` (`0.1–10`), `gamma_weight` (`0–1`), `eval` (`init` or `frame`), `enable` (`0` or `1`).\n\n* **stages** (*array of strings*)  \n  Up to 9 additional ffmpeg video filters, each as a filter string, e.g. `hue=s=1.2` (saturation) or `unsharp=3:3:0.5` (sharpen).\n","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["name","options"],"properties":{"name":{"type":"string","enum":["captions"]},"options":{"$ref":"#/components/schemas/CaptionsOptions"}}},{"type":"object","required":["name","options"],"properties":{"name":{"type":"string","enum":["overlay"]},"options":{"$ref":"#/components/schemas/OverlayOptions"}}},{"type":"object","required":["name","options"],"properties":{"name":{"type":"string","enum":["delay"]},"options":{"$ref":"#/components/schemas/DelayOptions"}}},{"type":"object","required":["name","options"],"properties":{"name":{"type":"string","enum":["chroma_key"]},"options":{"$ref":"#/components/schemas/ChromaKeyOptions"}}}]},"examples":{"captions":{"summary":"Live Captions","value":{"name":"captions","options":{"engine":"deepgram","sourceLanguage":"en","targetLanguages":"en, de"}}},"overlay":{"summary":"Overlay","value":{"name":"overlay","options":{"delay":0,"watermark":"my_overlay","profile":"vtrans2-1280x720x2000x30"}}},"delay":{"summary":"Delay","value":{"name":"delay","options":{"delay":20}}},"chroma_key":{"summary":"Chroma Key","value":{"name":"chroma_key","options":{"filter":"chromakey","color":"#00ff00","similarity":0.3,"blend":0.1,"eq":"brightness=0.04:contrast=1.25","targets":[{"streamId":"12345678-1234-1234-1234-123456789013","background":"my_background.mp4","foreground":"my_logo.png","foreground_position":"x=10:y=10","foreground_size":"200:100"},{"streamId":"12345678-1234-1234-1234-123456789015","background":"my_other_background.mp4"}]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","oneOf":[{"type":"object","properties":{"optionName":{"type":"string","enum":["captions"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"options":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"engine":{"type":"string","enum":["deepgram"]}}},{"type":"object","properties":{"id":{"type":"string"},"sourceLanguage":{"type":"string"}}},{"type":"object","properties":{"id":{"type":"string"},"targetLanguages":{"type":"string"}}}]}}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["overlay"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"overlayTargetId":{"type":"string"},"options":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delay":{"type":"number"}}},{"type":"object","properties":{"id":{"type":"string"},"watermark":{"type":"string"}}},{"type":"object","properties":{"id":{"type":"string"},"profile":{"type":"string"}}}]}}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["delay"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"delayTargetId":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"delay":{"type":"number"}}}}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["chroma_key"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"options":{"type":"array","items":{"type":"object","description":"One item per option. Each item has an `id` and one option key, e.g. `color`, `filter`, `similarity`, `streamId_1`, `background_1`, `stage_1`.","properties":{"id":{"type":"string"}}}}}}]},"examples":{"captions":{"summary":"Live captions","value":{"optionGroup":"captions-1","optionName":"captions","streamId":"12345678-1234-1234-1234-123456789012","options":[{"id":"12345678-1234-1234-1234-123456789012","engine":"deepgram"},{"id":"12345678-1234-1234-1234-123456789013","sourceLanguage":"en"},{"id":"12345678-1234-1234-1234-123456789014","targetLanguages":"en, de"}]}},"overlay":{"summary":"Overlay","value":{"optionGroup":"overlay-1","optionName":"overlay","streamId":"12345678-1234-1234-1234-123456789012","overlayTargetId":"12345678-1234-1234-1234-123456789013","options":[{"id":"12345678-1234-1234-1234-123456789012","delay":0},{"id":"12345678-1234-1234-1234-123456789013","watermark":"my_watermark"},{"id":"12345678-1234-1234-1234-123456789014","profile":"vtrans2-1280x720x2000x30"}]}},"delay":{"summary":"Delay","value":{"optionGroup":"delay-1","optionName":"delay","streamId":"12345678-1234-1234-1234-123456789012","delayTargetId":"12345678-1234-1234-1234-123456789013","options":[{"id":"12345678-1234-1234-1234-123456789012","delay":20}]}},"chroma_key":{"summary":"Chroma Key","value":{"optionGroup":"chroma_key-1","optionName":"chroma_key","streamId":"12345678-1234-1234-1234-123456789012","options":[{"id":"12345678-1234-1234-1234-123456789020","filter":"chromakey"},{"id":"12345678-1234-1234-1234-123456789021","color":"#00ff00"},{"id":"12345678-1234-1234-1234-123456789022","similarity":0.3},{"id":"12345678-1234-1234-1234-123456789023","streamId_1":"12345678-1234-1234-1234-123456789013"},{"id":"12345678-1234-1234-1234-123456789024","background_1":"my_background.mp4"},{"id":"12345678-1234-1234-1234-123456789025","foreground_1":"my_logo.png"},{"id":"12345678-1234-1234-1234-123456789026","foreground_position_1":"x=10:y=10"},{"id":"12345678-1234-1234-1234-123456789027","foreground_size_1":"200:100"},{"id":"12345678-1234-1234-1234-123456789028","streamId_2":"12345678-1234-1234-1234-123456789015"},{"id":"12345678-1234-1234-1234-123456789029","background_2":"my_other_background.mp4"}]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/StreamOptionNameNotSupportedError"},{"$ref":"#/components/schemas/StreamOptionTypeNotSupportedError"},{"$ref":"#/components/schemas/LiveCaptionsBadRequestError"},{"$ref":"#/components/schemas/LiveCaptionsEngineNotSupported"},{"$ref":"#/components/schemas/LiveCaptionsSourceTargetLanguageConflict"},{"$ref":"#/components/schemas/StreamOptionKeyNotSupported"},{"$ref":"#/components/schemas/InvalidValueError"},{"$ref":"#/components/schemas/StreamOptionsMissingRequiredError"},{"$ref":"#/components/schemas/PropertyIsOutsideAllowedLimits"},{"$ref":"#/components/schemas/StreamIdMustBeValidUuid"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/LiveCaptioningNotEnabled"},{"$ref":"#/components/schemas/StreamGroupIsASubGroup"},{"$ref":"#/components/schemas/DelayIsOutsideAllowedLimits"},{"$ref":"#/components/schemas/TargetStreamIdCantBeTheSameAsMainStreamId"},{"$ref":"#/components/schemas/StreamIdMustBeStreamGroupId"},{"$ref":"#/components/schemas/NumberOfTargetsIsOutsideAllowedLimits"},{"$ref":"#/components/schemas/StreamIdsMustBeUnique"},{"$ref":"#/components/schemas/ColorOptionisNotValidHexColor"},{"$ref":"#/components/schemas/ColorOptionisNotValidHSVColor"},{"$ref":"#/components/schemas/FilterNotSupported"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/VTransProfileNotFoundError"}]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamOptionsAlreadyExistsForStreamgroup"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/options \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"captions\",\"options\":{\"engine\":\"deepgram\",\"sourceLanguage\":\"en\",\"targetLanguages\":\"en,de\"}}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/options\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"captions\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"name\\\":\\\"captions\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"name\": \"captions\",\n  \"options\": {\n    \"engine\": \"deepgram\",\n    \"sourceLanguage\": \"en\",\n    \"targetLanguages\": \"en,de\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"name\": \"captions\",\n  \"options\": {\n    \"engine\": \"deepgram\",\n    \"sourceLanguage\": \"en\",\n    \"targetLanguages\": \"en,de\"\n  }\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"name\":\"captions\",\"options\":{\"engine\":\"deepgram\",\"sourceLanguage\":\"en\",\"targetLanguages\":\"en,de\"}}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/options');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"name\\\":\\\"captions\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/stream/%7Bid%7D/options\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\"\n\npayload = {\n    \"name\": \"captions\",\n    \"options\": {\n        \"engine\": \"deepgram\",\n        \"sourceLanguage\": \"en\",\n        \"targetLanguages\": \"en,de\"\n    }\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"name\\\":\\\"captions\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"name\": \"captions\",\n  \"options\": [\n    \"engine\": \"deepgram\",\n    \"sourceLanguage\": \"en\",\n    \"targetLanguages\": \"en,de\"\n  ]\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"captions\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"name\\\":\\\"captions\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"name\\\":\\\"captions\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"get":{"tags":["Stream Options"],"summary":"Get list of stream options","description":"List all stream options that were set on the stream with `id`.\nOptionally, filter the response by option name, option group or both.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check;|\n","parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/optionName"},{"$ref":"#/components/parameters/optionGroup"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"optionName":{"type":"string","enum":["captions"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"options":{"$ref":"#/components/schemas/CaptionsOptionsResponse"}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["overlay"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"overlayTargetId":{"type":"string"},"options":{"$ref":"#/components/schemas/OverlayOptionsResponse"}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["delay"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"delayTargetId":{"type":"string"},"options":{"$ref":"#/components/schemas/DelayOptionsResponse"}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["chroma_key"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"options":{"$ref":"#/components/schemas/ChromaKeyOptionsResponse"}}}]}},"examples":{"captions":{"summary":"Live Captions","value":{"optionGroup":"captions-1","optionName":"captions","streamId":"12345678-1234-1234-1234-123456789012","options":{"engine":"deepgram","sourceLanguage":"de","targetLanguages":"en, de"}}},"overlay":{"summary":"Overlay","value":{"optionGroup":"overlay-1","optionName":"overlay","streamId":"98765432-1234-2345-3456-456789012345","overlayTargetId":"98765432-1234-2345-3456-456789012346","options":{"delay":0,"watermark":"default","profile":"vtrans2-1280x720x2000x30"}}},"delay":{"summary":"Delay","value":{"optionGroup":"delay-1","optionName":"delay","streamId":"98765432-1234-2345-3456-456789012345","delayTargetId":"98765432-1234-2345-3456-456789012346","options":{"delay":10}}},"chroma_key":{"summary":"Chroma Key","value":{"optionGroup":"chroma_key-1","optionName":"chroma_key","streamId":"98765432-1234-2345-3456-456789012345","options":{"filter":"chromakey","color":"#00ff00","similarity":0.3,"blend":0.1,"targets":[{"streamId":"12345678-1234-1234-1234-123456789013","background":"my_background.mp4","foreground":"my_logo.png","foreground_position":"x=10:y=10"},{"streamId":"12345678-1234-1234-1234-123456789015","background":"my_other_background.mp4"}]}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/StreamOptionTypeNotSupportedError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/LiveCaptioningNotEnabled"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\n\nreq.query({\n  \"name\": \"SOME_STRING_VALUE\",\n  \"group\": \"SOME_STRING_VALUE\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/options');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'name' => 'SOME_STRING_VALUE',\n  'group' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\"\n\nquerystring = {\"name\":\"SOME_STRING_VALUE\",\"group\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?name=SOME_STRING_VALUE&group=SOME_STRING_VALUE\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"put":{"tags":["Stream Options"],"summary":"Modify existing stream options","operationId":"modifyStreamOptions","description":"Modifies an existing group of stream options of stream with `id`.\nThe options of that group are overwritten - means that the new options all need to be added to the request body, even if they were already created.\nThe options can be of types boolean, number or string.  \nUsed to set Live Captioning, Overlay, Delay, and Chroma Key.  \nFor more processing options see [Set live processing](#operation/processing).\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n\n\n## Live Captioning setup\nBy configuring live captioning options, you can set up the transcription or translation for your stream.\n\nTranscription is performed when **targetLanguages** matches **sourceLanguage**.  \nTranslation is performed when **targetLanguages** differs from **sourceLanguage**.  \nYou can specify both by adding the source language to the list of target languages.  \nBy default, transcription is set up for English.\nBy modifying the **sourceLanguage** and **targetLanguages** parameters, you can configure transcription and translation for other languages.  \nYou should set it up before you start ingesting the stream - the captions will then start being generated automatically at the beginning of your stream.\n\n### Required parameters\n\n* **name** (*string*)  \n  Must be set to `captions`.\n\n* **group** (*string*)  \n  Used to specify multiple groups of options on the same stream if supported.  \n  Must be set to `captions-1`. \n\n* **engine** (*string*)   \n  Captioning engine to use.  \n  Currently supported value: `deepgram`.\n\n### Optional parameters\n\n* **sourceLanguage** (*string*)  \n  Language code of the input audio.  \n  Defaults to `en`.\n\n* **targetLanguages** (*string*)  \n  Comma-separated list of one or more language codes used for transcription or translation.  \n  Example: `en,fr,de`.   \n  Defaults to `en`.\n\n### Supported Languages:\n\n  | Language | Language code | Deepgram |\n  | :---: | :---: | :---: |\n  | Arabic | ar, ar-AE, ar-SA, ar-QA, ar-KW, ar-SY, ar-LB, ar-PS, ar-JO, ar-EG, ar-SD, ar-TD, ar-MA, ar-DZ, ar-TN, ar-IQ, ar-IR | &check; |\n  | Belarusian | be | &check; |\n  | Bengali | bn | &check; |\n  | Bosnian | bs | &check; |\n  | Bulgarian | bg | &check; |\n  | Catalan | ca | &check; |\n  | Croatian | hr | &check; |\n  | Czech | cs | &check; |\n  | Danish | da, da-DK | &check; |\n  | Dutch | nl | &check; |\n  | English | en, en-US, en-AU, en-GB, en-IN, en-NZ | &check; |\n  | Estonian | et | &check; |\n  | Finnish | fi | &check; |\n  | Flemish | nl-BE | &check; |\n  | French | fr, fr-CA | &check; |\n  | German | de | &check; |\n  | German (Switzerland) | de-CH | &check; |\n  | Greek | el | &check; |\n  | Hebrew | he | &check; |\n  | Hindi | hi | &check; |\n  | Hungarian | hu | &check; |\n  | Indonesian | id | &check; |\n  | Italian | it | &check; |\n  | Japanese | ja | &check; |\n  | Kannada | kn | &check; |\n  | Korean | ko, ko-KR | &check; |\n  | Latvian | lv | &check; |\n  | Lithuanian | lt | &check; |\n  | Macedonian | mk | &check; |\n  | Malay | ms | &check; |\n  | Marathi | mr | &check; |\n  | Norwegian | no | &check; |\n  | Persian | fa | &check; |\n  | Polish | pl | &check; |\n  | Portuguese | pt, pt-BR, pt-PT | &check; |\n  | Romanian | ro | &check; |\n  | Russian | ru | &check; |\n  | Serbian | sr | &check; |\n  | Slovak | sk | &check; |\n  | Slovenian | sl | &check; |\n  | Spanish | es, es-419 | &check; |\n  | Swedish | sv, sv-SE | &check; |\n  | Tagalog | tl | &check; |\n  | Tamil | ta | &check; |\n  | Telugu | te | &check; |\n  | Turkish | tr | &check; |\n  | Ukrainian | uk | &check; |\n  | Urdu | ur | &check; |\n  | Vietnamese | vi | &check; |\n\n> **Note:** The source and target languages must not share the same base language. Localized variants are considered the same language (e.g., `es` and `es-419`, or `en` and `en-US`). The API will return error code `23013` if this rule is violated.\n\n## Overlay setup\nConfiguring overlay options creates **a new stream group** where both the overlay and an optional delay are applied. \nCheck `overlayTargetId` in the response - this is the stream group id where the overlay is applied.\n\n### Required parameters\n\n* **name** (*string*)  \n  Must be set to `overlay`.\n\n* **group** (*string*) \n  Used to specify multiple groups of options on the same stream if supported.   \n  Must be set to `overlay-1`.\n\n### Optional parameters\n\n * **delay** (*number*)  \n  Delay (in seconds) applied to the overlaid stream.  \n  Example: if **delay** is set to **10**, the stream with the overlay applied will be delayed by 10 seconds compared to the original stream.  \n  Allowed range: `0–60`.  \n  Defaults to `0`.\n\n* **watermark** (*string*)  \n  Name of the image file uploaded to the watermark manager that will be used as the overlay.\n  Only the file name should be provided, without the extension.  \n  Example: if the uploaded file is `my_watermark.png`, set watermark to `my_watermark`.\n  If not specified, the default watermark configured in the watermark manager is used.  \n  If not selecting a specific watermark, make sure a default watermark is configured, otherwise the overlay process will fail.  \n  Watermark manager is available in [studio](https://studio.nanostream.cloud/), where you can login with your usual dashboard account.\n\n* **profile** (*string*)  \n  Transcoding profile used to derive bitrate and fps (frames per second) for the passthrough of the overlaid stream group.\n  Available profiles can be listed using the **GET /transcoding_profiles** endpoint.\n  Only the bitrate and fps values are extracted from the profile.  \n  Example: using **vtrans2-1280x720x1200x25** applies a **bitrate** of **1200** and **fps** of **25**.  \n  Defaults to **bitrate**: `1000`, **fps**: `25`.\n\n\n## Delay setup\nConfiguring delay options creates **a new stream group** that is delayed relative to the original stream. \nCheck `delayTargetId` in the response - this is the stream group id where the delay is applied.\n\n### Required parameters\n\n* **name** (*string*)  \n  Must be set to `delay`.\n\n* **group** (*string*) \n  Used to specify multiple groups of options on the same stream if supported.   \n  Must be set to `delay-1`.\n\n* **delay** (*number*)  \n  Delay (in seconds) applied to the stream.  \n  Example: if **delay** is set to **10**, the stream with the delay applied will be delayed by 10 seconds compared to the original stream.  \n  Allowed range: `0–60`.\n\n\n## Chroma Key setup\nChroma key removes a single color, usually a green screen, from a live stream and places the presenter over a new background. The keying runs in the nanoStream Cloud pipeline. You send **one** green-screen ingest, and nanoStream delivers a finished, keyed stream to each **target**, with its own background and optional logo overlay. One ingest can feed up to 20 targets, for example one per brand or channel.\n\nBackgrounds can be an **MP4** video (loops automatically), a **PNG** or **JPG** image, or another **live stream**. Overlays are **PNG** files, usually with transparency. Upload them in **Backgrounds** in the browser-based [Chroma Setup Tuner](https://chromakey.nanocosmos.net/chroma-setup-tuner.html), which also offers the same setup and a live tuning preview. For the full workflow and tuning guide, see the [nanoStudio documentation](https://docs.nanocosmos.net/docs/nanostudio/chroma_key_getting_started).\n\nHow to use it:\n\n1. **Find the ingest stream.** The chroma key is set on the ingest stream, the one your green-screen video is sent to.\n\n2. **Change the chroma key option on the ingest stream.** Send the complete setup again: the existing `chroma_key-1` group is overwritten, so list all targets in `targets`, each with its background, and every optional parameter you want to keep (`filter`, `color`, `similarity`, `blend`, ...). The key settings are shared by all targets. To set up chroma key for the first time, use [Create stream options](#operation/createStreamOptions).\n\n3. **Publish the green-screen stream to the chroma key ingest server** with the ingest stream's stream key:\n\n   `rtmp://bintu-studio.nanocosmos.de/live`\n\n   Publishing to this server is what starts the chroma key. The keyed video is composited with each target's background and overlay, and delivered to the target streams. Your encoder only ever sends to the ingest, never to a target.\n\n> **Use the chroma key server.** If your encoder sends the stream key to another RTMP server, for example one copied from the Dashboard, the stream arrives but the chroma key doesn't start, and the targets stay black.\n\n> **One chroma key per stream.** A stream can have only one chroma key setup. Set it on the stream you ingest to, not on an output created by another option (such as the overlay or delay stream) or on a target of another chroma keyed stream.\n\n### Required parameters\n\n* **name** (*string*)  \n  Must be set to `chroma_key`.\n\n* **group** (*string*)  \n  Used to specify multiple groups of options on the same stream if supported.  \n  Must be set to `chroma_key-1`.\n\n* **targets** (*array*)  \n  1–20 target streams, one object each:  \n\n  * **streamId** (*string*, required) - ID of the target stream. Must be the UUID of an existing stream (the stream itself, not one of its transcoded renditions), unique within `targets`, and not the ID of the ingest stream.\n\n  * **background** (*string*, required) - background placed behind the presenter. Either the file name of an uploaded **MP4**, **PNG** or **JPG**, with extension, e.g. `my_background.mp4`, or the stream name or stream ID of another live stream. Use the same resolution as your camera (1280×720 or 1920×1080). MP4s should be H.264 at 3–5 Mbps and no more than 8 Mbps.\n\n  * **foreground** (*string*, optional) - overlay **PNG** (usually a transparent logo) placed on top of the keyed picture, e.g. `logo.png`. Uploaded in **Backgrounds** in the [Chroma Setup Tuner](https://chromakey.nanocosmos.net/chroma-setup-tuner.html).\n\n  * **foreground_position** (*string*, optional) - overlay position in pixels from the top-left corner, as `x=10:y=10`.\n\n  * **foreground_size** (*string*, optional) - overlay size in pixels, as `width:height`, e.g. `200:100`.\n\n### Optional parameters\n\n* **filter** (*string*)  \n  Keying filter: `chromakey` (RGB key color) or `hsvkey` (HSV key color).\n\n* **color** (*string*)  \n  Key color. For `chromakey` use `#RRGGBB`, e.g. `#00ff00`. For `hsvkey` use `h:s:v`, e.g. `120:1:1`.\n\n* **similarity** (*number*)  \n  How much of the color range around the key color is removed. `0–1`. Too low leaves patches of screen; too high cuts holes in the presenter.\n\n* **blend** (*number*)  \n  How softly the edge fades between presenter and background. `0–1`.\n\n* **bitrate** (*number*)  \n  Bitrate applied to all target streams.\n\n* **despill** (*string*)  \n  Removes the green or blue tint the screen reflects onto the presenter. `key=value:key=value`, e.g. `type=0:mix=0.5:enable=1`.  \n  Keys: `type` (0 = green, 1 = blue), `mix`, `expand`, `red`, `green`, `blue`, `brightness`, `alpha` (numbers), `enable` (`0` or `1`).\n\n* **eq** (*string*)  \n  Adjusts the presenter's picture after keying to match the background. `key=value:key=value`, e.g. `brightness=0.04:contrast=1.25`.  \n  Keys: `brightness` (`-1–1`), `contrast` (`-1000–1000`), `saturation` (`0–3`), `gamma`, `gamma_r`, `gamma_g`, `gamma_b` (`0.1–10`), `gamma_weight` (`0–1`), `eval` (`init` or `frame`), `enable` (`0` or `1`).\n\n* **stages** (*array of strings*)  \n  Up to 9 additional ffmpeg video filters, each as a filter string, e.g. `hue=s=1.2` (saturation) or `unsharp=3:3:0.5` (sharpen).\n","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["name","group","options"],"properties":{"name":{"type":"string","enum":["captions"]},"group":{"type":"string","enum":["captions-1"]},"options":{"$ref":"#/components/schemas/CaptionsOptions"}}},{"type":"object","required":["name","group","options"],"properties":{"name":{"type":"string","enum":["overlay"]},"group":{"type":"string","enum":["overlay-1"]},"options":{"$ref":"#/components/schemas/OverlayOptions"}}},{"type":"object","required":["name","group","options"],"properties":{"name":{"type":"string","enum":["delay"]},"group":{"type":"string","enum":["delay-1"]},"options":{"$ref":"#/components/schemas/DelayOptions"}}},{"type":"object","required":["name","group","options"],"properties":{"name":{"type":"string","enum":["chroma_key"]},"group":{"type":"string","enum":["chroma_key-1"]},"options":{"$ref":"#/components/schemas/ChromaKeyOptions"}}}]},"examples":{"captions":{"summary":"Live Captions","value":{"name":"captions","group":"captions-1","options":{"engine":"deepgram","sourceLanguage":"en","targetLanguages":"en, de"}}},"overlay":{"summary":"Overlay","value":{"name":"overlay","group":"overlay-1","options":{"delay":0,"watermark":"my_overlay","profile":"vtrans2-1280x720x2000x30"}}},"delay":{"summary":"Delay","value":{"name":"delay","group":"delay-1","options":{"delay":20}}},"chroma_key":{"summary":"Chroma Key","value":{"name":"chroma_key","group":"chroma_key-1","options":{"filter":"chromakey","color":"#00ff00","similarity":0.3,"blend":0.1,"eq":"brightness=0.04:contrast=1.25","targets":[{"streamId":"12345678-1234-1234-1234-123456789013","background":"my_background.mp4","foreground":"my_logo.png","foreground_position":"x=10:y=10","foreground_size":"200:100"},{"streamId":"12345678-1234-1234-1234-123456789015","background":"my_other_background.mp4"}]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","oneOf":[{"type":"object","properties":{"optionName":{"type":"string","enum":["captions"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"options":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"engine":{"type":"string","enum":["deepgram"]}}},{"type":"object","properties":{"id":{"type":"string"},"sourceLanguage":{"type":"string"}}},{"type":"object","properties":{"id":{"type":"string"},"targetLanguages":{"type":"string"}}}]}}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["overlay"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"overlayTargetId":{"type":"string"},"options":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delay":{"type":"number"}}},{"type":"object","properties":{"id":{"type":"string"},"watermark":{"type":"string"}}},{"type":"object","properties":{"id":{"type":"string"},"profile":{"type":"string"}}}]}}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["delay"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"delayTargetId":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"delay":{"type":"number"}}}}}},{"type":"object","properties":{"optionName":{"type":"string","enum":["chroma_key"]},"optionGroup":{"type":"string"},"streamId":{"type":"string"},"options":{"type":"array","items":{"type":"object","description":"One item per option. Each item has an `id` and one option key, e.g. `color`, `filter`, `similarity`, `streamId_1`, `background_1`, `stage_1`.","properties":{"id":{"type":"string"}}}}}}]},"examples":{"captions":{"summary":"Live captions","value":{"optionGroup":"captions-1","optionName":"captions","streamId":"12345678-1234-1234-1234-123456789012","options":[{"id":"12345678-1234-1234-1234-123456789012","engine":"deepgram"},{"id":"12345678-1234-1234-1234-123456789013","sourceLanguage":"en"},{"id":"12345678-1234-1234-1234-123456789014","targetLanguages":"en, de"}]}},"overlay":{"summary":"Overlay","value":{"optionGroup":"overlay-1","optionName":"overlay","streamId":"12345678-1234-1234-1234-123456789012","overlayTargetId":"12345678-1234-1234-1234-123456789013","options":[{"id":"12345678-1234-1234-1234-123456789012","delay":0},{"id":"12345678-1234-1234-1234-123456789013","watermark":"my_watermark"},{"id":"12345678-1234-1234-1234-123456789014","profile":"vtrans2-1280x720x2000x30"}]}},"delay":{"summary":"Delay","value":{"optionGroup":"delay-1","optionName":"delay","streamId":"12345678-1234-1234-1234-123456789012","delayTargetId":"12345678-1234-1234-1234-123456789013","options":[{"id":"12345678-1234-1234-1234-123456789012","delay":20}]}},"chroma_key":{"summary":"Chroma Key","value":{"optionGroup":"chroma_key-1","optionName":"chroma_key","streamId":"12345678-1234-1234-1234-123456789012","options":[{"id":"12345678-1234-1234-1234-123456789020","filter":"chromakey"},{"id":"12345678-1234-1234-1234-123456789021","color":"#00ff00"},{"id":"12345678-1234-1234-1234-123456789022","similarity":0.3},{"id":"12345678-1234-1234-1234-123456789023","streamId_1":"12345678-1234-1234-1234-123456789013"},{"id":"12345678-1234-1234-1234-123456789024","background_1":"my_background.mp4"},{"id":"12345678-1234-1234-1234-123456789025","foreground_1":"my_logo.png"},{"id":"12345678-1234-1234-1234-123456789026","foreground_position_1":"x=10:y=10"},{"id":"12345678-1234-1234-1234-123456789027","foreground_size_1":"200:100"},{"id":"12345678-1234-1234-1234-123456789028","streamId_2":"12345678-1234-1234-1234-123456789015"},{"id":"12345678-1234-1234-1234-123456789029","background_2":"my_other_background.mp4"}]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/StreamOptionNameNotSupportedError"},{"$ref":"#/components/schemas/StreamOptionTypeNotSupportedError"},{"$ref":"#/components/schemas/LiveCaptionsBadRequestError"},{"$ref":"#/components/schemas/LiveCaptionsEngineNotSupported"},{"$ref":"#/components/schemas/LiveCaptionsSourceTargetLanguageConflict"},{"$ref":"#/components/schemas/StreamOptionKeyNotSupported"},{"$ref":"#/components/schemas/InvalidValueError"},{"$ref":"#/components/schemas/StreamOptionsMissingRequiredError"},{"$ref":"#/components/schemas/PropertyIsOutsideAllowedLimits"},{"$ref":"#/components/schemas/StreamIdMustBeValidUuid"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/LiveCaptioningNotEnabled"},{"$ref":"#/components/schemas/StreamGroupIsASubGroup"},{"$ref":"#/components/schemas/DelayIsOutsideAllowedLimits"},{"$ref":"#/components/schemas/TargetStreamIdCantBeTheSameAsMainStreamId"},{"$ref":"#/components/schemas/StreamIdMustBeStreamGroupId"},{"$ref":"#/components/schemas/NumberOfTargetsIsOutsideAllowedLimits"},{"$ref":"#/components/schemas/StreamIdsMustBeUnique"},{"$ref":"#/components/schemas/ColorOptionisNotValidHexColor"},{"$ref":"#/components/schemas/ColorOptionisNotValidHSVColor"},{"$ref":"#/components/schemas/FilterNotSupported"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/StreamOptionGroupNotFoundError"},{"$ref":"#/components/schemas/VTransProfileNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/stream/%7Bid%7D/options \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"captions\",\"group\":\"captions-1\",\"options\":{\"engine\":\"deepgram\",\"sourceLanguage\":\"en\",\"targetLanguages\":\"en,de\"}}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/stream/%7Bid%7D/options\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"captions\\\",\\\"group\\\":\\\"captions-1\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"name\\\":\\\"captions\\\",\\\"group\\\":\\\"captions-1\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"name\": \"captions\",\n  \"group\": \"captions-1\",\n  \"options\": {\n    \"engine\": \"deepgram\",\n    \"sourceLanguage\": \"en\",\n    \"targetLanguages\": \"en,de\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"name\": \"captions\",\n  \"group\": \"captions-1\",\n  \"options\": {\n    \"engine\": \"deepgram\",\n    \"sourceLanguage\": \"en\",\n    \"targetLanguages\": \"en,de\"\n  }\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"name\":\"captions\",\"group\":\"captions-1\",\"options\":{\"engine\":\"deepgram\",\"sourceLanguage\":\"en\",\"targetLanguages\":\"en,de\"}}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/options');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"name\\\":\\\"captions\\\",\\\"group\\\":\\\"captions-1\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/stream/%7Bid%7D/options\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\"\n\npayload = {\n    \"name\": \"captions\",\n    \"group\": \"captions-1\",\n    \"options\": {\n        \"engine\": \"deepgram\",\n        \"sourceLanguage\": \"en\",\n        \"targetLanguages\": \"en,de\"\n    }\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"name\\\":\\\"captions\\\",\\\"group\\\":\\\"captions-1\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"name\": \"captions\",\n  \"group\": \"captions-1\",\n  \"options\": [\n    \"engine\": \"deepgram\",\n    \"sourceLanguage\": \"en\",\n    \"targetLanguages\": \"en,de\"\n  ]\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"captions\\\",\\\"group\\\":\\\"captions-1\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"name\\\":\\\"captions\\\",\\\"group\\\":\\\"captions-1\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"name\\\":\\\"captions\\\",\\\"group\\\":\\\"captions-1\\\",\\\"options\\\":{\\\"engine\\\":\\\"deepgram\\\",\\\"sourceLanguage\\\":\\\"en\\\",\\\"targetLanguages\\\":\\\"en,de\\\"}}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"delete":{"tags":["Stream Options"],"summary":"Delete a stream option of a group","description":"Deletes an existing group of stream options of stream with `id`.\nOnly a specified group will be removed.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/optionGroupRequired"}],"responses":{"204":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/ParameterRequiredError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/LiveCaptioningNotEnabled"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StreamNotFoundError"},{"$ref":"#/components/schemas/StreamOptionGroupNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url 'https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.delete(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"DELETE\", \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\");\n\nreq.query({\n  \"group\": \"SOME_STRING_VALUE\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/stream/%7Bid%7D/options');\n$request->setRequestMethod('DELETE');\n$request->setQuery(new http\\QueryString([\n  'group' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"DELETE\", \"/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options\"\n\nquerystring = {\"group\":\"SOME_STRING_VALUE\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"DELETE\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\");\nvar request = new RestRequest(Method.DELETE);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Delete,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/stream/%7Bid%7D/options?group=SOME_STRING_VALUE\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/tag":{"get":{"tags":["Tag"],"summary":"Tag Collection","description":"Ability to list all existing tags in your organisation.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Tag Collection","parameters":[{"$ref":"#/components/parameters/tags"},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"id":"e92471df-9ddd-4d86-9bc4-a23c812d6b83","tag":"webrtc","created_at":"2016-04-13T15:36:01.852Z"},{"id":"125f1dcb-32a9-44bd-819a-ab8a730262fb","tag":"ios","created_at":"2016-04-13T18:09:04.270Z"},{"id":"6a88792d-a451-40a1-9dac-2ef006e8a4fb","tag":"title:cdn","created_at":"2016-04-13T18:09:04.276Z"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WrongDataTypeError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TagNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/tag\");\n\nreq.query({\n  \"tags[]\": \"foo_tag\",\n  \"limit\": \"20\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/tag');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'tags[]' => 'foo_tag',\n  'limit' => '20'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/tag?tags%5B%5D=foo_tag&limit=20\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/tag\"\n\nquerystring = {\"tags[]\":\"foo_tag\",\"limit\":\"20\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/tag?tags%5B%5D=foo_tag&limit=20\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"put":{"tags":["Tag"],"summary":"Edit Tag","description":"Ability to edit an existing tag. Changing a tag that is used on multiple streams, will be changed on all instances.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"Edit Tag","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"old":{"type":"string"},"new":{"type":"string"}},"example":{"old":"my old tag","new":"my new awesome tag"}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"e89abc86-1717-422a-b521-ba9258452342","tag":"my new awesome tag","createdAt":"2019-08-21T12:02:53.455Z","updatedAt":"2019-08-27T05:14:21.711Z","OrganisationId":"3fbacae7-3725-4054-a489-ba947c756d81"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/TagTooLongError"},{"$ref":"#/components/schemas/TagAlreadyExistsError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TagNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/tag \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"old\":\"my old tag\",\"new\":\"my new awesome tag\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/tag\"\n\n\tpayload := strings.NewReader(\"{\\\"old\\\":\\\"my old tag\\\",\\\"new\\\":\\\"my new awesome tag\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/tag\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"old\\\":\\\"my old tag\\\",\\\"new\\\":\\\"my new awesome tag\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"old\": \"my old tag\",\n  \"new\": \"my new awesome tag\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/tag\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/tag\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"old\": \"my old tag\",\n  \"new\": \"my new awesome tag\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"old\":\"my old tag\",\"new\":\"my new awesome tag\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/tag');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"old\\\":\\\"my old tag\\\",\\\"new\\\":\\\"my new awesome tag\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/tag\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/tag\"\n\npayload = {\n    \"old\": \"my old tag\",\n    \"new\": \"my new awesome tag\"\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/tag\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"old\\\":\\\"my old tag\\\",\\\"new\\\":\\\"my new awesome tag\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"old\": \"my old tag\",\n  \"new\": \"my new awesome tag\"\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/tag\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/tag\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"old\\\":\\\"my old tag\\\",\\\"new\\\":\\\"my new awesome tag\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/tag\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"old\\\":\\\"my old tag\\\",\\\"new\\\":\\\"my new awesome tag\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/tag\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"old\\\":\\\"my old tag\\\",\\\"new\\\":\\\"my new awesome tag\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"post":{"tags":["Tag"],"summary":"Create Tag","description":"Ability to create a new tag.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"Create Tag","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tag"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"b33e2b6e-e4ad-4c73-95e4-88c649d48cc6","tag":"foo","created_at":"2016-04-14T17:03:30.443Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TagAlreadyExistsError"},{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/TagTooLongError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/DataNotFoundForCreationError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/tag \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"tag\":\"foo\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/tag\"\n\n\tpayload := strings.NewReader(\"{\\\"tag\\\":\\\"foo\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/tag\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"tag\\\":\\\"foo\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"tag\": \"foo\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/tag\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/tag\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"tag\": \"foo\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"tag\":\"foo\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/tag');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"tag\\\":\\\"foo\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/tag\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/tag\"\n\npayload = {\"tag\": \"foo\"}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/tag\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"tag\\\":\\\"foo\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"tag\": \"foo\"] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/tag\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/tag\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"tag\\\":\\\"foo\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/tag\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"tag\\\":\\\"foo\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/tag\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"tag\\\":\\\"foo\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"delete":{"tags":["Tag"],"summary":"Delete Tag","description":"Ability to delete a tag. **Important:** If a tag is in use on an active stream, delete will be rejected. It is still possible to delete this tag with `force`\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Delete Tag","parameters":[{"$ref":"#/components/parameters/tag"},{"$ref":"#/components/parameters/force"}],"responses":{"200":{"description":"OK","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TagAttachedToStreamError"},{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TagNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/DataNotFoundForCreationError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url 'https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.delete(\"https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"DELETE\", \"https://bintu.nanostream.cloud/tag\");\n\nreq.query({\n  \"tag\": \"delete_this_tag\",\n  \"force\": \"false\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/tag');\n$request->setRequestMethod('DELETE');\n$request->setQuery(new http\\QueryString([\n  'tag' => 'delete_this_tag',\n  'force' => 'false'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"DELETE\", \"/tag?tag=delete_this_tag&force=false\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/tag\"\n\nquerystring = {\"tag\":\"delete_this_tag\",\"force\":\"false\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"DELETE\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false\");\nvar request = new RestRequest(Method.DELETE);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Delete,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/tag?tag=delete_this_tag&force=false\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/tag/recently_used":{"get":{"tags":["Tag"],"summary":"Recently Used","description":"Shows a list of all tags used in the past **90** days.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Recently Used","parameters":[{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"id":"e92471df-9ddd-4d86-9bc4-a23c812d6b83","tag":"webrtc","created_at":"2016-04-13T15:36:01.852Z"},{"id":"125f1dcb-32a9-44bd-819a-ab8a730262fb","tag":"ios","created_at":"2016-04-13T18:09:04.270Z"},{"id":"6a88792d-a451-40a1-9dac-2ef006e8a4fb","tag":"title:cdn","created_at":"2016-04-13T18:09:04.276Z"}]}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TagNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/tag/recently_used\");\n\nreq.query({\n  \"from\": \"2019-08-15T11:03:51.466Z\",\n  \"to\": \"2019-08-25T10:13:31.526Z\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/tag/recently_used');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'from' => '2019-08-15T11:03:51.466Z',\n  'to' => '2019-08-25T10:13:31.526Z'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/tag/recently_used\"\n\nquerystring = {\"from\":\"2019-08-15T11:03:51.466Z\",\"to\":\"2019-08-25T10:13:31.526Z\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/tag/recently_used?from=2019-08-15T11%3A03%3A51.466Z&to=2019-08-25T10%3A13%3A31.526Z\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/apikey":{"post":{"tags":["API Key"],"summary":"Validate Api Key","description":"Ability to check if the given apikey is valid.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Validate Api Key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apikey"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"key":"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d","created_at":"2022-11-14T13:02:12.505Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/ParameterNotUniqueError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/OrganisationNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/apikey \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"apikey\":\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/apikey\"\n\n\tpayload := strings.NewReader(\"{\\\"apikey\\\":\\\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/apikey\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"apikey\\\":\\\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"apikey\": \"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/apikey\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/apikey\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"apikey\": \"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"apikey\":\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/apikey');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"apikey\\\":\\\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/apikey\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/apikey\"\n\npayload = {\"apikey\": \"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\"}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/apikey\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"apikey\\\":\\\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"apikey\": \"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\"] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/apikey\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/apikey\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"apikey\\\":\\\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/apikey\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"apikey\\\":\\\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/apikey\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"apikey\\\":\\\"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/metrickey":{"get":{"tags":["Metric Key"],"summary":"Get Metric Keys","description":"Ability to get metric key from a specified stream.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"Get Metric Keys","responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"account":"test1","key":"tes4HudwIkG8XdDl","active":false},{"account":"test2","key":"tes4sJkm965sBksI","active":false}]}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MetricKeyNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/OrganisationNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://bintu.nanostream.cloud/metrickey \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/metrickey\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/metrickey\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/metrickey\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/metrickey\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/metrickey');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/metrickey\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/metrickey\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/metrickey\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/metrickey\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/metrickey\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/metrickey\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/metrickey\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/organisation":{"get":{"tags":["Organisation"],"summary":"Organisation Info","description":"Ability to get all information of the organisation.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Organisation Info","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","name":"nano","isEnabled":true,"created_at":"2022-11-14T13:02:12.422Z","reopened_at":null,"playerKey":"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d","webhook":null,"vod":false,"publicVOD":true,"default_stream_type":null,"webrtc":false,"transcoding":false,"h5live":false,"hash":"hO4SZ","hls":true,"secure":false,"metrics":null,"sla":null,"trial":false,"metadata":false,"meetEnabled":false,"customStreamnames":false,"streamguard":false,"allowedTranscodes":-1,"allowedOpcodes":["thumbs","motionclip"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrganisationIsNotEnabledError"},{"$ref":"#/components/schemas/AccessDeniedError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrganisationNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://bintu.nanostream.cloud/organisation \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/organisation\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/organisation\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/organisation\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/organisation\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/organisation');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/organisation\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/organisation\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/organisation\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/organisation\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/organisation\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/organisation\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/organisation\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/organisation/vod":{"put":{"tags":["Organisation"],"summary":"hide VOD","description":"Ability to hide VODs from public access. By default, VODs are publicly accessible.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"hide VOD","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"publicVod":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","name":"nano","isEnabled":true,"created_at":"2022-06-02T13:21:21.996Z","reopened_at":null,"playerKey":"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d","webhook":null,"vod":false,"publicVOD":false,"default_stream_type":null,"webrtc":false,"transcoding":false,"h5live":false,"hash":"5UwiN","hls":true,"secure":false,"metrics":null,"sla":null,"trial":false,"metadata":false,"meetEnabled":false,"customStreamnames":false,"streamguard":false,"allowedTranscodes":-1,"allowedOpcodes":["thumbs","motionclip"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrganisationIsNotEnabledError"},{"$ref":"#/components/schemas/AccessDeniedError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OrganisationNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/organisation/vod \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"publicVod\":true}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/organisation/vod\"\n\n\tpayload := strings.NewReader(\"{\\\"publicVod\\\":true}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/organisation/vod\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"publicVod\\\":true}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"publicVod\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/organisation/vod\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/organisation/vod\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"publicVod\": true\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"publicVod\":true}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/organisation/vod');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"publicVod\\\":true}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/organisation/vod\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/organisation/vod\"\n\npayload = {\"publicVod\": True}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/organisation/vod\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"publicVod\\\":true}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"publicVod\": true] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/organisation/vod\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/organisation/vod\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"publicVod\\\":true}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/organisation/vod\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"publicVod\\\":true}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/organisation/vod\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"publicVod\\\":true}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/organisation/webhook":{"put":{"tags":["Organisation"],"summary":"Set Webhook","description":"Ability to enable third party control (ingest or playback) when implemented in the right way. **Important:** Server accepts only 200 status code, everything else will be rejected.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Set Webhook","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"webhook":{"type":"integer"}},"example":null}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","name":"nano","isEnabled":true,"created_at":"2022-06-02T13:21:21.996Z","reopened_at":null,"playerKey":"OGvhN2a5hQCCuMh5Fb8IVWGzb0kMyl7dw1Ir7d","webhook":null,"vod":false,"publicVOD":true,"default_stream_type":null,"webrtc":false,"transcoding":false,"h5live":false,"hash":"5UwiN","hls":true,"secure":false,"metrics":null,"sla":null,"trial":false,"metadata":false,"meetEnabled":false,"customStreamnames":false,"streamguard":false,"allowedTranscodes":-1,"allowedOpcodes":["thumbs","motionclip"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WebhookRejectedError"},{"$ref":"#/components/schemas/AccessDeniedError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WebhookUnreachableError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/organisation/webhook \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"webhook\":null}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/organisation/webhook\"\n\n\tpayload := strings.NewReader(\"{\\\"webhook\\\":null}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/organisation/webhook\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"webhook\\\":null}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"webhook\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/organisation/webhook\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/organisation/webhook\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"webhook\": null\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"webhook\":null}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/organisation/webhook');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"webhook\\\":null}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/organisation/webhook\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/organisation/webhook\"\n\npayload = {\"webhook\": None}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/organisation/webhook\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"webhook\\\":null}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"webhook\": ] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/organisation/webhook\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/organisation/webhook\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"webhook\\\":null}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/organisation/webhook\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"webhook\\\":null}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/organisation/webhook\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"webhook\\\":null}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/user":{"get":{"tags":["User"],"summary":"User Info","description":"Ability to list all the users in an organisation.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &cross; |\n","operationId":"User Info","responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"id":"7af8c490-ee5e-419b-9a21-539d4d78f3c4","email":"1@nanocosmos.de","created_at":"2016-03-15T19:10:40.114Z","tokenKey":"wFmRxDh1","permission":"nanoAdmin"},{"id":"e82d5ea6-3e7d-486c-8383-3728e058fab5","email":"2@nanocosmos.de","created_at":"2016-04-13T15:35:53.170Z","tokenKey":"5BbXBJV1","permission":"nanoUser"},{"id":"d76b4f9f-a24c-434e-b23f-46457fac6aec","email":"3@nanocosmos.de","created_at":"2016-04-13T15:37:43.919Z","tokenKey":"cfhQHVdN","permission":"nanoReadOnly"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCredentialsNotValidError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://bintu.nanostream.cloud/user \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/user\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/user\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/user\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/user\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/user');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/user\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/user\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/user\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/user\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/user\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/user\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/user\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"post":{"tags":["User"],"summary":"Create User","description":"Ability to create a new user in the organisation.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Create User","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14","email":"example@nanocosmos.de","created_at":"2016-04-14T17:54:40.603Z","organisation":{"id":"0e55c5f4-e952-4d37-b9e0-017c5f6e196c","name":"nanocosmos","isEnabled":false,"created_at":"2016-04-14T17:54:40.514Z"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/ParameterNotUniqueError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/InvalidValueError"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCredentialsNotValidError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AccessDeniedError"},{"$ref":"#/components/schemas/UrlInOrganisationName"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/user \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"example@nanocosmos.de\",\"password\":\"password\",\"organisation\":\"nanocosmos\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/user\"\n\n\tpayload := strings.NewReader(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"organisation\\\":\\\"nanocosmos\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/user\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"organisation\\\":\\\"nanocosmos\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"organisation\": \"nanocosmos\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/user\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/user\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"organisation\": \"nanocosmos\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"email\":\"example@nanocosmos.de\",\"password\":\"password\",\"organisation\":\"nanocosmos\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/user');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"organisation\\\":\\\"nanocosmos\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/user\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/user\"\n\npayload = {\n    \"email\": \"example@nanocosmos.de\",\n    \"password\": \"password\",\n    \"organisation\": \"nanocosmos\"\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/user\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"organisation\\\":\\\"nanocosmos\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"organisation\": \"nanocosmos\"\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/user\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/user\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"organisation\\\":\\\"nanocosmos\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/user\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"organisation\\\":\\\"nanocosmos\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/user\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"organisation\\\":\\\"nanocosmos\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"delete":{"tags":["User"],"summary":"Delete User","description":"Ability to delete a user in the organisation. **Attention:** Access to this route is restricted to organisation administrators, requiring an API key or JWT token with `nanoAdmin` permissions.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Delete User","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/userId"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"success":true},"schema":{"type":"object","properties":{"id":{"type":"string","example":"ab871b26-b5ec-46df-a72f-8c7212b2abad"},"streamgroup":{"type":"string","example":"ab871b26-b5ec-46df-a72f-8c7212b2abad"},"state":{"type":"string","example":"created"},"type":{"type":"string","example":"low-latency"},"created_at":{"type":"string","example":"2023-09-14T09:51:22.354Z"},"ingested_at":{"type":"string","example":null},"updated_at":{"type":"string","example":"2023-09-14T09:51:22.405Z"},"timecode":{"type":"boolean","example":false},"timecode_interval":{"type":"integer","example":1000},"opcode":{"type":"string","example":null},"processing":{"type":"array","items":{"type":"object"},"example":[{"id":"rec","duration":null},{"id":"replay","duration":null},{"id":"thumbs","interval":10},{"id":null,"interval":30,"duration":5,"format":"gif"}]},"webrtc":{"type":"boolean","example":false},"transcoding":{"type":"boolean","example":false},"pushUrl":{"type":"string","example":null},"rtmpPlayoutCount":{"type":"integer","example":0},"tags":{"type":"array","items":{"type":"string"},"example":["michale","clara","robin","tony"]},"ingest":{"type":"object","properties":{"rtmp":{"type":"object","properties":{"url":{"type":"string","example":"rtmp://KKGfV-yLx61.vtrans.glb.nanocosmos.de/live"},"streamname":{"type":"string","example":"KKGfV-yLx61"}}}}},"playout":{"type":"object","properties":{"h5live":{"type":"array","items":{"type":"object"}},"rtmp":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"streamname":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"index":{"type":"integer"}}},"example":[{"url":"rtmp://bintu-play.nanocosmos.de:1935/play","streamname":"KKGfV-yLx61","type":"live","id":"ab871b26-b5ec-46df-a72f-8c7212b2abad","index":0},{"url":"rtmp://bintu-play.nanocosmos.de:1935/play","streamname":"KKGfV-fdjmZ","type":"live","id":"5b41d97e-2fbc-4cf7-acd1-52ba6fa94e55","index":1}]},"web":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"index":{"type":"integer"}}},"example":[{"url":"https://localhost:443/playout/ab871b26-b5ec-46df-a72f-8c7212b2abad","type":"live","id":"ab871b26-b5ec-46df-a72f-8c7212b2abad","index":0},{"url":"https://localhost:443/playout/5b41d97e-2fbc-4cf7-acd1-52ba6fa94e55","type":"live","id":"5b41d97e-2fbc-4cf7-acd1-52ba6fa94e55","index":1}]},"hls":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"},"index":{"type":"integer"}}},"example":[{"url":"https://bintu-play.nanocosmos.de:443/hls/KKGfV-yLx61/index.m3u8","type":"live","id":"ab871b26-b5ec-46df-a72f-8c7212b2abad","index":0},{"url":"https://bintu-play.nanocosmos.de:443/hls/KKGfV-fdjmZ/index.m3u8","type":"live","id":"5b41d97e-2fbc-4cf7-acd1-52ba6fa94e55","index":1}]}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/InvalidValueError"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCredentialsNotValidError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DeleteLastUserError"},{"$ref":"#/components/schemas/AccessDeniedError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://bintu.nanostream.cloud/user \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"userId\":\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/user\"\n\n\tpayload := strings.NewReader(\"{\\\"userId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\")\n\n\treq, _ := http.NewRequest(\"DELETE\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.delete(\"https://bintu.nanostream.cloud/user\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"userId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"userId\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://bintu.nanostream.cloud/user\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"DELETE\", \"https://bintu.nanostream.cloud/user\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"userId\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"userId\":\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/user');\n$request->setRequestMethod('DELETE');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"userId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"DELETE\", \"/user\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/user\"\n\npayload = {\"userId\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"DELETE\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/user\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"userId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"userId\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/user\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"DELETE\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/user\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"userId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/user\");\nvar request = new RestRequest(Method.DELETE);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"userId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Delete,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/user\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"userId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/user/validate":{"post":{"tags":["User"],"summary":"Validate Credentials (Login)","description":"Ability to validate the credentials of a user in the organisation. The response contains an access token (JWT) which allows access to the api for a limited time (24h). This applies to all access levels of the organisation (`nanoAdmin`, `nanoUser`, `nanoReadOnly`). If it is a user with the access level `nanoAdmin`, the organisation's APIKey is also part of the response.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Validate Credentials","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserValidate"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"success":true,"apiKey":"BcUEF38jXJxDWhSOn7BcdBj5wT","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"},{"$ref":"#/components/schemas/JWTErrorResponse"},{"$ref":"#/components/schemas/JWTServiceNotReachableError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/user/validate \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"example@nanocosmos.de\",\"password\":\"password\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/user/validate\"\n\n\tpayload := strings.NewReader(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/user/validate\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/user/validate\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/user/validate\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"email\":\"example@nanocosmos.de\",\"password\":\"password\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/user/validate');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/user/validate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/user/validate\"\n\npayload = {\n    \"email\": \"example@nanocosmos.de\",\n    \"password\": \"password\"\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/user/validate\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\"\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/user/validate\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/user/validate\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/user/validate\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/user/validate\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/user/password":{"put":{"tags":["User"],"summary":"Set Password","description":"Ability to set a password for a user in the organisation.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Set Password","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPasswordToken"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"0e6e4313-561c-4fef-b31d-5bfc65bb5993","email":"test@nanocosmos.de","created_at":"2016-04-14T17:54:40.603Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCredentialsNotValidError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"},{"$ref":"#/components/schemas/PasswordTokenNotFound"}]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PasswordTokenExpiredError"},{"$ref":"#/components/schemas/PasswordTokenAlreadyRedeemedError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/user/password \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"example@nanocosmos.de\",\"password\":\"password\",\"token\":\"iIsInR5c\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/user/password\"\n\n\tpayload := strings.NewReader(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/user/password\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"token\": \"iIsInR5c\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/user/password\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/user/password\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"token\": \"iIsInR5c\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"email\":\"example@nanocosmos.de\",\"password\":\"password\",\"token\":\"iIsInR5c\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/user/password');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/user/password\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/user/password\"\n\npayload = {\n    \"email\": \"example@nanocosmos.de\",\n    \"password\": \"password\",\n    \"token\": \"iIsInR5c\"\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/user/password\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"token\": \"iIsInR5c\"\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/user/password\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/user/password\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/user/password\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/user/password\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"post":{"tags":["User"],"summary":"Reset Password","description":"Ability to reset the password of a user in the organisation. Always returns `200` status code.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Reset Password","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":[{"email":null,"type":"string","required":true,"example":{"email":"example@nanocosmos.de"}}]}}}},"responses":{"200":{"description":"OK","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/user/password \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"0\":{\"email\":\"example@nanocosmos.de\"}}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/user/password\"\n\n\tpayload := strings.NewReader(\"{\\\"0\\\":{\\\"email\\\":\\\"example@nanocosmos.de\\\"}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/user/password\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"0\\\":{\\\"email\\\":\\\"example@nanocosmos.de\\\"}}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"0\": {\n    \"email\": \"example@nanocosmos.de\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/user/password\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/user/password\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"0\": {\n    \"email\": \"example@nanocosmos.de\"\n  }\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"0\":{\"email\":\"example@nanocosmos.de\"}}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/user/password');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"0\\\":{\\\"email\\\":\\\"example@nanocosmos.de\\\"}}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/user/password\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/user/password\"\n\npayload = {\"0\": {\"email\": \"example@nanocosmos.de\"}}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/user/password\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"0\\\":{\\\"email\\\":\\\"example@nanocosmos.de\\\"}}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"0\": [\"email\": \"example@nanocosmos.de\"]] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/user/password\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/user/password\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"0\\\":{\\\"email\\\":\\\"example@nanocosmos.de\\\"}}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/user/password\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"0\\\":{\\\"email\\\":\\\"example@nanocosmos.de\\\"}}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/user/password\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"0\\\":{\\\"email\\\":\\\"example@nanocosmos.de\\\"}}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/user/tokenkey":{"put":{"tags":["User"],"summary":"Update User Token Key","description":"A `tokenKey` is a unique and user bound property. The `tokenKey` is automatically renewed on every user role change, but you can also manually renew it if an access token (`JWT`) is accidentally exposed to invalidate them.\n\n**Attention:**\nRenewing a users `tokenKey` will **invalidate all previously created access tokens** (`JWT`).\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","example":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","example":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14"},"email":{"type":"string","example":"example@nanocosmos.de"},"created_at":{"type":"string","format":"date-time","example":"2024-05-28T10:33:40.937Z"},"tokenKey":{"type":"string","example":"h4b7t3r6"}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/user/tokenkey \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"user\":\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/user/tokenkey\"\n\n\tpayload := strings.NewReader(\"{\\\"user\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/user/tokenkey\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"user\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"user\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/user/tokenkey\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/user/tokenkey\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"user\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"user\":\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/user/tokenkey');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"user\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/user/tokenkey\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/user/tokenkey\"\n\npayload = {\"user\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/user/tokenkey\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"user\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"user\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\"] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/user/tokenkey\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/user/tokenkey\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"user\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/user/tokenkey\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"user\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/user/tokenkey\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"user\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/user/permission":{"put":{"tags":["User"],"summary":"Update user role","description":"Increase or lower the permissions of an user from your organisation by changing the associated user role.\n\n**Attention:**\nWhile changing the role of a user, **all former access tokens (`JWTs`)** created with the previous role **will be invalidated!** This ensures that a user cannot perform actions permitted in their previous role but not included in their newly assigned role. **Secure playback tokens (`splay`) are not affected and will stay valid.**\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"UserId":{"type":"string","example":"9d9dc062-2bdc-4bee-8bef-4c56b9953b14"},"permissionProfile":{"type":"string","example":"nanoAdmin"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"ebddce96-907c-4080-b90b-8b6aa076c7b9","email":"example@example.net","created_at":"2024-04-12T13:23:05.773Z","tokenKey":"0s4fe71t","bintu_permission":{"inviteToken":{"create":true,"list":true},"metricKey":{"get":true},"organisation":{"get":true,"setVod":true,"setWebhook":true},"stream":{"getStreamListCount":true,"getAllStreamStatesCount":true,"validateStream":true,"getStreams":true,"createStream":true,"getStreamgroups":true,"getStreamgroupsCount":true,"deleteStreams":true},"streamWithId":{"getStream":true,"getStreamGroup":true,"setTag":true,"setPushUrl":true,"setTranscodingProfile":true,"setOpcode":null,"setTimecode":true,"addTranscode":true,"deleteStream":true,"removeTranscode":true,"stopIngest":true,"unlockStream":true},"tag":{"getTags":true,"getRecentlyUsedTags":true,"createTag":true,"editTag":true,"deleteTag":true},"transcoding_profiles":{"getTranscodingProfiles":true},"user":{"getUser":true,"deleteUser":true,"renewUserTokenKey":true,"changeUserPermissions":true,"getPermissions":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/ApiKeyNotFoundError"}]}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://bintu.nanostream.cloud/user/permission \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"UserId\":\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\"permissionProfile\":\"nanoAdmin\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/user/permission\"\n\n\tpayload := strings.NewReader(\"{\\\"UserId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"permissionProfile\\\":\\\"nanoAdmin\\\"}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.put(\"https://bintu.nanostream.cloud/user/permission\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"UserId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"permissionProfile\\\":\\\"nanoAdmin\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"UserId\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\n  \"permissionProfile\": \"nanoAdmin\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://bintu.nanostream.cloud/user/permission\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"PUT\", \"https://bintu.nanostream.cloud/user/permission\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"UserId\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\n  \"permissionProfile\": \"nanoAdmin\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"UserId\":\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\"permissionProfile\":\"nanoAdmin\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/user/permission');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"UserId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"permissionProfile\\\":\\\"nanoAdmin\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/user/permission\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/user/permission\"\n\npayload = {\n    \"UserId\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\n    \"permissionProfile\": \"nanoAdmin\"\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/user/permission\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"UserId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"permissionProfile\\\":\\\"nanoAdmin\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"UserId\": \"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\",\n  \"permissionProfile\": \"nanoAdmin\"\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/user/permission\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"PUT\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/user/permission\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"UserId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"permissionProfile\\\":\\\"nanoAdmin\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/user/permission\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"UserId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"permissionProfile\\\":\\\"nanoAdmin\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Put,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/user/permission\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"UserId\\\":\\\"9d9dc062-2bdc-4bee-8bef-4c56b9953b14\\\",\\\"permissionProfile\\\":\\\"nanoAdmin\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/invitetoken":{"get":{"tags":["Invite Token"],"summary":"Invite Token Collection","description":"Ability to list all invite tokens. Also the redeemed ones. **Attention:** Access to this route is restricted to organisation administrators, requiring an API key or JWT token with `nanoAdmin` permissions.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Invite Token Collection","responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"token":"xgfl6aE3","redeemed":false,"role":"nanoAdmin"},{"token":"NcSA5Sbq","redeemed":false,"role":"nanoUser"},{"token":"wRk4AHsE","redeemed":true,"email":"test@nanocosmos.de","role":"nanoReadOnly"},{"token":"q5aS4H4f","redeemed":true,"email":"test+1@nanocosmos.de","role":"nanoUser"}]}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://bintu.nanostream.cloud/invitetoken \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/invitetoken\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/invitetoken\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/invitetoken\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/invitetoken\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/invitetoken');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/invitetoken\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/invitetoken\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/invitetoken\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/invitetoken\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/invitetoken\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/invitetoken\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/invitetoken\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]},"post":{"tags":["Invite Token"],"summary":"Create Invite Token","description":"Ability to create an invitation token for the organisation. It can be redeemed inside an 48 hours time period, then it will expire. **Attention:** Access to this route is restricted to organisation administrators, requiring an API key or JWT token with `nanoAdmin` permissions.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &cross; | &cross; |\n","operationId":"Create Invite Token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteTokenCreate"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"token":"Y683cNeT","redeemed":false,"role":"nanoReadOnly"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/ParameterNotUniqueError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/invitetoken \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"role\":\"nanoReadOnly\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/invitetoken\"\n\n\tpayload := strings.NewReader(\"{\\\"role\\\":\\\"nanoReadOnly\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/invitetoken\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"role\\\":\\\"nanoReadOnly\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"role\": \"nanoReadOnly\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/invitetoken\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/invitetoken\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"role\": \"nanoReadOnly\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"role\":\"nanoReadOnly\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/invitetoken');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"role\\\":\\\"nanoReadOnly\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/invitetoken\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/invitetoken\"\n\npayload = {\"role\": \"nanoReadOnly\"}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/invitetoken\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"role\\\":\\\"nanoReadOnly\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\"role\": \"nanoReadOnly\"] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/invitetoken\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/invitetoken\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"role\\\":\\\"nanoReadOnly\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/invitetoken\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"role\\\":\\\"nanoReadOnly\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/invitetoken\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"role\\\":\\\"nanoReadOnly\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/invitetoken/redeem":{"post":{"tags":["Invite Token"],"summary":"Redeem Invite Token","description":"Ability to redeem an invitation token and join the organisation. **Attention:** To ensure the security of your organisation, the newly added user is assigned the `nanoUser` role, which prevents invasive interventions on your existing operations. You can change the user's role at any time and increase or minimize access rights using the `nanoAdmin` or `nanoReadOnly` roles provided.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Redeem Invite Token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPasswordToken"}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"37a6177e-aa93-4486-ba73-2deea22c8e95","email":"test@nanocosmos.de","created_at":"2016-04-14T18:54:19.206Z","organisation":{"id":"1b7b8cef-fd5c-42c1-9cc2-bc029cf89260","name":"nano","isEnabled":true,"created_at":"2016-02-04T20:12:16.956Z"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ParameterRequiredError"},{"$ref":"#/components/schemas/WrongDataTypeError"}]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InviteTokenNotFoundError"},{"$ref":"#/components/schemas/OrganisationNotFoundError"}]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteTokenAlreadyRedeemedError"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpiredInviteTokenError"}}}}},"x-codegen-request-body-name":"body","x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://bintu.nanostream.cloud/invitetoken/redeem \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"example@nanocosmos.de\",\"password\":\"password\",\"token\":\"iIsInR5c\"}'"},{"lang":"Go + Native","source":"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://bintu.nanostream.cloud/invitetoken/redeem\"\n\n\tpayload := strings.NewReader(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://bintu.nanostream.cloud/invitetoken/redeem\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .body(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = JSON.stringify({\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"token\": \"iIsInR5c\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://bintu.nanostream.cloud/invitetoken/redeem\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"POST\", \"https://bintu.nanostream.cloud/invitetoken/redeem\");\n\nreq.headers({\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.type(\"json\");\nreq.send({\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"token\": \"iIsInR5c\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"email\":\"example@nanocosmos.de\",\"password\":\"password\",\"token\":\"iIsInR5c\"}');\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/invitetoken/redeem');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\npayload = \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/invitetoken/redeem\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/invitetoken/redeem\"\n\npayload = {\n    \"email\": \"example@nanocosmos.de\",\n    \"password\": \"password\",\n    \"token\": \"iIsInR5c\"\n}\nheaders = {\n    \"content-type\": \"application/json\",\n    \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/invitetoken/redeem\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\nrequest.body = \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\n  \"content-type\": \"application/json\",\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n]\nlet parameters = [\n  \"email\": \"example@nanocosmos.de\",\n  \"password\": \"password\",\n  \"token\": \"iIsInR5c\"\n] as [String : Any]\n\nlet postData = JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/invitetoken/redeem\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"POST\"\nrequest.allHTTPHeaderFields = headers\nrequest.httpBody = postData as Data\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/invitetoken/redeem\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"content-type: application/json\");\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\ncurl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\");\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/invitetoken/redeem\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nrequest.AddParameter(\"application/json\", \"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Post,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/invitetoken/redeem\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n    Content = new StringContent(\"{\\\"email\\\":\\\"example@nanocosmos.de\\\",\\\"password\\\":\\\"password\\\",\\\"token\\\":\\\"iIsInR5c\\\"}\")\n    {\n        Headers =\n        {\n            ContentType = new MediaTypeHeaderValue(\"application/json\")\n        }\n    }\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/transcoding_profiles":{"get":{"tags":["Transcoding Profiles"],"summary":"Transcoding Profiles","description":"Ability to get all available transcoding profiles.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |\n","operationId":"Transcoding Profiles","responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"id":"ebddce96-907c-4080-b90b-8b6aa076c7b9","name":"vtrans-2000x25","vtrans":{"bitrate":2000,"codec":"h264","fps":25,"width":0,"height":0}},{"id":"d9f2cf40-05c5-435c-b7a2-a4f2a25d7027","name":"vtrans-1600x30","vtrans":{"bitrate":1600,"codec":"h264","fps":30,"width":0,"height":0}},{"id":"5467af26-4b44-4414-b439-7ec228050cff","name":"vtrans-1600x25","vtrans":{"bitrate":1600,"codec":"h264","fps":25,"width":0,"height":0}}]}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://bintu.nanostream.cloud/transcoding_profiles \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/transcoding_profiles\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/transcoding_profiles\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/transcoding_profiles\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/transcoding_profiles\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/transcoding_profiles');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/transcoding_profiles\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/transcoding_profiles\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/transcoding_profiles\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/transcoding_profiles\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/transcoding_profiles\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/transcoding_profiles\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/transcoding_profiles\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/permission":{"get":{"tags":["User Roles"],"summary":"Get a user role and the associated permissions by name","description":"Retrieve a user role based on the provided name and lists the associated permissions.\nUser roles define a set of permissions that dictate what actions users can perform within your organisation.\nThis allows you to control access, ensuring only authorized individuals can execute specific operations.\n\nThe available profile names are:\n- `nanoAdmin`\n- `nanoUser`\n- `nanoReadOnly`\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |","operationId":"getPermissionProfileByName","parameters":[{"name":"name","in":"query","required":true,"description":"The name of the user role to retrieve","schema":{"type":"string","example":"nanoUser"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"4721b3c6-36ab-4264-8de3-8f6d088dcc61","name":"nanoUser","description":"Default restricted permission profile for organisation member.","bintu_permission":{"inviteToken":{"create":false,"list":false},"metricKey":{"get":true},"organisation":{"get":true,"setVod":false,"setWebhook":false},"stream":{"getStreamListCount":true,"getAllStreamStatesCount":true,"validateStream":true,"getStreams":true,"createStream":true,"getStreamgroups":true,"getStreamgroupsCount":true,"deleteStreams":false},"streamWithId":{"getStream":true,"getStreamGroup":true,"setTag":true,"setPushUrl":true,"setTranscodingProfile":true,"setOpcode":true,"setTimecode":false,"addTranscode":true,"deleteStream":false,"removeTranscode":false,"stopIngest":false,"unlockStream":false},"tag":{"getTags":true,"getRecentlyUsedTags":true,"createTag":true,"editTag":true,"deleteTag":false},"transcoding_profiles":{"getTranscodingProfiles":true},"user":{"getUser":true,"deleteUser":false,"renewUserTokenKey":false,"changeUserPermissions":false,"getPermissions":false}},"audiences":["bintu","metrics","guardian","splay","secure-conference"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://bintu.nanostream.cloud/permission?name=nanoUser' \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/permission?name=nanoUser\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/permission?name=nanoUser\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/permission?name=nanoUser\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/permission\");\n\nreq.query({\n  \"name\": \"nanoUser\"\n});\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/permission');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'name' => 'nanoUser'\n]));\n\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/permission?name=nanoUser\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/permission\"\n\nquerystring = {\"name\":\"nanoUser\"}\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/permission?name=nanoUser\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/permission?name=nanoUser\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/permission?name=nanoUser\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/permission?name=nanoUser\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/permission?name=nanoUser\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}},"/permission/list":{"get":{"tags":["User Roles"],"summary":"Get a list of available user roles","description":"Returns a comprehensive list of all available user roles, along with a detailed description of the permissions granted to each role.\nUser roles define a set of permissions that dictate what actions users can perform within your organisation.\nThis allows you to control access, ensuring only authorized individuals can execute specific operations.\n\n### Roles allowed to access this resource\n| nanoAdmin | nanoUser | nanoReadOnly\n| :---: | :---: | :---: |\n| &check; | &check; | &check; |","operationId":"Permission List","responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"id":"ebddce96-907c-4080-b90b-8b6aa076c7b9","name":"nanoAdmin","description":"Default full-access permission profile for organisation administrator.","bintu_permission":{"inviteToken":{"create":true,"list":true},"metricKey":{"get":true},"organisation":{"get":true,"setVod":true,"setWebhook":true},"stream":{"getStreamListCount":true,"getAllStreamStatesCount":true,"validateStream":true,"getStreams":true,"createStream":true,"getStreamgroups":true,"getStreamgroupsCount":true,"deleteStreams":true},"streamWithId":{"getStream":true,"getStreamGroup":true,"setTag":true,"setPushUrl":true,"setTranscodingProfile":true,"setOpcode":true,"setTimecode":true,"addTranscode":true,"deleteStream":true,"removeTranscode":true,"stopIngest":true,"unlockStream":true},"tag":{"getTags":true,"getRecentlyUsedTags":true,"createTag":true,"editTag":true,"deleteTag":true},"transcoding_profiles":{"getTranscodingProfiles":true},"user":{"getUser":true,"deleteUser":true,"renewUserTokenKey":true,"changeUserPermissions":true,"getPermissions":true}},"audiences":["bintu","metrics","guardian","splay","secure-conference"]},{"id":"d9f2cf40-05c5-435c-b7a2-a4f2a25d7027","name":"nanoUser","description":"Default restricted permission profile for organisation member.","bintu_permission":{"metricKey":{"get":true},"organisation":{"get":true},"stream":{"getStreamListCount":true,"getAllStreamStatesCount":true,"validateStream":true,"getStreams":true,"createStream":true,"getStreamgroups":true,"getStreamgroupsCount":true},"streamWithId":{"getStream":true,"getStreamGroup":true,"setTag":true,"setPushUrl":true,"setTranscodingProfile":true,"setOpcode":true,"addTranscode":true},"tag":{"getTags":true,"getRecentlyUsedTags":true,"createTag":true,"editTag":true},"transcoding_profiles":{"getTranscodingProfiles":true},"user":{"getUser":true}},"audiences":["bintu","metrics","guardian","splay","secure-conference"]},{"id":"5467af26-4b44-4414-b439-7ec228050cff","name":"nanoReadOnly","description":"Default read-only permission profile for organisation member.","bintu_permission":{"organisation":{"get":true},"stream":{"getStreamListCount":true,"getAllStreamStatesCount":true,"validateStream":true,"getStreams":true,"getStreamgroups":true,"getStreamgroupsCount":true},"streamWithId":{"getStream":true,"getStreamGroup":true},"tag":{"getTags":true,"getRecentlyUsedTags":true}},"audiences":["bintu","metrics"]}]}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}}},"x-codeSamples":[{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://bintu.nanostream.cloud/permission/list \\\n  --header 'X-BINTU-APIKEY: REPLACE_KEY_VALUE'"},{"lang":"Go + Native","source":"package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://bintu.nanostream.cloud/permission/list\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\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}"},{"lang":"Java + Unirest","source":"HttpResponse<String> response = Unirest.get(\"https://bintu.nanostream.cloud/permission/list\")\n  .header(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\")\n  .asString();"},{"lang":"Javascript + Xhr","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://bintu.nanostream.cloud/permission/list\");\nxhr.setRequestHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node + Unirest","source":"const unirest = require(\"unirest\");\n\nconst req = unirest(\"GET\", \"https://bintu.nanostream.cloud/permission/list\");\n\nreq.headers({\n  \"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"\n});\n\nreq.end(function (res) {\n  if (res.error) throw new Error(res.error);\n\n  console.log(res.body);\n});\n"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://bintu.nanostream.cloud/permission/list');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'X-BINTU-APIKEY' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"bintu.nanostream.cloud\")\n\nheaders = { 'X-BINTU-APIKEY': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/permission/list\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Python + Requests","source":"import requests\n\nurl = \"https://bintu.nanostream.cloud/permission/list\"\n\nheaders = {\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)"},{"lang":"Ruby + Native","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://bintu.nanostream.cloud/permission/list\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-BINTU-APIKEY\"] = 'REPLACE_KEY_VALUE'\n\nresponse = http.request(request)\nputs response.read_body"},{"lang":"Swift + Nsurlsession","source":"import Foundation\n\nlet headers = [\"X-BINTU-APIKEY\": \"REPLACE_KEY_VALUE\"]\n\nlet request = NSMutableURLRequest(url: NSURL(string: \"https://bintu.nanostream.cloud/permission/list\")! as URL,\n                                        cachePolicy: .useProtocolCachePolicy,\n                                    timeoutInterval: 10.0)\nrequest.httpMethod = \"GET\"\nrequest.allHTTPHeaderFields = headers\n\nlet session = URLSession.shared\nlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in\n  if (error != nil) {\n    print(error)\n  } else {\n    let httpResponse = response as? HTTPURLResponse\n    print(httpResponse)\n  }\n})\n\ndataTask.resume()"},{"lang":"C + Libcurl","source":"CURL *hnd = curl_easy_init();\n\ncurl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"GET\");\ncurl_easy_setopt(hnd, CURLOPT_URL, \"https://bintu.nanostream.cloud/permission/list\");\n\nstruct curl_slist *headers = NULL;\nheaders = curl_slist_append(headers, \"X-BINTU-APIKEY: REPLACE_KEY_VALUE\");\ncurl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);\n\nCURLcode ret = curl_easy_perform(hnd);"},{"lang":"Csharp + Restsharp","source":"var client = new RestClient(\"https://bintu.nanostream.cloud/permission/list\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\");\nIRestResponse response = client.Execute(request);"},{"lang":"Csharp + Httpclient","source":"var client = new HttpClient();\nvar request = new HttpRequestMessage\n{\n    Method = HttpMethod.Get,\n    RequestUri = new Uri(\"https://bintu.nanostream.cloud/permission/list\"),\n    Headers =\n    {\n        { \"X-BINTU-APIKEY\", \"REPLACE_KEY_VALUE\" },\n    },\n};\nusing (var response = await client.SendAsync(request))\n{\n    response.EnsureSuccessStatusCode();\n    var body = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(body);\n}"}]}}}}
