Inserts a new creative asset.

Scopes

You will need authorization for the https://www.googleapis.com/auth/dfatrafficking scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/dfatrafficking. You can set the scope for this method like this: dfareporting3d5 --scope <scope> media upload ...

Required Scalar Arguments

  • <profile-id> (string)
    • User profile ID associated with this request.
  • <advertiser-id> (string)
    • Advertiser ID of this creative. This is a required field.

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:

CreativeAssetMetadata:
  asset-identifier:
    name: string
    type: string
  detected-features: [string]
  id: string
  id-dimension-value:
    dimension-name: string
    etag: string
    id: string
    kind: string
    match-type: string
    value: string
  kind: string
  media-request-info:
    current-bytes: string
    custom-data: string
    diff-object-version: string
    final-status: integer
    notification-type: string
    request-id: string
    request-received-params-serving-info: string
    total-bytes: string
    total-bytes-is-estimated: boolean
  media-response-info:
    custom-data: string
    data-storage-transform: string
    dynamic-drop-target: string
    dynamic-dropzone: string
    request-class: string
    scotty-agent-user-id: string
    scotty-customer-log: string
    traffic-class-field: string
    verify-hash-from-header: boolean
  rich-media: boolean
  warned-validation-rules: [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 .asset-identifier name=et
    • Name of the creative asset. This is a required field while inserting an asset. After insertion, this assetIdentifier is used to identify the uploaded asset. Characters in the name must be alphanumeric or one of the following: ".-_ ". Spaces are allowed.
  • type=magna

    • Type of asset to upload. This is a required field. FLASH and IMAGE are no longer supported for new uploads. All image assets should use HTML_IMAGE.
  • .. detected-features=no

    • List of feature dependencies for the creative asset that are detected by Campaign Manager. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative correctly. This is a read-only, auto-generated field.
    • Each invocation of this argument appends the given value to the array.
  • id=ipsum
    • Numeric ID of the asset. This is a read-only, auto-generated field.
  • id-dimension-value dimension-name=voluptua.
    • The name of the dimension.
  • etag=at
    • The eTag of this response for caching purposes.
  • id=sanctus
    • The ID associated with the value if available.
  • kind=sed
    • The kind of resource this is, in this case dfareporting#dimensionValue.
  • match-type=amet.
    • Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch') allow a matchType other than EXACT.
  • value=takimata

    • The value of the dimension.
  • .. kind=amet.

    • Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeAssetMetadata".
  • media-request-info current-bytes=duo
    • The number of current bytes uploaded or downloaded.
  • custom-data=ipsum
    • Data to be copied to backend requests. Custom data is returned to Scotty in the agent_state field, which Scotty will then provide in subsequent upload notifications.
  • diff-object-version=gubergren
    • Set if the http request info is diff encoded. The value of this field is the version number of the base revision. This is corresponding to Apiary's mediaDiffObjectVersion (//depot/google3/java/com/google/api/server/media/variable/DiffObjectVersionVariable.java). See go/esf-scotty-diff-upload for more information.
  • final-status=50
    • The existence of the final_status field indicates that this is the last call to the agent for this request_id. http://google3/uploader/agent/scotty_agent.proto?l=737&rcl=347601929
  • notification-type=gubergren
    • The type of notification received from Scotty.
  • request-id=eos
    • The Scotty request ID.
  • request-received-params-serving-info=dolor
    • The partition of the Scotty server handling this request. type is uploader_service.RequestReceivedParamsServingInfo LINT.IfChange(request_received_params_serving_info_annotations) LINT.ThenChange()
  • total-bytes=ea
    • The total size of the file.
  • total-bytes-is-estimated=true

    • Whether the total bytes field contains an estimated data.
  • ..media-response-info custom-data=invidunt

    • Data to copy from backend response to the next backend requests. Custom data is returned to Scotty in the agent_state field, which Scotty will then provide in subsequent upload notifications.
  • data-storage-transform=amet
    • Specifies any transformation to be applied to data before persisting it or retrieving from storage. E.g., encryption options for blobstore2. This should be of the form uploader_service.DataStorageTransform.
  • dynamic-drop-target=duo
    • Specifies the Scotty Drop Target to use for uploads. If present in a media response, Scotty does not upload to a standard drop zone. Instead, Scotty saves the upload directly to the location specified in this drop target. Unlike drop zones, the drop target is the final storage location for an upload. So, the agent does not need to clone the blob at the end of the upload. The agent is responsible for garbage collecting any orphaned blobs that may occur due to aborted uploads. For more information, see the drop target design doc here: http://goto/ScottyDropTarget This field will be preferred to dynamicDropzone. If provided, the identified field in the response must be of the type uploader.agent.DropTarget.
  • dynamic-dropzone=ipsum
    • Specifies the Scotty dropzone to use for uploads.
  • request-class=sed
    • Request class to use for all Blobstore operations for this request.
  • scotty-agent-user-id=ut
    • Requester ID passed along to be recorded in the Scotty logs
  • scotty-customer-log=gubergren
    • Customer-specific data to be recorded in the Scotty logs type is logs_proto_scotty.CustomerLog
  • traffic-class-field=rebum.
    • Specifies the TrafficClass that Scotty should use for any RPCs to fetch the response bytes. Will override the traffic class GTOS of the incoming http request. This is a temporary field to facilitate whitelisting and experimentation by the bigstore agent only. For instance, this does not apply to RTMP reads. WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.
  • verify-hash-from-header=true

    • Tells Scotty to verify hashes on the agent's behalf by parsing out the X-Goog-Hash header.
  • .. rich-media=true

    • True if the uploaded asset is a rich media asset. This is a read-only, auto-generated field.
  • warned-validation-rules=ipsum
    • Rules validated during code generation that generated a warning. This is a read-only, auto-generated field. Possible values are: - "ADMOB_REFERENCED" - "ASSET_FORMAT_UNSUPPORTED_DCM" - "ASSET_INVALID" - "CLICK_TAG_HARD_CODED" - "CLICK_TAG_INVALID" - "CLICK_TAG_IN_GWD" - "CLICK_TAG_MISSING" - "CLICK_TAG_MORE_THAN_ONE" - "CLICK_TAG_NON_TOP_LEVEL" - "COMPONENT_UNSUPPORTED_DCM" - "ENABLER_UNSUPPORTED_METHOD_DCM" - "EXTERNAL_FILE_REFERENCED" - "FILE_DETAIL_EMPTY" - "FILE_TYPE_INVALID" - "GWD_PROPERTIES_INVALID" - "HTML5_FEATURE_UNSUPPORTED" - "LINKED_FILE_NOT_FOUND" - "MAX_FLASH_VERSION_11" - "MRAID_REFERENCED" - "NOT_SSL_COMPLIANT" - "ORPHANED_ASSET" - "PRIMARY_HTML_MISSING" - "SVG_INVALID" - "ZIP_INVALID"
    • Each invocation of this argument appends the given value to the array.

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.

Required Upload Flags

This method supports the upload of data, which requires all of the following flags to be set:

  • -u simple
    • simple - Upload media all at once.
  • -f file
    • Path to file to upload. It must be seekable.

The following flag may be set:

  • -m mime
    • the mime type, like 'application/octet-stream', which is the default

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 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").