Method: media.upload

  • Analyzes uploaded app bundles, returning a Report within a long-running Operation.

  • Supports two upload methods: a regular POST with X-Goog-Upload-Protocol: raw for binary-only uploads, and a multipart POST with X-Goog-Upload-Protocol: multipart for uploads with metadata.

  • Requires specifying the app resource name ( accounts/{account_id}/apps/{app_id} ) in the URL path.

  • Optionally accepts a codeReferenceId in the request body to associate the upload with a specific code revision.

  • Requires the https://www.googleapis.com/auth/checks OAuth scope for authorization.

Analyzes the uploaded app bundle and returns a google.longrunning.Operation containing the generated Report .

Example (upload only)

Send a regular POST request with the header X-Goog-Upload-Protocol: raw .

 POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1
X-Goog-Upload-Protocol: raw
Content-Length: <binary size>
Content-Type: application/octet-stream

<binary> 

Send a multipart POST request where the first body part contains the metadata JSON and the second body part contains the binary upload. Include the header X-Goog-Upload-Protocol: multipart .

 POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1
X-Goog-Upload-Protocol: multipart
Content-Length: ?
Content-Type: multipart/related; boundary=BOUNDARY

--BOUNDARY
Content-Type: application/json

{"codeReferenceId":"db5bcc20f94055fb5bc08cbb9b0e7a5530308786"}
--BOUNDARY

<binary>
--BOUNDARY-- 

HTTP request

  • Upload URI, for media upload requests:
    POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload
  • Metadata URI, for metadata-only requests:
    POST https://checks.googleapis.com/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Resource name of the app.

Example: accounts/123/apps/456

Request body

The request body contains data with the following structure:

JSON representation
 { 
 "codeReferenceId" 
 : 
 string 
 , 
 "appBinaryFileType" 
 : 
 enum (  AppBinaryFileType 
 
) 
 } 
Fields
code Reference Id

string

Optional. Git commit hash or changelist number associated with the upload.

app Binary File Type

enum ( AppBinaryFileType )

Optional. The type of the uploaded app binary. If not provided, the server assumes APK file for Android and IPA file for iOS.

Response body

If successful, the response body contains an instance of Operation .

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/checks

For more information, see the OAuth 2.0 Overview .

AppBinaryFileType

The type of the uploaded app binary.

Enums
APP_BINARY_FILE_TYPE_UNSPECIFIED Not specified.
ANDROID_APK .apk file type.
ANDROID_AAB .aab (app bundle) file type.
IOS_IPA .ipa file type.
Create a Mobile Website
View Site in Mobile | Classic
Share by: