Method: media.upload

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

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

Response message for downloading an uploaded file. Next ID: 2

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