# Update a Job

patch ` https://app.mk.io/api/v1/projects/:project_name/media/transforms/:transform_name/jobs/:job_name`

Update an existing Job.
Update is only supported for `description`, `priority` and `correlationData`.

RBAC Capability Required: `ams.job.update`

## Authentication

Authorization Bearer

Bearer authentication of the form `Bearer <token>` , where token is your auth token.

## Path parameters

- **project_name** string Required
- **transform_name** string Required
- **job_name** string Required

## Request

This endpoint expects an object.

**properties** object [JobPropertiesPatch](https://docs.mediakind.com/api-reference/media-api/schemas/jobpropertiespatch) Required

Properties of the job

- **correlationData** map from strings to any Optional

Customer provided key, value pairs that will be returned in Job and JobOutput state events.

- **description** string or null Optional <= 1024 characters

The description of the Job.

**input** object Required

The inputs of the Job.

Discriminated by `@odata.type`. Select one variant:

### #Microsoft.Media.JobInputAsset object [JobInputAsset](https://docs.mediakind.com/api-reference/media-api/schemas/jobinputasset)

- **@odata.type** string Required

The discriminator for derived types.
- **assetName** string Required

The name of the input Asset
- **end** object Optional

Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.

Discriminated by `@odata.type`. Select one variant:

#### #Microsoft.Media.AbsoluteClipTime object [AbsoluteClipTime](https://docs.mediakind.com/api-reference/media-api/schemas/absolutecliptime)

- **@odata.type** string Required

The discriminator for derived types.
  - **time** string Optional pattern: ^P(?:(?P<years>\d+)Y)?(?:(?P<months>\d+)M)?(?:(?P<weeks>\d+)W)?(?:(?P<days>\d+)D)?T(?:(?P<hours>\d+)H)?(?:(?P<minutes>\d+)M)?(?:(?P<seconds_fract>(?:\d*.)?\d+)S)?$

The time position on the timeline of the input media. Specified as an ISO8601 period. e.g PT30S for 30 seconds.

#### #Microsoft.Media.UtcClipTime object [UtcClipTime](https://docs.mediakind.com/api-reference/media-api/schemas/utccliptime)

- **@odata.type** string Required

The discriminator for derived types.
  - **time** string Optional format: date-time

The time position on the timeline of the input media based on UTC time.

- **trigger** object [ScteTrigger](https://docs.mediakind.com/api-reference/media-api/schemas/sctetrigger) Optional

SCTE-35 signal trigger. Recording starts/stops at the first matching signal.

- **filters** list of list of maps Optional

Outer array is OR-combined; each inner array is AND-combined field matchers.

- **searchRange** object [ScteTriggerSearchRange](https://docs.mediakind.com/api-reference/media-api/schemas/sctetriggersearchrange) Optional

Bounds the signal search to [anchor+startOffset, anchor+endOffset]. Anchor is `time` if present, else dispatch_time (start) or resolved_start (end).

- **files** list of strings Optional

List of files.

- **label** string Optional

A label that is assigned to a JobInputClip.

- **start** object Optional

Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media.

**outputs** list of objects Required

The outputs for the Job.

Discriminated by `@odata.type`. Select one variant:

### #Microsoft.Media.JobOutputAsset object [JobOutputAssetPatch](https://docs.mediakind.com/api-reference/media-api/schemas/joboutputassetpatch)

- **@odata.type** string Required

The discriminator for derived types.
- **assetName** string Required

The name of the output Asset
- **label** string Optional

A label that is assigned to a JobOutput in order to help uniquely identify it.
- **priority** enum Optional Defaults to Normal

Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal.

Allowed values: High, Low, Normal

## Response

- **200** Job was updated

- **id** string Optional

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- **name** string Optional 1-260 characters pattern: ^\[^\\\'<>%&:\?/*+]+$

The name of the resource
- **properties** object [JobProperties](https://docs.mediakind.com/api-reference/media-api/schemas/jobproperties) Required

Properties of the job

- **correlationData** map from strings to any Optional

Customer provided key, value pairs that will be returned in Job and JobOutput state events.

- **created** string Optional format: date-time

The creation date and time of the Job. Set by the system.
- **description** string or null Optional <= 1024 characters

The description of the Job.
- **endTime** string or null Optional

The UTC date and time at which this Job finished processing
- **input** object Required

The inputs of the Job.

Discriminated by `@odata.type`. Select one variant:

### #Microsoft.Media.JobInputAsset object [JobInputAsset](https://docs.mediakind.com/api-reference/media-api/schemas/jobinputasset)

- **@odata.type** string Required

The discriminator for derived types.
- **assetName** string Required

The name of the input Asset
- **end** object Optional

Defines a point on the timeline of the input media at which processing will end. Defaults to the end of the input media.

Discriminated by `@odata.type`. Select one variant:

### #Microsoft.Media.AbsoluteClipTime object [AbsoluteClipTime](https://docs.mediakind.com/api-reference/media-api/schemas/absolutecliptime)

- **@odata.type** string Required
  
  The discriminator for derived types.

- **time** string Optional pattern: ^P(?:(?P<years>\d+)Y)?(?:(?P<months>\d+)M)?(?:(?P<weeks>\d+)W)?(?:(?P<days>\d+)D)?T(?:(?P<hours>\d+)H)?(?:(?P<minutes>\d+)M)?(?:(?P<seconds_fract>(?:\d*.)?\d+)S)?$

The time position on the timeline of the input media. Specified as an ISO8601 period. e.g PT30S for 30 seconds.

### #Microsoft.Media.UtcClipTime object [UtcClipTime](https://docs.mediakind.com/api-reference/media-api/schemas/utccliptime)

- **@odata.type** string Required

The discriminator for derived types.
- **time** string Optional format: date-time

The time position on the timeline of the input media based on UTC time.

- **trigger** object [ScteTrigger](https://docs.mediakind.com/api-reference/media-api/schemas/sctetrigger) Optional

SCTE-35 signal trigger. Recording starts/stops at the first matching signal.

- **filters** list of list of maps Optional

Outer array is OR-combined; each inner array is AND-combined field matchers.

- **searchRange** object [ScteTriggerSearchRange](https://docs.mediakind.com/api-reference/media-api/schemas/sctetriggersearchrange) Optional

Bounds the signal search to [anchor+startOffset, anchor+endOffset]. Anchor is `time` if present, else dispatch_time (start) or resolved_start (end).

- **files** list of strings Optional

List of files.

- **label** string Optional

A label that is assigned to a JobInputClip.

- **start** object Optional

Defines a point on the timeline of the input media at which processing will start. Defaults to the beginning of the input media.

**outputs** list of objects Required

The outputs for the Job.

Discriminated by `@odata.type`. Select one variant:

### #Microsoft.Media.JobOutputAsset object [JobOutputAsset](https://docs.mediakind.com/api-reference/media-api/schemas/joboutputasset)

- **@odata.type** string Required

The discriminator for derived types.
- **assetName** string Required

The name of the output Asset
- **label** string Optional

A label that is assigned to a JobOutput in order to help uniquely identify it.
- **priority** enum Optional Defaults to Normal

Priority with which the job should be processed. Higher priority jobs are processed before lower priority jobs. If not set, the default is normal.

Allowed values: High, Low, Normal

## Errors

- **400** Bad Request
  - **error** object [ErrorDetail](https://docs.mediakind.com/api-reference/media-api/schemas/errordetail) Required

Pertinent information about the error
  - **code** string Required
  - **detail** string Required
  - **extraDetail** map from strings to any Optional
  - **ref** string Required
  - **status** integer Required

- **401** Unauthorized
  - **error** object [ErrorDetail](https://docs.mediakind.com/api-reference/media-api/schemas/errordetail) Required

- **403** Forbidden
  - **error** object [ErrorDetail](https://docs.mediakind.com/api-reference/media-api/schemas/errordetail) Required

- **404** Not Found
  - **error** object [ErrorDetail](https://docs.mediakind.com/api-reference/media-api/schemas/errordetail) Required

- **429** Too Many Requests
  - **error** object [ErrorDetail](https://docs.mediakind.com/api-reference/media-api/schemas/errordetail) Required

- **500** Internal Server Error
  - **error** object [ErrorDetail](https://docs.mediakind.com/api-reference/media-api/schemas/errordetail) Required
