> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://mediakind.ferndocs.com/harmonic/api/vos/origin-engine/configure-origin-engine-settings/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mediakind.ferndocs.com/_mcp/server. # Configure origin engine settings PUT https://device.example.com:443/cluster1/vos-api/origin-engine/v1/settings Content-Type: application/json Undefined config will be set to default value. Get settings then overwrite new config if you only want partial update. Reference: https://mediakind.ferndocs.com/harmonic/api/vos/origin-engine/configure-origin-engine-settings ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Body (application/json) This endpoint expects a com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings. - `accessLogToLoki` (com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig, optional) - `accessLogToS3` (com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToS3Config, optional) - `additionalHeaderConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_AdditionalHeaderConfig, optional) - `autoScaling` (com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig, optional) - `cacheSettings` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_CacheSettings, optional) - `cloudfrontHeader` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_CloudfrontHeader, optional) - `connectionConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_ConnectionConfig, optional) - `connectionDrainingConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.ConnectionDrainingConfig, optional) - `defaultManifestFilteringSettings` (com.harmonicinc.unifiedoriginenginelibrary.settings.DefaultManifestFilteringSettings, optional) - `edgeAuthConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.EdgeAuthConfig, optional) - `encryptionConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_EncryptionConfig, optional) - `g2oAuthConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.G2OAuthConfig, optional) - `headerAuthConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_HeaderAuthConfig, optional) - `hideFromLiveContentConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.HideFromLiveContentConfig, optional) - `httpConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_HttpConfig, optional) - `llcuIndexingConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.LlcuIndexingConfig, optional) - `loggingConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_LoggingConfig, optional) - `mdsPropertiesConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_MdsPropertiesConfig, optional) - `mdsProxySettings` (com.harmonicinc.unifiedoriginenginelibrary.settings.MdsProxySettings, optional) - `mdsSchedulingConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.MdsSchedulingConfig, optional) - `ottEgressProxyConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_OttEgressProxyConfig, optional) - `potfServerConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.PotfServerConfig, optional) - `proxyBufferSettings` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_ProxyBufferSettings, optional) - `proxyCacheLockSettings` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_ProxyCacheLockSettings, optional) - `resourceConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.ResourceConfig, optional) - `statisticsReportingConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_StatisticsReportingConfig, optional) - `storageSettings` (com.harmonicinc.unifiedoriginenginelibrary.settings.StorageSettings, optional) ## Response ### 200 OK ### 201 Created ## Errors ### 401 Unauthorized Error Unauthorized - `any` ### 403 Forbidden Error Forbidden - `any` ### 404 Not Found Error Not Found - `any` ### 500 Internal Server Error Internal Error - `any` ## Types ### com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig - `enableNginxLogs` (boolean, required) — Set to true to use enable push of nginx access logs to Loki - `grpdCompliance` (boolean, optional) — Enable GRPD compliance for log aggregation - `logEndpoint` (com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_LogEndpoint, optional) - `logPercentage` (double, optional) — Log percentage for Nginx Access log to write to Loki - `logShipper` (com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_LogShipper, optional) - `logVolumeSizeInMB` (double, optional) — The log volume size for RAM Disk in MB ### com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToS3Config - `assumeRoleDurationInMinutes` (integer, required) — Valid duration for the credentials in AssumeRole - `enableNginxLogsInS3` (boolean, required) — Set to true to use enable push of nginx access logs to S3 - `logFlushToS3IntervalInMinutes` (integer, required) — Log flush interval - `logPercentageExport` (integer, required) — Log percentage export - `s3RoleArn` (string, required) — The Amazon Resource Name (ARN) of the role to assume for accessing S3 bucket - `s3RoleSessionName` (string, required) — The Role Session Name for AssumeRole - `upstreamUrl` (string, required) — The HTTP URL of the upstream ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_AdditionalHeaderConfig - `headers` (list of com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_AdditionalHeaderConfig_AdditionalHeader, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig - `enabled` (boolean, required) — Whether auto-scaling based on loading is enabled - `minNumServers` (integer, required) — The minimum number of origin nodes to maintain, applies regardless of value of enabled field - `coolDownPeriodSec` (integer, optional) — The cool-down period after scale-up / scale-down where no further scaling will take place - `ignoreNodeCountLimit` (boolean, optional) — Whether or not nodes can be scaled beyond the number of available cluster nodes - `kedaAutoscaler` (com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig_KedaAutoscalerConfig, optional) - `maxNumServers` (integer, optional) — The maximum number of total origin nodes to spawn when auto-scaling is enabled - `mode` (enum, optional) - Allowed values: `LEGACY`, `KEDA` - `scaleDownCondition` (com.harmonicinc.unifiedoriginenginelibrary.settings.ScaleDownCondition, optional) - `scaleDownStepPercentage` (integer, optional) — Percentage of number of existing nodes to remove during scale-down - `scaleUpCondition` (com.harmonicinc.unifiedoriginenginelibrary.settings.ScaleUpCondition, optional) - `scaleUpStepPercentage` (integer, optional) — Percentage of number of existing nodes to add during scale-up ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_CacheSettings - `ignoreCacheControlHeaderForLiveContent` (boolean, required) — When responding to live service requests, ignore any "Cache-control" HTTP header passed from upstream, so that MDS only use the "Expires" header for cache expiration check - `cacheBackend` (enum, optional) - Allowed values: `DISK`, `MEMORY` - `cacheStroageExtraSizeInMB` (integer, optional) - `enabled` (boolean, optional) - `maxSizeInMB` (integer, optional) - `nonLiveMaxSizeInMB` (integer, optional) - `separateCacheForNonLiveContent` (boolean, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_CloudfrontHeader - `header` (string, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_ConnectionConfig - `workerConnections` (integer, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.ConnectionDrainingConfig - `durationInSeconds` (integer, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.DefaultManifestFilteringSettings - `enabled` (boolean, optional) - `mmpProfileId` (string, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.EdgeAuthConfig - `algorithm` (enum, required) — Indicates the encryption format of edge auth - Allowed values: `MD5`, `SHA1_HMAC`, `SHA256_HMAC` - `enabled` (boolean, required) — Whether edge auth is enabled - `key` (string, required) — Key of encryption - `urlPrefix` (string, required) — Custom url prefix ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_EncryptionConfig - `kmsSendTimeoutSeconds` (integer, optional) — How long will MDS consider the KMS-related request is timeout ### com.harmonicinc.unifiedoriginenginelibrary.settings.G2OAuthConfig - `enabled` (boolean, required) — Whether g2o authentication is enabled - `g2oKey` (string, optional) — Indicates the encryption format for the g2o authentication - `g2oNonce` (string, optional) — A simple string or number that tells the origin which key to use to authenticate the request - `g2oTimeWindow` (integer, optional) — Allowable time difference (in second) for a request - `g2oVersion` (enum, optional) — Indicates the encryption format for the g2o authentication - Allowed values: `NONE`, `MD5`, `MD5_1`, `MD5_HMAC`, `SHA1_HMAC`, `SHA256_HMAC` ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_HeaderAuthConfig - `matchAny` (list of com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_HeaderAuthConfig_HeaderParam, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.HideFromLiveContentConfig - `hideFromLiveContentInSec` (integer, required) — The duration of the from-live content to hide in seconds ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_HttpConfig - `dropCacheControlHeaderForLiveContent` (boolean, required) — When responding to live service requests, remove any "Cache-control" HTTP header passed from upstream, so that downstream will only use the "Expires" header for cache control - `enableHttp2` (boolean, optional) — The setting controls whether HTTP 2 is enabled. Default is disabled. - `enableSmoothStreaming412ErrorCode` (boolean, optional) — The setting controls whether 412 response code should be returned for error cases encountered in live Smooth Streaming egress. Default is disabled. - `enableWeakCiphers` (boolean, optional) — The setting controls whether to enable weak ciphers. Default is enabled. - `missingSegmentResponse` (enum, optional) — HTTP response for from-live missing segment (e.g. cause by source signal loss) - Allowed values: `HTTP_404`, `HTTP_200_0_BYTE` - `urlPrefix` (string, optional) — The setting controls whether to add a cluser-id as prefix to the URL of the content. Default is disabled. Valid characters are alphanumeric, hyphen, underscore ### com.harmonicinc.unifiedoriginenginelibrary.settings.LlcuIndexingConfig - `dropInvalidDataStreamUnits` (boolean, optional) - `enableDebugLog` (boolean, optional) - `enableVelocimeterActivityDump` (boolean, optional) - `exactFrameExtraction` (boolean, optional) - `indexingSpeedInKBps` (integer, optional) - `maxConcurrentIndexingJobs` (integer, optional) - `maxIndexingJobsPerNode` (integer, optional) - `runnableNodeTypes` (list of string, optional) - `timestampJumpThresholdToStop` (integer, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_LoggingConfig - `collectAccessLogs` (boolean, optional) - `maxSizeForErrorLogInMB` (integer, optional) - `maxSizeInMB` (integer, optional) - `nginxErrorLogLevel` (enum, optional) - Allowed values: `DEBUG`, `INFO`, `NOTICE`, `WARN`, `ERROR`, `CRIT`, `ALERT`, `EMERG` - `retentionPeriodInDays` (integer, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_MdsPropertiesConfig - `forceContentLength_HLS_SS_DASH` (boolean, optional) — Force Content-Length in HTTP response, i.e. deactivate Chunked Transfer Encoding - `maxNumOfIndexFileCacheEntry` (integer, optional) — Determine the cache limit for MDS to cache index files ### com.harmonicinc.unifiedoriginenginelibrary.settings.MdsProxySettings - `mode` (enum, optional) — The preferred mode to serve timeshift content - Allowed values: `BlueGreen`, `ActiveActive` ### com.harmonicinc.unifiedoriginenginelibrary.settings.MdsSchedulingConfig - `spreadEvenlyAcrossAvailabilityZones` (boolean, optional) — Whether media delivery servers should be launch evenly across availability zones (Mesos/Marathon deployment only) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_OttEgressProxyConfig - `cache` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_OttEgressProxyConfig_Cache, optional) - `developerMode` (boolean, optional) - `enableEarlyStartOver` (boolean, optional) — Control whether to improve timeshift playlist availability (when common segment delivery URL is enabled) - `enablePlaylistFiltering` (boolean, optional) — (Obsolete) Control whether to improve playlist availability by enabling filtering on playlist with start time adjustment for LiveEvent - `enablePlaylistMerger` (boolean, optional) — Control whether to enable playlist merger to improve start-over playlist latency (when common segment delivery URL is enabled) - `liveEventPlaylistCache` (com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_OttEgressProxyConfig_LiveEventPlaylistCache, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.PotfServerConfig - `chblBalanceFactor` (float, optional) - `connectionDrainingConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.ConnectionDrainingConfig, optional) - `enableIndependentPotfServers` (boolean, optional) - `loadBalancingMode` (enum, optional) - Allowed values: `ROUND_ROBIN`, `CONSISTENT_HASHING`, `CONSISTENT_HASHING_WITH_BOUNDED_LOAD` - `scalingConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.PotfServerScalingConfig, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_ProxyBufferSettings - `proxyBufferSizeInKB` (integer, required) — The size of per-connection buffer for buffering response from proxy upstream to client. Must be multiple of 4, from 12 to 224. ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_ProxyCacheLockSettings - `proxyCacheLockAgeForLiveInMs` (integer, optional) - `proxyCacheLockAgeForNonLiveInMs` (integer, optional) - `proxyCacheLockTimeoutForLiveInMs` (integer, optional) - `proxyCacheLockTimeoutForNonLiveInMs` (integer, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.ResourceConfig - `asset-operator` (com.harmonicinc.unifiedoriginenginelibrary.settings.ContainerResourceConfig, optional) - `indexer` (com.harmonicinc.unifiedoriginenginelibrary.settings.ContainerResourceConfig, optional) - `media-delivery-server` (com.harmonicinc.unifiedoriginenginelibrary.settings.ContainerResourceConfig, optional) - `potf-server` (com.harmonicinc.unifiedoriginenginelibrary.settings.ContainerResourceConfig, optional) - `retention-worker` (com.harmonicinc.unifiedoriginenginelibrary.settings.ContainerResourceConfig, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_StatisticsReportingConfig - `liveEventRecordingStorageScanningIntervalSeconds` (integer, optional) — Interval between each live event recording storage scanning routine, 0 to disable scanning - `vodStorageScanningIntervalSeconds` (integer, optional) — Interval between each VOD and LLCU storage scanning routine, 0 to disable scanning ### com.harmonicinc.unifiedoriginenginelibrary.settings.StorageSettings - `mgs3fsCachePoolSizeRatio` (double, optional) — Ratio of memory configured in mgs3fs cache pool size - `mgs3fsWorkerThreads` (integer, optional) — Number of worker threads for MGS3FS, set to null for MGS3FS' default - `preferred` (enum, optional) — The preferred storage to use for serving timeshift content - Allowed values: `PRIMARY`, `BACKUP` ### com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_LogEndpoint - `token` (string, optional) — Token of log aggregation system endpoint - `url` (string, optional) — URL of log aggregation system endpoint - `user` (string, optional) — User of log aggregation system endpoint ### com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_LogShipper - `resource` (com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_LogShipperResource, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_AdditionalHeaderConfig_AdditionalHeader - `name` (string, optional) - `value` (string, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig_KedaAutoscalerConfig - `cronTrigger` (com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig_CronTrigger, optional) - `responseTimeThresholdForFullScaleUp` (double, optional) - `scaleDownPolicy` (com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig_KedaScalePolicy, optional) - `scaleDownStabilizationWindowSeconds` (integer, optional) - `targetCpuPercent` (integer, optional) - `targetRequestRate` (integer, optional) - `targetThroughputMbps` (integer, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.ScaleDownCondition - `numConsecutiveCycles` (integer, required) — The number of consecutive sample periods with response latency under threshold that will actually trigger a scale-down - `responseLatencyThreshold` (double, required) — The value of the server response latency (Time to first response byte) to consider a scale-down ### com.harmonicinc.unifiedoriginenginelibrary.settings.ScaleUpCondition - `numConsecutiveCycles` (integer, required) — The number of consecutive sample periods with response latency exceeding threshold that will actually trigger a scale-up - `responseLatencyThreshold` (double, required) — The threshold of the server response latency (Time to first response byte) to consider a scale-up ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_HeaderAuthConfig_HeaderParam - `name` (string, optional) - `value` (string, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_OttEgressProxyConfig_Cache - `cleanUpIntervalInSec` (integer, optional) — Interval to remove expired entries in cache - `enable` (boolean, optional) — Whether to enable cache - `initEntries` (integer, optional) — Number of entry used in initial memory allocation - `initEntrySizeInByte` (integer, optional) — Entry size used in initial memory allocation - `maxCacheSizeInMB` (integer, optional) — Maximum allowed memory allocated for cache - `shards` (integer, optional) — Number of shards (must be power of 2). For concurrency enhancement - `ttlInSec` (integer, optional) — Time to expire the entry after added to cache ### com.harmonicinc.unifiedoriginenginelibrary.settings.OriginSettings_OttEgressProxyConfig_LiveEventPlaylistCache - `bufferItems` (integer, optional) — Size of buffer to get - `enable` (boolean, optional) — Whether to enable cache - `maxCacheSizeInMB` (integer, optional) — Maximum allowed memory allocated for cache - `numCounters` (integer, optional) — Active items in cache ### com.harmonicinc.unifiedoriginenginelibrary.settings.PotfServerScalingConfig - `ignoreNodeCountLimit` (boolean, optional) - `kedaAutoscaler` (com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig_KedaAutoscalerConfig, optional) - `legacyScalingConfig` (com.harmonicinc.unifiedoriginenginelibrary.settings.PotfServerLegacyScalingConfig, optional) - `maxNumServers` (integer, optional) - `minNumServers` (integer, optional) - `mode` (enum, optional) - Allowed values: `MANUAL`, `LEGACY`, `KEDA` ### com.harmonicinc.unifiedoriginenginelibrary.settings.ContainerResourceConfig - `cpu` (double, optional) — Number of CPU cores or units of virtual CPU - `cpuLimitRatio` (double, optional) — Ratio of CPU usage limit to allocated amount - `mallocArenaMax` (integer, optional) — Number of malloc arena for C/C++ application inside container - `memInMB` (double, optional) — Memory in MiB, this value should include the size of cache if memory-backed cache is enabled ### com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_LogShipperResource - `cpu` (com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_ResourceValue, optional) - `memInMB` (com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_ResourceValue, optional) ### com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig_CronTrigger - `desiredReplicas` (integer, optional) — Number of replicas to which the resource has to be scaled between the start and end of the cron schedule. - `enabled` (boolean, optional) — Whether KEDA autoscaling based on Cron Schedule is enabled. - `end` (string, optional) — Cron expression indicating the end of the cron schedule. - `start` (string, optional) — Cron expression indicating the start of the cron schedule. - `timezone` (string, optional) — The acceptable values would be a value from the IANA Time Zone Database. ### com.harmonicinc.unifiedoriginenginelibrary.settings.AutoScalingConfig_KedaScalePolicy - `periodSeconds` (integer, required) — The amount of time in seconds for which the rule should hold true - `type` (enum, required) — Allowed changed in terms of absolute number of pods or percentage of current replicas - Allowed values: `PODS`, `PERCENT` - `value` (integer, required) — No. of pods or percentage of existing replicas to scale down each time ### com.harmonicinc.unifiedoriginenginelibrary.settings.PotfServerLegacyScalingConfig - `coolDownPeriodSec` (integer, optional) — The cool-down period after scale-up / scale-down where no further scaling will take place - `scaleDownCondition` (com.harmonicinc.unifiedoriginenginelibrary.settings.ScaleDownCondition, optional) - `scaleDownStepPercentage` (integer, optional) — Percentage of number of existing nodes to remove during scale-down - `scaleUpCondition` (com.harmonicinc.unifiedoriginenginelibrary.settings.ScaleUpCondition, optional) - `scaleUpStepPercentage` (integer, optional) — Percentage of number of existing nodes to add during scale-up ### com.harmonicinc.unifiedoriginenginelibrary.settings.AccessLogToLokiConfig_ResourceValue - `limit` (double, optional) - `request` (double, optional) ## Examples ### Example 1 **Request** ```json {} ``` **Response** ```json {} ``` **SDK Code** ```python import requests url = "https://device.example.com/cluster1/vos-api/origin-engine/v1/settings" payload = {} headers = { "Authorization": "Bearer ", "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/origin-engine/v1/settings'; const options = { method: 'PUT', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; 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/origin-engine/v1/settings" payload := strings.NewReader("{}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Authorization", "Bearer ") 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/origin-engine/v1/settings") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://device.example.com/cluster1/vos-api/origin-engine/v1/settings") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('PUT', 'https://device.example.com/cluster1/vos-api/origin-engine/v1/settings', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://device.example.com/cluster1/vos-api/origin-engine/v1/settings"); var request = new RestRequest(Method.PUT); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://device.example.com/cluster1/vos-api/origin-engine/v1/settings")! 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 {} ``` **Response** ```json {} ``` **SDK Code** ```python import requests url = "https://device.example.com/cluster1/vos-api/origin-engine/v1/settings" payload = {} headers = { "Authorization": "Bearer ", "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/origin-engine/v1/settings'; const options = { method: 'PUT', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; 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/origin-engine/v1/settings" payload := strings.NewReader("{}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Authorization", "Bearer ") 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/origin-engine/v1/settings") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://device.example.com/cluster1/vos-api/origin-engine/v1/settings") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('PUT', 'https://device.example.com/cluster1/vos-api/origin-engine/v1/settings', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://device.example.com/cluster1/vos-api/origin-engine/v1/settings"); var request = new RestRequest(Method.PUT); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://device.example.com/cluster1/vos-api/origin-engine/v1/settings")! 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() ```