> 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/live-events/update-live-event/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mediakind.ferndocs.com/_mcp/server. # Update a Live Event PATCH https://app.mk.io/api/v1/projects/{project_name}/media/liveEvents/{event_name} Content-Type: application/json Update a live event. Currently only `properties.pipeline` is patchable. RBAC Capability Required: `ams.liveevent.update` Reference: https://mediakind.ferndocs.com/mkio/api/media/live-events/update-live-event ## 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) - `event_name` (string, required) ### Body (application/json) This endpoint expects a LiveEventPatchSchema. - `properties` (LiveEventPropertiesPatch, required) — The properties of the live event. ## Response ### 200 Updated - `properties` (LiveEventProperties, required) — The properties of the live event. - `tags` (map from string to string, required) — A dictionary of tags associated with the live event. Maximum number of tags: 16. Maximum length of a tag: 64 characters. For the purposes of the `$label_key` and `$label` queries this field will be checked. This field cannot be modified, only set during creation. - `location` (string, optional) — Deprecated field. This field cannot be modified, only set during creation. - `name` (string, optional) — The name of the resource ## 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 ### LiveEventPropertiesPatch - `pipeline` (PipelineArgumentsPatch, optional) — Not currently supported. AI pipeline settings ### LiveEventProperties - `encoding` (LiveEventEncoding, required) — The encoding configuration for the live event. This includes settings like encoding type and preset name. This field cannot be modified, only set during creation. - `input` (LiveEventInput, required) — The configuration for the input of the live event. This includes settings like key frame interval duration, streaming protocol, access token, and endpoints. This field cannot be modified, only set during creation. - `streamOptions` (list of string, required) — A list of streaming options for the live event. One of 'Default' or 'LowLatency'. Only one value permitted in the list. This field cannot be modified, only set during creation. - `useStaticHostname` (boolean, required) — A boolean value that indicates whether a static hostname is assigned to input and preview endpoints. If not set, will default to 'false' and IP addresses will be provided. This field cannot be modified, only set during creation. - `created` (string, optional) — The time when the live event was created. - `crossSiteAccessPolicies` (CrossSiteAccessPolicies, optional) — The configuration for cross-site access policies. This includes the XML content of the client access policy and cross-domain policy files. This field cannot be modified, only set during creation. - `description` (string, optional) — An optional description for the live event. This field cannot be modified, only set during creation. - `hostnamePrefix` (string, optional) — Applied when useStaticHostname=true to specify the first part of the hostname for all input and preview addresses. This field cannot be modified, only set during creation. - `lastModified` (string, optional) — The last time the live event was modified. - `pipeline` (PipelineArguments, optional) — Not currently supported. AI pipeline settings - `preview` (LiveEventPreview, optional) — The configuration for the preview of the live event. This includes settings like preview locator, streaming policy name, access control, and endpoints. This field cannot be modified, only set during creation. - `provisioningState` (string, optional) — The current provisioning state of the resource. One of 'InProgress', 'Succeeded', or 'Failed' - `resourceState` (enum, optional) — The current state of the resource. One of 'Stopped', 'Starting', 'Running', 'Stopping', or 'Deleting'. - Allowed values: `Stopped`, `Starting`, `Running`, `Stopping`, `Deleting` - `transcriptions` (list of any, optional) — Not currently supported. Transcription settings for the live event. This field cannot be modified, only set during creation. ### 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. ### PipelineArgumentsPatch - `arguments` (map from string to list of ArgumentSchema, optional) — Arguments to each operation in the AI pipeline - `name` (string, optional) — The name of the AI pipeline the Transform will execute. ### LiveEventEncoding - `encodingType` (enum, required) — Live event type. When encodingType is set to PassthroughBasic or PassthroughStandard, the service simply passes through the incoming video and audio layer(s) to the output. When encodingType is set to Standard or Premium1080p, a live encoder transcodes the incoming stream into multiple bitrates or layers - Allowed values: `None`, `PassthroughBasic`, `PassthroughStandard`, `Premium1080p`, `Standard` - `keyFrameInterval` (string, optional, default: PT2S) — Use an ISO 8601 time value between 1 and 10 seconds to specify the output fragment length for the video and audio tracks of an encoding live event. For example, use PT2S to indicate 2 seconds. For the video track it also defines the key frame interval, or the length of a GoP (group of pictures). If this value is not set for an encoding live event, the fragment duration defaults to 2 seconds. The value cannot be set for pass-through live events. - `presetName` (string, optional) — Defaults to either Default720p or Default1080p depending on encoding type. May be used to specify alternative encoding templates - contact support for assistance if your needs are complex. - `stretchMode` (enum, optional) — Determines how aspect ratio will be preserved when there is a mismatch between the input and output aspect ratios. Autofit to pad the output. Autosize to ignore the output ratio and pick the largest dimension that fits, and None to clip the content. - Allowed values: `None`, `AutoSize`, `AutoFit` ### LiveEventInput - `accessControl` (InputAccessControl, required) — Access control for live event input. - `accessToken` (string, required) — For RTMP, a UUID in string form to uniquely identify the stream. For SRT, an arbitrary string of between 10 and 79 characters, used as the passphrase. This can be specified at creation time but cannot be updated. If omitted or null, the service will generate a unique value. - `keyFrameIntervalDuration` (string, required) — ISO 8601 time duration of the key frame interval duration of the input. This value sets the EXT-X-TARGETDURATION property in the HLS output. For example, use PT2S to indicate 2 seconds. Leave the value empty for encoding live events. - `timedMetadataEndpoints` (list of LiveEventTimedMetadataEndpoint, required) — The metadata endpoints for the live event. - `endpoints` (list of LiveEventEndpoint, optional) — Populated server-side. The input endpoints for the live event. - `streamingProtocol` (enum, optional, default: RTMP) — The input protocol for the live event. This is specified at creation time and cannot be updated. - Allowed values: `RTMP`, `RTMPS`, `SRT` ### 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. ### PipelineArguments - `name` (string, required) — The name of the AI pipeline the Transform will execute. - `arguments` (map from string to list of ArgumentSchema, optional) — Arguments to each operation in the AI pipeline ### LiveEventPreview - `accessControl` (PreviewAccessControl, optional) — Address-based ACLs for access to the preview. - `alternativeMediaId` (string, optional) — Not currently supported. Will be used to support DRM license acquisition for preview content. - `endpoints` (list of LiveEventEndpoint, optional) — Populated server-side. The endpoints that are used for previewing the live event. - `previewLocator` (string, optional) — The ID of the locator for the preview. This is automatically generated when the live event is created, and removed when the live Event is deleted. The caller may specify a locator GUID, in which case the caller must ensure that the GUID is unique and not already used by another resource. - `streamingPolicyName` (string, optional, default: Predefined_ClearStreamingOnly) — The name of the DRM streaming policy for the live event preview. Defaults to Predefined_ClearStreamingOnly and no other value is presently supported. ### ArgumentSchema - `name` (string, required) — The name of the argument - `value` (any, required) — The value of the argument ### InputAccessControl - `ip` (IPAccessControl, required) — The IP access control for the live event inputs. ### LiveEventTimedMetadataEndpoint - `url` (string, required) ### LiveEventEndpoint - `protocol` (string, optional) — The streaming protocol for the endpoint. Possible values include: 'SRT', 'RTMP'. - `url` (string, optional) — The IP address or DNS with port and protocol ### PreviewAccessControl - `ip` (IPAccessControl, required) — The IP access control for the preview endpoint. Determines who will be able to access preview content. ### IPAccessControl - `allow` (list of IPRange, required) — The IP ranges that will be allowed to access the preview. If empty, all IPs will be allowed. ### IPRange - `address` (string, required) — The IP address or DNS with port or protocol - `name` (string, required) — The name of the IP range. This is for your reference only. examples: 'everyone', 'dave's house', 'corp vpn'. - `subnetPrefixLength` (integer, required) — The subnet prefix length (see CIDR notation). ## Examples ### Add a new argument to an operation (application/json-patch+json) **Request** ```json [ { "op": "add", "path": "/properties/pipeline/arguments/VodTranscription/0", "value": { "name": "language", "value": "en-GB" } } ] ``` **SDK Code** ```python Add a new argument to an operation (application/json-patch+json) import requests url = "https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name" payload = [ { "op": "add", "path": "/properties/pipeline/arguments/VodTranscription/0", "value": { "name": "language", "value": "en-GB" } } ] headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Add a new argument to an operation (application/json-patch+json) const url = 'https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '[{"op":"add","path":"/properties/pipeline/arguments/VodTranscription/0","value":{"name":"language","value":"en-GB"}}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Add a new argument to an operation (application/json-patch+json) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name" payload := strings.NewReader("[\n {\n \"op\": \"add\",\n \"path\": \"/properties/pipeline/arguments/VodTranscription/0\",\n \"value\": {\n \"name\": \"language\",\n \"value\": \"en-GB\"\n }\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 Add a new argument to an operation (application/json-patch+json) require 'uri' require 'net/http' url = URI("https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_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 {\n \"op\": \"add\",\n \"path\": \"/properties/pipeline/arguments/VodTranscription/0\",\n \"value\": {\n \"name\": \"language\",\n \"value\": \"en-GB\"\n }\n }\n]" response = http.request(request) puts response.read_body ``` ```java Add a new argument to an operation (application/json-patch+json) 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/liveEvents/:event_name") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("[\n {\n \"op\": \"add\",\n \"path\": \"/properties/pipeline/arguments/VodTranscription/0\",\n \"value\": {\n \"name\": \"language\",\n \"value\": \"en-GB\"\n }\n }\n]") .asString(); ``` ```php Add a new argument to an operation (application/json-patch+json) request('PATCH', 'https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name', [ 'body' => '[ { "op": "add", "path": "/properties/pipeline/arguments/VodTranscription/0", "value": { "name": "language", "value": "en-GB" } } ]', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Add a new argument to an operation (application/json-patch+json) using RestSharp; var client = new RestClient("https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "[\n {\n \"op\": \"add\",\n \"path\": \"/properties/pipeline/arguments/VodTranscription/0\",\n \"value\": {\n \"name\": \"language\",\n \"value\": \"en-GB\"\n }\n }\n]", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Add a new argument to an operation (application/json-patch+json) import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ [ "op": "add", "path": "/properties/pipeline/arguments/VodTranscription/0", "value": [ "name": "language", "value": "en-GB" ] ] ] 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/liveEvents/:event_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() ``` ### Add or replace pipeline with arguments (application/json-patch+json) **Request** ```json [ { "op": "add", "path": "/properties/pipeline", "value": { "arguments": { "VodTranscription": [ { "name": "language", "value": "en-GB" } ] }, "name": "{pipeline_name}" } } ] ``` **SDK Code** ```python Add or replace pipeline with arguments (application/json-patch+json) import requests url = "https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name" payload = [ { "op": "add", "path": "/properties/pipeline", "value": { "arguments": { "VodTranscription": [ { "name": "language", "value": "en-GB" } ] }, "name": "{pipeline_name}" } } ] headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Add or replace pipeline with arguments (application/json-patch+json) const url = 'https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '[{"op":"add","path":"/properties/pipeline","value":{"arguments":{"VodTranscription":[{"name":"language","value":"en-GB"}]},"name":"{pipeline_name}"}}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Add or replace pipeline with arguments (application/json-patch+json) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name" payload := strings.NewReader("[\n {\n \"op\": \"add\",\n \"path\": \"/properties/pipeline\",\n \"value\": {\n \"arguments\": {\n \"VodTranscription\": [\n {\n \"name\": \"language\",\n \"value\": \"en-GB\"\n }\n ]\n },\n \"name\": \"{pipeline_name}\"\n }\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 Add or replace pipeline with arguments (application/json-patch+json) require 'uri' require 'net/http' url = URI("https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_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 {\n \"op\": \"add\",\n \"path\": \"/properties/pipeline\",\n \"value\": {\n \"arguments\": {\n \"VodTranscription\": [\n {\n \"name\": \"language\",\n \"value\": \"en-GB\"\n }\n ]\n },\n \"name\": \"{pipeline_name}\"\n }\n }\n]" response = http.request(request) puts response.read_body ``` ```java Add or replace pipeline with arguments (application/json-patch+json) 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/liveEvents/:event_name") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("[\n {\n \"op\": \"add\",\n \"path\": \"/properties/pipeline\",\n \"value\": {\n \"arguments\": {\n \"VodTranscription\": [\n {\n \"name\": \"language\",\n \"value\": \"en-GB\"\n }\n ]\n },\n \"name\": \"{pipeline_name}\"\n }\n }\n]") .asString(); ``` ```php Add or replace pipeline with arguments (application/json-patch+json) request('PATCH', 'https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name', [ 'body' => '[ { "op": "add", "path": "/properties/pipeline", "value": { "arguments": { "VodTranscription": [ { "name": "language", "value": "en-GB" } ] }, "name": "{pipeline_name}" } } ]', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Add or replace pipeline with arguments (application/json-patch+json) using RestSharp; var client = new RestClient("https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "[\n {\n \"op\": \"add\",\n \"path\": \"/properties/pipeline\",\n \"value\": {\n \"arguments\": {\n \"VodTranscription\": [\n {\n \"name\": \"language\",\n \"value\": \"en-GB\"\n }\n ]\n },\n \"name\": \"{pipeline_name}\"\n }\n }\n]", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Add or replace pipeline with arguments (application/json-patch+json) import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ [ "op": "add", "path": "/properties/pipeline", "value": [ "arguments": ["VodTranscription": [ [ "name": "language", "value": "en-GB" ] ]], "name": "{pipeline_name}" ] ] ] 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/liveEvents/:event_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() ``` ### Change to a different pipeline by name (application/json-patch+json) **Request** ```json [ { "op": "replace", "path": "/properties/pipeline/name", "value": "{pipeline_name}" } ] ``` **SDK Code** ```python Change to a different pipeline by name (application/json-patch+json) import requests url = "https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name" payload = [ { "op": "replace", "path": "/properties/pipeline/name", "value": "{pipeline_name}" } ] headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Change to a different pipeline by name (application/json-patch+json) const url = 'https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '[{"op":"replace","path":"/properties/pipeline/name","value":"{pipeline_name}"}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Change to a different pipeline by name (application/json-patch+json) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name" payload := strings.NewReader("[\n {\n \"op\": \"replace\",\n \"path\": \"/properties/pipeline/name\",\n \"value\": \"{pipeline_name}\"\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 Change to a different pipeline by name (application/json-patch+json) require 'uri' require 'net/http' url = URI("https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_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 {\n \"op\": \"replace\",\n \"path\": \"/properties/pipeline/name\",\n \"value\": \"{pipeline_name}\"\n }\n]" response = http.request(request) puts response.read_body ``` ```java Change to a different pipeline by name (application/json-patch+json) 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/liveEvents/:event_name") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("[\n {\n \"op\": \"replace\",\n \"path\": \"/properties/pipeline/name\",\n \"value\": \"{pipeline_name}\"\n }\n]") .asString(); ``` ```php Change to a different pipeline by name (application/json-patch+json) request('PATCH', 'https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name', [ 'body' => '[ { "op": "replace", "path": "/properties/pipeline/name", "value": "{pipeline_name}" } ]', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Change to a different pipeline by name (application/json-patch+json) using RestSharp; var client = new RestClient("https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "[\n {\n \"op\": \"replace\",\n \"path\": \"/properties/pipeline/name\",\n \"value\": \"{pipeline_name}\"\n }\n]", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Change to a different pipeline by name (application/json-patch+json) import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ [ "op": "replace", "path": "/properties/pipeline/name", "value": "{pipeline_name}" ] ] 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/liveEvents/:event_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() ``` ### Change argument name of an operation (application/json-patch+json) **Request** ```json [ { "op": "replace", "path": "/properties/pipeline/arguments/VodTranscription/0/name", "value": "language-code" } ] ``` **SDK Code** ```python Change argument name of an operation (application/json-patch+json) import requests url = "https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name" payload = [ { "op": "replace", "path": "/properties/pipeline/arguments/VodTranscription/0/name", "value": "language-code" } ] headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Change argument name of an operation (application/json-patch+json) const url = 'https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '[{"op":"replace","path":"/properties/pipeline/arguments/VodTranscription/0/name","value":"language-code"}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Change argument name of an operation (application/json-patch+json) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name" payload := strings.NewReader("[\n {\n \"op\": \"replace\",\n \"path\": \"/properties/pipeline/arguments/VodTranscription/0/name\",\n \"value\": \"language-code\"\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 Change argument name of an operation (application/json-patch+json) require 'uri' require 'net/http' url = URI("https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_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 {\n \"op\": \"replace\",\n \"path\": \"/properties/pipeline/arguments/VodTranscription/0/name\",\n \"value\": \"language-code\"\n }\n]" response = http.request(request) puts response.read_body ``` ```java Change argument name of an operation (application/json-patch+json) 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/liveEvents/:event_name") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("[\n {\n \"op\": \"replace\",\n \"path\": \"/properties/pipeline/arguments/VodTranscription/0/name\",\n \"value\": \"language-code\"\n }\n]") .asString(); ``` ```php Change argument name of an operation (application/json-patch+json) request('PATCH', 'https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name', [ 'body' => '[ { "op": "replace", "path": "/properties/pipeline/arguments/VodTranscription/0/name", "value": "language-code" } ]', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Change argument name of an operation (application/json-patch+json) using RestSharp; var client = new RestClient("https://app.mk.io/api/v1/projects/:project_name/media/liveEvents/:event_name"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "[\n {\n \"op\": \"replace\",\n \"path\": \"/properties/pipeline/arguments/VodTranscription/0/name\",\n \"value\": \"language-code\"\n }\n]", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Change argument name of an operation (application/json-patch+json) import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ [ "op": "replace", "path": "/properties/pipeline/arguments/VodTranscription/0/name", "value": "language-code" ] ] 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/liveEvents/:event_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() ```