> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://mediakind.ferndocs.com/mkio/api/media/streaming-endpoints/update-streaming-endpoint/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mediakind.ferndocs.com/_mcp/server. # Update Streaming Endpoint PATCH https://app.mk.io/api/v1/projects/{project_name}/media/streamingEndpoints/{endpoint_name} Content-Type: application/json Update a Streaming Endpoint. Only the Name and cdnProvider fields are immutable. RBAC Capability Required: `ams.streamingendpoint.update` Reference: https://mediakind.ferndocs.com/mkio/api/media/streaming-endpoints/update-streaming-endpoint ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `project_name` (string, required) - `endpoint_name` (string, required) ### Body (application/json) This endpoint expects a StreamingEndpointSchema. - `location` (string, required) — The name of the location in which the streaming endpoint is located. This field must match the location in which the user's subscription is provisioned. - `properties` (StreamingEndpointProperties, required) — The properties of the streaming endpoint. - `name` (string, optional) — The name of the resource - `tags` (map from string to string, optional) — A dictionary of key:value pairs describing the resource. Search may be implemented against tags in the future. ## Response ### 200 The updated Streaming Endpoint - `location` (string, required) — The name of the location in which the streaming endpoint is located. This field must match the location in which the user's subscription is provisioned. - `properties` (StreamingEndpointProperties, required) — The properties of the streaming endpoint. - `name` (string, optional) — The name of the resource - `tags` (map from string to string, optional) — A dictionary of key:value pairs describing the resource. Search may be implemented against tags in the future. ## Errors ### 400 Bad Request Error Bad Request - `error` (ErrorDetail, required) — Pertinent information about the error - `ref` (string, required) — A reference to the request that caused the error. - `status` (integer, required) — The HTTP status code ### 401 Unauthorized Error Unauthorized - `error` (ErrorDetail, required) — Pertinent information about the error - `ref` (string, required) — A reference to the request that caused the error. - `status` (integer, required) — The HTTP status code ### 403 Forbidden Error Forbidden - `error` (ErrorDetail, required) — Pertinent information about the error - `ref` (string, required) — A reference to the request that caused the error. - `status` (integer, required) — The HTTP status code ### 404 Not Found Error Not Found - `error` (ErrorDetail, required) — Pertinent information about the error - `ref` (string, required) — A reference to the request that caused the error. - `status` (integer, required) — The HTTP status code ### 429 Too Many Requests Error Too Many Requests - `error` (ErrorDetail, required) — Pertinent information about the error - `ref` (string, required) — A reference to the request that caused the error. - `status` (integer, required) — The HTTP status code ### 500 Internal Server Error Internal Server Error - `error` (ErrorDetail, required) — Pertinent information about the error - `ref` (string, required) — A reference to the request that caused the error. - `status` (integer, required) — The HTTP status code ## Types ### StreamingEndpointProperties - `scaleUnits` (integer, required) — The number of scale units for the streaming endpoint. This will determine your minimum scale. A value of 0 will result in the streaming endpoints using a Standard SKU. A value greater than zero indicates that the 'Premium' SKUs will be provisioned. - `accessControl` (StreamingEndpointAccessControl, optional) — The access control settings for the streaming endpoint. - `advancedSettingsName` (string, optional, nullable) — Name of the advanced settings configuration to apply to this streaming endpoint. These configuration blocks are managed by MediaKind and you should not set this field unless MediaKind support has asked you to. - `cdnBasePath` (string, optional) — If CDN is enabled, the path that must be inserted after the hostname and before the locator, e.g. https\://\\\. - `cdnEnabled` (boolean, optional, default: false) — Indicates if CDN is enabled for the streaming endpoint. - `cdnProfile` (string, optional) — If CDN is enabled, the optional CDN profile name for the streaming endpoint. - `created` (datetime, optional) — The creation date and time of the streaming endpoint. Set by the system. - `crossSiteAccessPolicies` (CrossSiteAccessPolicies, optional) — Cross-site access policies are CDN policies for Smooth or DASH streaming that determine which domains clients are permitted to playback content from. - `customHostNames` (list of string, optional) — NOT SUPPORTED pending implementation of DNS validation. Custom host names for the streaming endpoint. Must be unique within the region. If not specified, a default hostname will be used. The best practice for custom DNS is to use a CNAME pointing to the autogenerated hostname derived from the streaming endpoint name, and to configure your CDN to deliver a HOST header to the origin server for routing purposes. - `description` (string, optional, nullable) — The description of the streaming endpoint. - `hostName` (string, optional) — The fqdn of the streaming endpoint. This is the output hostname and is always configured. To set a custom hostname, use the customHostNames property. - `lastModified` (datetime, optional) — The last modified date and time of the streaming endpoint. Set by the system. - `maxCacheAge` (integer, optional, default: 86400) — The maximum amount of time that segments will be cached, in seconds. This value is superseded by any ETAG values set by the infrastructure. - `maxManifestCacheAge` (integer, optional, default: 60) — The maximum amount of time that closed manifests will be cached, in seconds. This value is superseded by any ETAG values set by the infrastructure. - `provisioningState` (enum, optional) — The provisioning state of the streaming endpoint. Set by the system. One of InProgress,Succeeded,Failed. - Allowed values: `InProgress`, `Succeeded`, `Failed` - `publicName` (string, optional) — Public name for the streaming endpoint - `resourceState` (enum, optional) — The runtime state of the streaming endpoint. Set by the system. - Allowed values: `Creating`, `Updating`, `Scaling`, `Starting`, `Stopping`, `Restarting`, `Deleting`, `Running`, `Stopped`, `Deleted` - `serverCredentialNames` (list of string, optional) — Names of the server credentials to use for endpoint protection. Only basic authentication is supported. Not supported if CDN is enabled. - `shieldCache` (StreamingEndpointShieldCache, optional) — Shield cache configuration for the streaming endpoint. - `sku` (StreamingEndpointsCurrentSku, optional) — The SKU definition for the streaming endpoint. - `urlStyle` (string, optional) — The style of URL associated with the streaming endpoint. The default is 'AMS' and you should only use any other value if advised to by MediaKind - `cdnProvider` (enum, optional, deprecated) — DEPRECATED: CDN provider is set by default when CDN is enabled. Value will be ignored if provided. This is provided for backwards compatibility and will be removed in a future release. - Allowed values: `StandardAkamai` ### ErrorDetail - `code` (string, required) — The error code. - `detail` (string, required) — The error message. - `extraDetail` (map from string to any, optional) — Extra information regarding this error. ### StreamingEndpointAccessControl - `ip` (StreamingEndpointIPACL, optional) — IP-based access control configuration for the streaming endpoint. If omitted, this will default to 0.0.0.0/0 - `akamai` (StreamingEndpointAkamiACL, optional, deprecated) — DEPRECATED: This is provided for backwards compatibility and will be removed in a future release. Akamai access control configuration for the streaming endpoint. If the Akamai CDN profile is specified and CDN is enabled, this field is required. ### CrossSiteAccessPolicies - `clientAccessPolicy` (string, optional, nullable) — The XML content of the client access policy file. Search 'clientaccesspolicy.xml' to learn more. - `crossDomainPolicy` (string, optional, nullable) — The XML content of the cross-domain policy file. Search 'crossdomain.xml' to learn more. ### StreamingEndpointShieldCache - `scaleUnits` (integer, required, nullable) — The number of scale units for the shield cache. A value of 0 indicates that no shield cache will be deployed. This feature should only be used if advised by MediaKind. It is controlled by a feature flag. ### StreamingEndpointsCurrentSku - `name` (enum, required) — The name of the SKU. Will default to 'Standard' if the sku configuration is not provided. - Allowed values: `Standard`, `Premium` - `capacity` (integer, optional) — This is the bandwidth capacity of current streaming unit configuration ### StreamingEndpointIPACL - `allow` (list of IPAcl, required) — The IP allow list. ### StreamingEndpointAkamiACL - `akamaiSignatureHeaderAuthenticationKeyList` (list of AkamiHeaderAuthKey, required, deprecated) — DEPRECATED: This is provided for backwards compatibility and will be removed in a future release. The Akamai access control configuration for the streaming endpoint. Learn more: https://techdocs.akamai.com/netstorage-usage/reference/example-authentication-headers ### IPAcl - `address` (string, required) - `name` (string, optional, default: ) — The name of the IP ACL. - `subnetPrefixLength` (integer, optional, default: 32) — The subnet prefix length (see CIDR notation). ### AkamiHeaderAuthKey - `base64Key` (string, optional) - `expiration` (string, optional) - `identifier` (string, optional) ## Examples **Request** ```json { "location": "string", "properties": { "scaleUnits": 1 } } ``` **Response** ```json { "location": "string", "properties": { "scaleUnits": 1, "accessControl": { "ip": { "allow": [ { "address": "string", "name": "", "subnetPrefixLength": 32 } ] }, "akamai": { "akamaiSignatureHeaderAuthenticationKeyList": [ { "base64Key": "string", "expiration": "string", "identifier": "string" } ] } }, "advancedSettingsName": "string", "cdnBasePath": "string", "cdnEnabled": false, "cdnProfile": "string", "created": "2024-01-15T09:30:00Z", "crossSiteAccessPolicies": { "clientAccessPolicy": "string", "crossDomainPolicy": "string" }, "customHostNames": [ "string" ], "description": "string", "hostName": "string", "lastModified": "2024-01-15T09:30:00Z", "maxCacheAge": 86400, "maxManifestCacheAge": 60, "provisioningState": "InProgress", "publicName": "string", "resourceState": "Creating", "serverCredentialNames": [ "string" ], "shieldCache": { "scaleUnits": 1 }, "sku": { "name": "Standard", "capacity": 1 }, "urlStyle": "string", "cdnProvider": "StandardAkamai" }, "name": "name", "tags": {} } ``` **SDK Code** ```python import requests url = "https://app.mk.io/api/v1/projects/project_name/media/streamingEndpoints/endpoint_name" payload = { "location": "string", "properties": { "scaleUnits": 1 } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.mk.io/api/v1/projects/project_name/media/streamingEndpoints/endpoint_name'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"location":"string","properties":{"scaleUnits":1}}' }; 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://app.mk.io/api/v1/projects/project_name/media/streamingEndpoints/endpoint_name" payload := strings.NewReader("{\n \"location\": \"string\",\n \"properties\": {\n \"scaleUnits\": 1\n }\n}") req, _ := http.NewRequest("PATCH", 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://app.mk.io/api/v1/projects/project_name/media/streamingEndpoints/endpoint_name") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"location\": \"string\",\n \"properties\": {\n \"scaleUnits\": 1\n }\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://app.mk.io/api/v1/projects/project_name/media/streamingEndpoints/endpoint_name") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"location\": \"string\",\n \"properties\": {\n \"scaleUnits\": 1\n }\n}") .asString(); ``` ```php request('PATCH', 'https://app.mk.io/api/v1/projects/project_name/media/streamingEndpoints/endpoint_name', [ 'body' => '{ "location": "string", "properties": { "scaleUnits": 1 } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.mk.io/api/v1/projects/project_name/media/streamingEndpoints/endpoint_name"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"location\": \"string\",\n \"properties\": {\n \"scaleUnits\": 1\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "location": "string", "properties": ["scaleUnits": 1] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://app.mk.io/api/v1/projects/project_name/media/streamingEndpoints/endpoint_name")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" 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() ```