> This page is for Harmonic.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://mediakind.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mediakind.ferndocs.com/_mcp/server.

# Update an existing transport stream 

PUT https://device.example.com:443/cluster1/vos-api/mux/v1/transport-streams/{muxServiceId}
Content-Type: application/json

should refer to a mux-service object

Reference: https://mediakind.ferndocs.com/harmonic/api/vos/mux-app-configure/update-existing-transport-stream

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `muxServiceId` (string, required) — muxServiceId

### Body (application/json)

This endpoint expects a com.harmonicinc.vos.mux.model.ts.OutputTS.

- `globalSettings` (com.harmonicinc.vos.mux.model.tslevel.GlobalSettings, required)
- `muxServiceId` (string, required) — mux service ID
- `programs` (list of com.harmonicinc.vos.mux.model.programlevel.OutputProgram, required) — Programs
- `guiSpecific` (com.harmonicinc.vos.mux.model.tslevel.GuiSpecific, optional)
- `muxServiceName` (string, optional) — mux service name
- `unreferencedPids` (list of com.harmonicinc.vos.mux.model.unreferencedpidlevel.OutputUnreferencedPid, optional) — Unreferenced Pids

## Response

### 200

OK

### 201

Created

## Errors

### 401 Unauthorized Error

Unauthorized

- `any`

### 403 Forbidden Error

Forbidden

- `any`

### 404 Not Found Error

TS not found

- `any`

### 500 Internal Server Error

invalid configuration

- `any`

## Types

### com.harmonicinc.vos.mux.model.tslevel.GlobalSettings

- `tsId` (integer, required) — TS ID
- `atscSettings` (com.harmonicinc.vos.mux.model.tslevel.AtscSettings, optional)
- `dvbSettings` (com.harmonicinc.vos.mux.model.tslevel.DvbSettings, optional)
- `dvbSisDsaSettings` (com.harmonicinc.vos.mux.model.tslevel.DvbSisDsaSettings, optional)
- `emmStreams` (list of com.harmonicinc.vos.mux.model.tslevel.EmmStream, optional) — EMM streams
- `externalTableGenerators` (com.harmonicinc.vos.mux.model.tslevel.ExternalTableGenerators, optional)
- `timezoneId` (string, optional) — Timezone Id

### com.harmonicinc.vos.mux.model.programlevel.OutputProgram

- `outputProgramParameters` (com.harmonicinc.vos.mux.model.programlevel.OutputProgramParameters, required)
- `components` (list of com.harmonicinc.vos.mux.model.componentlevel.OutputComponent, optional) — components
- `controlState` (enum, optional) — control state : ON_AIR, OFF_AIR
  - Allowed values: `ON_AIR`, `OFF_AIR`
- `id` (string, optional) — Unique identifier of a program in UUID format
- `inputIdentifier` (com.harmonicinc.vos.mux.model.programlevel.InputIdentifier, optional)

### com.harmonicinc.vos.mux.model.tslevel.GuiSpecific

- `unreferencedPidsGuiEnable` (boolean, optional) — Reserved for GUI use, no impact on Mux behavior

### com.harmonicinc.vos.mux.model.unreferencedpidlevel.OutputUnreferencedPid

- `id` (string, optional)
- `inputIdentifier` (com.harmonicinc.vos.mux.model.unreferencedpidlevel.UnreferencedPidInputIdentifier, optional)
- `outputUnreferencedPidParameters` (com.harmonicinc.vos.mux.model.unreferencedpidlevel.OutputUnreferencedPidParameters, optional)

### com.harmonicinc.vos.mux.model.tslevel.AtscSettings

- `vctType` (enum, required) — type of Virtual Channel Table
  - Allowed values: `TVCT`, `CVCT`
- `eit1RepetitionPeriod` (integer, optional) — repetition period of EIT-1. Range : [1000ms,3000ms], Default : 3000ms
- `eit2RepetitionPeriod` (integer, optional) — repetition period of EIT-2. Range : [2000ms,60000ms], Default : 60000ms
- `eit3RepetitionPeriod` (integer, optional) — repetition period of EIT-3. Range : [3000ms,60000ms], Default : 60000ms
- `eitDepth` (integer, optional) — Number of 3-hours segment of EIT. Range 4..16, default is 4 (12 hours)
- `eitFirstPid` (integer, optional) — first EIT PID, this pid and the followings ones (defined by eitDepth) will be used for the EIT
- `ett0RepetitionPeriod` (integer, optional) — repetition period of ETT-0. Range : [1000ms,60000ms], Default : 60000ms
- `ettDepth` (integer, optional) — Number of 3-hours segment of ETT. Range 0..16, default is 4 (12 hours). It cannot exceed EIT depth
- `ettFirstPid` (integer, optional) — first ETT PID, this pid and the followings ones (defined by ettDepth) will be used for the ETT

### com.harmonicinc.vos.mux.model.tslevel.DvbSettings

- `nitParameters` (com.harmonicinc.vos.mux.model.tslevel.NitParameters, optional)
- `originalNetworkId` (integer, optional) — original network ID
- `tdtParameters` (com.harmonicinc.vos.mux.model.tslevel.TdtParameters, optional)
- `totParameters` (com.harmonicinc.vos.mux.model.tslevel.TotParameters, optional)

### com.harmonicinc.vos.mux.model.tslevel.DvbSisDsaSettings

- `dsaGroupId` (integer, required) — dsa group id
- `inputId` (string, required) — uuid of the input parent signal
- `sisProgramNumber` (integer, required) — sis service program number
- `sisSecondaries` (list of com.harmonicinc.vos.mux.model.tslevel.DvbSisDsaSecondaryInput, optional) — list of the input secondary signals

### com.harmonicinc.vos.mux.model.tslevel.EmmStream

- `dataStreamId` (integer, required) — data_id of the EMM stream. Ignored when mode is not SIMULCRYPT
- `emmChannelUuid` (string, required) — Uuid of the EMM channel to be used for the EMM stream. Ignored when mode is not SIMULCRYPT
- `pid` (integer, required) — The EMM pid value
- `bisscaStreamId` (string, optional) — Uuid of the BISS-CA EMM stream. Ignored when mode is not BISS_CA
- `caDescPrivateData` (string, optional) — Private Data to be added to CA Desc (in hexa, for e.g. "AAE1BC3D")
- `caSystemId` (string, optional) — CA System ID of EMM stream in the CA_descriptor (in hexa, for e.g. "ABCD"). Mandatory when mode is PASSTHROUGH, optional when mode is SIMULCRYPT (use data from Scrambling app by default). Ignored when mode is BISS_CA
- `id` (string, optional) — Unique identifier of a EMM stream in UUID format
- `inputObjectId` (string, optional) — input object id. Ignored when mode is not PASSTHROUGH
- `inputPid` (integer, optional) — input PID. Ignored when mode is not PASSTHROUGH
- `mode` (enum, optional) — EMM mode. Default is SIMULCRYPT
  - Allowed values: `SIMULCRYPT`, `PASSTHROUGH`, `BISS_CA`

### com.harmonicinc.vos.mux.model.tslevel.ExternalTableGenerators

- `ipPort` (integer, required) — TCP port used to receive input (from 7800 to 7899)
- `mainGeneratorId` (string, required) — Primary client unique identifier
- `backupGeneratorId` (string, optional) — Backup client unique identifier

### com.harmonicinc.vos.mux.model.programlevel.OutputProgramParameters

- `addedPmtDescriptors` (list of com.harmonicinc.vos.mux.model.common.Descriptor, optional) — added PMT Descriptors
- `addedSdtDescriptors` (list of com.harmonicinc.vos.mux.model.common.Descriptor, optional) — added SDT Descriptors
- `atscSourceId` (integer, optional) — atsc source id
- `atscType` (enum, optional) — atsc type
  - Allowed values: `DIGITAL_TELEVISION`, `AUDIO`, `DATA_ONLY`
- `dvbType` (integer, optional) — SDT service type, range 0..255. When null, deprecated parameter 'type' is used. When both parameters are null, the service type from input SDT is used (pass-through mode). If not defined in input stream, value 0 is used
- `easParameters` (com.harmonicinc.vos.mux.model.programlevel.eas.OutputProgramEasParameters, optional)
- `eitettRemultiplexing` (com.harmonicinc.vos.mux.model.programlevel.OutputProgramEitEttRemultiplexing, optional)
- `excludePidList` (list of string, optional) — List of PIDs to be excluded (UUID).
- `filteredPmtDescriptors` (list of string, optional) — When a descriptor tag (in hexa) is present in this list, there will be no PMT descriptor with this tag in the output, unless added using addedPmtDescriptors.
- `isDynamic` (boolean, optional) — dynamic program
- `majorChannelNumber` (integer, optional) — atsc major channel number
- `minorChannelNumber` (integer, optional) — atsc minor channel number
- `name` (string, optional) — program name
- `nameCodingTable` (string, optional) — The parameter is applicable when SDT is generated, and the parameter name is set in mux configuration. default is "00" (Latin)
- `number` (integer, optional) — program number
- `pmtParameters` (com.harmonicinc.vos.mux.model.programlevel.PmtParameters, optional)
- `pmtPid` (integer, optional) — pmt pid
- `provider` (string, optional) — provider name
- `providerCodingTable` (string, optional) — The parameter is applicable when SDT is generated, and the parameter provider is set in mux configuration. default is "00" (Latin)
- `scramblingParameters` (com.harmonicinc.vos.mux.model.programlevel.OutputProgramScramblingParameters, optional)
- `sdtParameters` (com.harmonicinc.vos.mux.model.programlevel.SdtParameters, optional)
- `separatePcrPid` (integer, optional) — pcr not on elementary stream pid
- `type` (enum, optional) — Deprecated. Use dvbType instead
  - Allowed values: `DIGITAL_TELEVISION`, `DIGITAL_RADIO_SOUND`, `TELETEXT`, `MOSAIC`

### com.harmonicinc.vos.mux.model.componentlevel.OutputComponent

- `id` (string, optional)
- `inputIdentifier` (com.harmonicinc.vos.mux.model.componentlevel.ComponentInputIdentifier, optional)
- `outputComponentParameters` (com.harmonicinc.vos.mux.model.componentlevel.OutputComponentParameters, optional)

### com.harmonicinc.vos.mux.model.programlevel.InputIdentifier

- `inputObjectId` (string, required) — The serviceId of the service for a transcoded service, sourceId for a passthrough service or the id of a primary program for a virtual program
- `inputType` (enum, required) — Input Type : ENCODING_SERVICE, TS_SOURCE, VIRTUAL_PROGRAM
  - Allowed values: `ENCODING_SERVICE`, `TS_SOURCE`, `VIRTUAL_PROGRAM`, `LOCAL_PROGRAM`
- `inputProgramNumber` (integer, optional) — Input Program number for a pass through service, MUST be null for a transcoded service and a virtual program

### com.harmonicinc.vos.mux.model.unreferencedpidlevel.UnreferencedPidInputIdentifier

- `inputObjectId` (string, required) — The serviceId of the service for a transcoded service or sourceId for a passthrough service
- `inputPid` (integer, required) — Input PID
- `inputType` (enum, required) — Input Type : ENCODING_SERVICE, TS_SOURCE
  - Allowed values: `ENCODING_SERVICE`, `TS_SOURCE`

### com.harmonicinc.vos.mux.model.unreferencedpidlevel.OutputUnreferencedPidParameters

- `pid` (integer, optional) — output PID

### com.harmonicinc.vos.mux.model.tslevel.NitParameters

- `inputObjectId` (string, optional) — input object id. Ignored when nitMode is not PASSTHROUGH
- `inputPid` (integer, optional) — input PID. Ignored when nitMode is not PASSTHROUGH
- `interval` (integer, optional) — Table interval (1000-10000 milliseconds). Relevant for GENERATE
- `networkId` (string, optional) — Network Object Id. Relevant for GENERATE
- `nitMode` (enum, optional) — NIT mode
  - Allowed values: `NONE`, `PASSTHROUGH`, `GENERATE`

### com.harmonicinc.vos.mux.model.tslevel.TdtParameters

- `inputObjectId` (string, optional) — Input object id (UUID). Relevant for PASSTHROUGH
- `inputPid` (integer, optional) — Input PID number. Relevant for PASSTHROUGH
- `interval` (integer, optional) — Table interval (1000 - 30000 milliseconds). Relevant for GENERATE
- `tdtMode` (enum, optional) — TDT Mode
  - Allowed values: `GENERATE`, `NONE`, `PASSTHROUGH`

### com.harmonicinc.vos.mux.model.tslevel.TotParameters

- `interval` (integer, optional) — Table interval (1000- 30000 milliseconds). Relevant for GENERATE
- `localTimeOffsetDescriptor` (list of com.harmonicinc.vos.mux.model.tslevel.LocalTimeOffsetDes, optional) — Local time offset descriptor list
- `totMode` (enum, optional) — TOT Mode. Will be ignored when tdtMode is PASSTHROUGH.
  - Allowed values: `GENERATE`, `NONE`

### com.harmonicinc.vos.mux.model.tslevel.DvbSisDsaSecondaryInput

- `inputId` (string, required) — uuid of the input secondary signal
- `sisProgramNumber` (integer, required) — sis service program number

### com.harmonicinc.vos.mux.model.common.Descriptor

- `hexaValue` (string, required) — the buffer content of the descriptor in hexa value

### com.harmonicinc.vos.mux.model.programlevel.eas.OutputProgramEasParameters

- `enable` (boolean, required) — Enable eas
- `easChannel` (com.harmonicinc.vos.mux.model.programlevel.eas.OutputProgramEasChannel, optional)
- `groupId` (integer, optional) — Group Id
- `locations` (list of com.harmonicinc.vos.mux.model.programlevel.eas.OutputProgramEasLocation, optional) — Eas locations

### com.harmonicinc.vos.mux.model.programlevel.OutputProgramEitEttRemultiplexing

- `enable` (boolean, required) — Enable EIT/ETT remulitplexing
- `inputObjectId` (string, required) — Uuid of the source
- `majorChannelNumber` (integer, required) — Atsc major channel number
- `minorChannelNumber` (integer, required) — Atsc minor channel number

### com.harmonicinc.vos.mux.model.programlevel.PmtParameters

- `inputObjectId` (string, optional) — input object id
- `inputPid` (integer, optional) — input pid
- `pmtMode` (enum, optional) — pmt mode
  - Allowed values: `NONE`, `GENERATE`, `PASSTHROUGH`

### com.harmonicinc.vos.mux.model.programlevel.OutputProgramScramblingParameters

- `enable` (boolean, required) — enable
- `scramblingGroup` (string, required) — scrambling group

### com.harmonicinc.vos.mux.model.programlevel.SdtParameters

- `eitPfFlag` (enum, optional) — EIT present/following flag. Default value is FALSE. Allows to set the EIT_present_following_flag in the output SDT for this program.
  - Allowed values: `TRUE`, `FALSE`
- `eitScheduleFlag` (enum, optional) — EIT schedule flag. Default value is FALSE. Allows to set the EIT_schedule_flag in the output SDT for this program.
  - Allowed values: `TRUE`, `FALSE`
- `freeCaMode` (enum, optional) — Free CA mode. Default value is FALSE. Allows to set the free_CA_mode in the output SDT for this program.
  - Allowed values: `TRUE`, `FALSE`
- `runningStatus` (integer, optional) — Running status. Range 0..7, default value is 4. Allows to set the running_status in the output SDT for this program.

### com.harmonicinc.vos.mux.model.componentlevel.ComponentInputIdentifier

- `inputObjectId` (string, required) — The serviceId of the service for a transcoded service or sourceId for a passthrough service
- `inputPid` (integer, required) — Input PID
- `inputType` (enum, required) — Input Type : ENCODING_SERVICE, TS_SOURCE
  - Allowed values: `ENCODING_SERVICE`, `TS_SOURCE`
- `inputProgramNumber` (integer, optional) — Input Program number for a pass through service, MUST be null for a transcoded service

### com.harmonicinc.vos.mux.model.componentlevel.OutputComponentParameters

- `addedPmtDescriptors` (list of com.harmonicinc.vos.mux.model.common.Descriptor, optional) — added PMT Descriptors
- `cmpTag` (integer, optional) — output component tag
- `controlState` (enum, optional) — Default is ON_AIR. When controlState is OFF_AIR, the component is not present in the output, and the PMT does not refer to it.
  - Allowed values: `ON_AIR`, `OFF_AIR`
- `delayAdjustment` (integer, optional) — adjust the delay of a PID coming from a different source, like subtitles or teletext, in ms (values between -5000 to 5000)
- `filteredPmtDescriptors` (list of string, optional) — When a descriptor tag (in hexa) is present in this list, there will be no PMT descriptor with this tag in the output, unless added using addedPmtDescriptors.
- `pid` (integer, optional) — output PID
- `scramblingParameters` (com.harmonicinc.vos.mux.model.componentlevel.OutputComponentScramblingParameters, optional)
- `streamType` (integer, optional) — stream type

### com.harmonicinc.vos.mux.model.tslevel.LocalTimeOffsetDes

