Method: media.download

Download a file attached to a case.

Note: HTTP requests must append "?alt=media" to the URL.

EXAMPLES:

cURL:

name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ"
curl \
  --header "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://cloudsupport.googleapis.com/v2/$name:download?alt=media"

Python:

import googleapiclient.discovery


apiVersion = "v2"
supportApiService = googleapiclient.discovery.build(
    serviceName="cloudsupport",
    version=apiVersion,
    discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={apiVersion}",
)
request = supportApiService.media().download(
    name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR"
)
request.uri = request.uri.split("?")[0] + "?alt=media"
print(request.execute())

HTTP request

GET https://cloudsupport.googleapis.com/v2beta/{name=*/*/cases/*/attachments/*}:download

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

The name of the file attachment to download.

Request body

The request body must be empty.

Response body

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

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudsupport
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.