Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/04/25 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2024/04/25 (UTC)."],[],[],null,["# Method: media.download\n\nDownload a file attached to a case.\n\nWhen this endpoint is called, no \"response body\" will be returned. Instead, the attachment's blob will be returned.\n\nNote: HTTP requests must append \"?alt=media\" to the URL.\n\nEXAMPLES:\n\ncURL: \n\n name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\"\n curl \\\n --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\"\n\nPython: \n\n import googleapiclient.discovery\n\n apiVersion = \"v2\"\n supportApiService = googleapiclient.discovery.build(\n serviceName=\"cloudsupport\",\n version=apiVersion,\n discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={apiVersion}\",\n )\n request = supportApiService.media().download(\n name=\"projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR\"\n )\n request.uri = request.uri.split(\"?\")[0] + \"?alt=media\"\n print(request.execute())\n\n### HTTP request\n\n`GET https://cloudsupport.googleapis.com/v2beta/{name=*/*/cases/*/attachments/*}:download`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloudsupport`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]