Method: media.upload

  • This API creates an enterprise file from user-provided content and returns a public download URL.

  • Media upload requests use a specific upload URI with a POST method.

  • Metadata-only requests use a different metadata URI, also with a POST method.

  • The request requires a customer path parameter to specify the relevant customer.

  • The response provides a downloadUri which is a public URI for users to download the file.

Creates an enterprise file from the content provided by user. Returns a public download url for end user.

HTTP request

  • Upload URI, for media upload requests:
    POST https://chromepolicy.googleapis.com/upload/v1/{customer=customers/*}/policies/files:uploadPolicyFile
  • Metadata URI, for metadata-only requests:
    POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/files:uploadPolicyFile

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
customer

string

Required. The customer for which the file upload will apply.

Request body

The request body contains data with the following structure:

JSON representation
{
  "policyField": string
}
Fields
policyField

string

Required. The fully qualified policy schema and field name this file is uploaded for. This information will be used to validate the content type of the file.

Response body

Response message for downloading an uploaded file.

If successful, the response body contains data with the following structure:

JSON representation
{
  "downloadUri": string
}
Fields
downloadUri

string

The uri for end user to download the file.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/chrome.management.policy