REST Resource: projects.locations.jobs

Resource: Job

Transcoding job resource.

JSON representation
{
  "name": string,
  "inputUri": string,
  "outputUri": string,
  "priority": integer,
  "originUri": {
    object (OriginUri)
  },
  "state": enum (ProcessingState),
  "progress": {
    object (Progress)
  },
  "failureReason": string,
  "failureDetails": [
    {
      object (FailureDetail)
    }
  ],
  "createTime": string,
  "startTime": string,
  "endTime": string,
  "ttlAfterCompletionDays": integer,

  // Union field job_config can be only one of the following:
  "templateId": string,
  "config": {
    object (JobConfig)
  }
  // End of list of possible types for union field job_config.
}
Fields
name

string

The resource name of the job. Format: projects/{project}/locations/{location}/jobs/{job}

inputUri

string

Input only. Specify the inputUri to populate empty uri fields in each element of Job.config.inputs or JobTemplate.config.inputs when using template. URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, gs://bucket/inputs/file.mp4).

outputUri

string

Input only. Specify the outputUri to populate an empty Job.config.output.uri or JobTemplate.config.output.uri when using template. URI for the output file(s). For example, gs://my-bucket/outputs/.

priority

integer

Specify the priority of the job. Enter a value between 0 and 100, where 0 is the lowest priority and 100 is the highest priority. The default is 0.

originUri

object (OriginUri)

Output only. The origin URI.

state

enum (ProcessingState)

Output only. The current state of the job.

progress

object (Progress)

Output only. Estimated fractional progress, from 0 to 1 for each step.

failureReason

string

Output only. A description of the reason for the failure. This property is always present when state is FAILED.

failureDetails[]

object (FailureDetail)

Output only. List of failure details. This property may contain additional information about the failure when failureReason is present.

createTime

string (Timestamp format)

Output only. The time the job was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

startTime

string (Timestamp format)

Output only. The time the transcoding started.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

Output only. The time the transcoding finished.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

ttlAfterCompletionDays

integer

Job time to live value in days, which will be effective after job completion. Job should be deleted automatically after the given TTL. Enter a value between 1 and 90. The default is 30.

Union field job_config. Specify the job_config for the transcoding job. If you don't specify the job_config, the API selects templateId; this template ID is set to preset/web-hd by default. When you use a template_id to create a job, the Job.config is populated by the JobTemplate.config.
job_config can be only one of the following:
templateId

string

Input only. Specify the templateId to use for populating Job.config. The default is preset/web-hd.

Preset Transcoder templates: - preset/{preset_id}

  • User defined JobTemplate: {jobTemplateId}
config

object (JobConfig)

The configuration for this job.

OriginUri

The origin URI.

JSON representation
{
  "hls": string,
  "dash": string
}
Fields
hls

string

HLS manifest URI per https://tools.ietf.org/html/rfc8216#section-4.3.4. If multiple HLS manifests are created, only the first one is listed.

dash

string

Dash manifest URI. If multiple Dash manifests are created, only the first one is listed.

ProcessingState

The current state of the job.

Enums
PROCESSING_STATE_UNSPECIFIED The processing state is not specified.
PENDING The job is enqueued and will be picked up for processing soon.
RUNNING The job is being processed.
SUCCEEDED The job has been completed successfully.
FAILED The job has failed. For additional information, see failureReason and failureDetails

Progress

Estimated fractional progress for each step, from 0 to 1.

JSON representation
{
  "analyzed": number,
  "encoded": number,
  "uploaded": number,
  "notified": number
}
Fields
analyzed

number

Estimated fractional progress for analyzing step.

encoded

number

Estimated fractional progress for encoding step.

uploaded

number

Estimated fractional progress for uploading step.

notified

number

Estimated fractional progress for notifying step.

FailureDetail

Additional information about the reasons for the failure.

JSON representation
{
  "description": string
}
Fields
description

string

A description of the failure.

Methods

create

Creates a job in the specified region.

delete

Deletes a job.

get

Returns the job data.

list

Lists jobs in the specified region.