Updates an existing resource.

Scopes

You will need authorization for at least one of the following scopes to make a valid call:

  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtube.force-ssl
  • https://www.googleapis.com/auth/youtubepartner

If unset, the scope for this method defaults to https://www.googleapis.com/auth/youtube. You can set the scope for this method like this: youtube3 --scope <scope> playlist-items update ...

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

PlaylistItem:
  content-details:
    end-at: string
    note: string
    start-at: string
    video-id: string
    video-published-at: string
  etag: string
  id: string
  kind: string
  snippet:
    channel-id: string
    channel-title: string
    description: string
    playlist-id: string
    position: integer
    published-at: string
    resource-id:
      channel-id: string
      kind: string
      playlist-id: string
      video-id: string
    thumbnails:
      default:
        height: integer
        url: string
        width: integer
      high:
        height: integer
        url: string
        width: integer
      maxres:
        height: integer
        url: string
        width: integer
      medium:
        height: integer
        url: string
        width: integer
      standard:
        height: integer
        url: string
        width: integer
    title: string
    video-owner-channel-id: string
    video-owner-channel-title: string
  status:
    privacy-status: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .content-details end-at=rebum.
    • The time, measured in seconds from the start of the video, when the video should stop playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) By default, assume that the video.endTime is the end of the video.
  • note=amet
    • A user-generated note for this item.
  • start-at=sea
    • The time, measured in seconds from the start of the video, when the video should start playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) The default value is 0.
  • video-id=sadipscing
    • The ID that YouTube uses to uniquely identify a video. To retrieve the video resource, set the id query parameter to this value in your API request.
  • video-published-at=dolore

    • The date and time that the video was published to YouTube.
  • .. etag=amet

    • Etag of this resource.
  • id=invidunt
    • The ID that YouTube uses to uniquely identify the playlist item.
  • kind=invidunt
    • Identifies what kind of resource this is. Value: the fixed string "youtube#playlistItem".
  • snippet channel-id=dolores
    • The ID that YouTube uses to uniquely identify the user that added the item to the playlist.
  • channel-title=diam
    • Channel title for the channel that the playlist item belongs to.
  • description=sanctus
    • The item's description.
  • playlist-id=sed
    • The ID that YouTube uses to uniquely identify thGe playlist that the playlist item is in.
  • position=76
    • The order in which the item appears in the playlist. The value uses a zero-based index, so the first item has a position of 0, the second item has a position of 1, and so forth.
  • published-at=sit
    • The date and time that the item was added to the playlist.
  • resource-id channel-id=et
    • The ID that YouTube uses to uniquely identify the referred resource, if that resource is a channel. This property is only present if the resourceId.kind value is youtube#channel.
  • kind=ea
    • The type of the API resource.
  • playlist-id=dolor
    • The ID that YouTube uses to uniquely identify the referred resource, if that resource is a playlist. This property is only present if the resourceId.kind value is youtube#playlist.
  • video-id=sadipscing

    • The ID that YouTube uses to uniquely identify the referred resource, if that resource is a video. This property is only present if the resourceId.kind value is youtube#video.
  • ..thumbnails.default height=9

    • (Optional) Height of the thumbnail image.
  • url=at
    • The thumbnail image's URL.
  • width=24

    • (Optional) Width of the thumbnail image.
  • ..high height=88

    • (Optional) Height of the thumbnail image.
  • url=magna
    • The thumbnail image's URL.
  • width=49

    • (Optional) Width of the thumbnail image.
  • ..maxres height=94

    • (Optional) Height of the thumbnail image.
  • url=gubergren
    • The thumbnail image's URL.
  • width=26

    • (Optional) Width of the thumbnail image.
  • ..medium height=67

    • (Optional) Height of the thumbnail image.
  • url=tempor
    • The thumbnail image's URL.
  • width=86

    • (Optional) Width of the thumbnail image.
  • ..standard height=78

    • (Optional) Height of the thumbnail image.
  • url=et
    • The thumbnail image's URL.
  • width=52

    • (Optional) Width of the thumbnail image.
  • ... title=diam

    • The item's title.
  • video-owner-channel-id=elitr
    • Channel id for the channel this video belongs to.
  • video-owner-channel-title=sea

    • Channel title for the channel this video belongs to.
  • ..status privacy-status=vero

    • This resource's privacy status.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p on-behalf-of-content-owner=string
    • Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").