- `countryCode` (string, optional) — Identifies a country using the 3-character code
- `countryRegionId` (integer, optional) — A zone in the country which is indicated by country code Range 0..63, default 0
- `timezone` (string, optional) — Timezone Id

### com.harmonicinc.vos.mux.model.programlevel.eas.OutputProgramEasChannel

- `cbrBitrate` (integer, required) — Cbr bitrate
- `inputIdentifier` (com.harmonicinc.vos.mux.model.programlevel.eas.EasChannelInputIdentifier, optional)

### com.harmonicinc.vos.mux.model.programlevel.eas.OutputProgramEasLocation

- `county` (integer, required) — County code
- `state` (integer, required) — State code
- `subdivision` (integer, required) — Subdivision code

### com.harmonicinc.vos.mux.model.componentlevel.OutputComponentScramblingParameters

- `scramblingGroup` (string, required) — scrambling group

### com.harmonicinc.vos.mux.model.programlevel.eas.EasChannelInputIdentifier

- `inputObjectId` (string, required) — The sourceId for the eas channel
- `inputProgramNumber` (integer, required) — Input program number for the eas channel

## Examples

### Example 1

**Request**

```json
{
  "globalSettings": {
    "tsId": 1
  },
  "muxServiceId": "string",
  "programs": [
    {
      "outputProgramParameters": {}
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId"

payload = {
    "globalSettings": { "tsId": 1 },
    "muxServiceId": "string",
    "programs": [{ "outputProgramParameters": {} }]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"globalSettings":{"tsId":1},"muxServiceId":"string","programs":[{"outputProgramParameters":{}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId"

	payload := strings.NewReader("{\n  \"globalSettings\": {\n    \"tsId\": 1\n  },\n  \"muxServiceId\": \"string\",\n  \"programs\": [\n    {\n      \"outputProgramParameters\": {}\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"globalSettings\": {\n    \"tsId\": 1\n  },\n  \"muxServiceId\": \"string\",\n  \"programs\": [\n    {\n      \"outputProgramParameters\": {}\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"globalSettings\": {\n    \"tsId\": 1\n  },\n  \"muxServiceId\": \"string\",\n  \"programs\": [\n    {\n      \"outputProgramParameters\": {}\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId', [
  'body' => '{
  "globalSettings": {
    "tsId": 1
  },
  "muxServiceId": "string",
  "programs": [
    {
      "outputProgramParameters": {}
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"globalSettings\": {\n    \"tsId\": 1\n  },\n  \"muxServiceId\": \"string\",\n  \"programs\": [\n    {\n      \"outputProgramParameters\": {}\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "globalSettings": ["tsId": 1],
  "muxServiceId": "string",
  "programs": [["outputProgramParameters": []]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "globalSettings": {
    "tsId": 1
  },
  "muxServiceId": "string",
  "programs": [
    {
      "outputProgramParameters": {}
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId"

payload = {
    "globalSettings": { "tsId": 1 },
    "muxServiceId": "string",
    "programs": [{ "outputProgramParameters": {} }]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"globalSettings":{"tsId":1},"muxServiceId":"string","programs":[{"outputProgramParameters":{}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId"

	payload := strings.NewReader("{\n  \"globalSettings\": {\n    \"tsId\": 1\n  },\n  \"muxServiceId\": \"string\",\n  \"programs\": [\n    {\n      \"outputProgramParameters\": {}\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"globalSettings\": {\n    \"tsId\": 1\n  },\n  \"muxServiceId\": \"string\",\n  \"programs\": [\n    {\n      \"outputProgramParameters\": {}\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"globalSettings\": {\n    \"tsId\": 1\n  },\n  \"muxServiceId\": \"string\",\n  \"programs\": [\n    {\n      \"outputProgramParameters\": {}\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId', [
  'body' => '{
  "globalSettings": {
    "tsId": 1
  },
  "muxServiceId": "string",
  "programs": [
    {
      "outputProgramParameters": {}
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"globalSettings\": {\n    \"tsId\": 1\n  },\n  \"muxServiceId\": \"string\",\n  \"programs\": [\n    {\n      \"outputProgramParameters\": {}\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "globalSettings": ["tsId": 1],
  "muxServiceId": "string",
  "programs": [["outputProgramParameters": []]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://device.example.com/cluster1/vos-api/mux/v1/transport-streams/muxServiceId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```