Method: internalappsharingartifacts.uploadapk
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tải một tệp APK lên tính năng chia sẻ ứng dụng nội bộ. Nếu bạn đang sử dụng thư viện ứng dụng Google API, vui lòng tăng thời gian chờ của yêu cầu http trước khi gọi điểm cuối này (nên dùng thời gian chờ 2 phút).
Hãy xem phần Thời gian chờ và lỗi để biết ví dụ trong Java.
Yêu cầu HTTP
- URI tải lên, đối với các yêu cầu tải nội dung nghe nhìn lên:
POST https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/internalappsharing/{packageName}/artifacts/apk
- URI siêu dữ liệu, đối với các yêu cầu chỉ siêu dữ liệu:
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/internalappsharing/{packageName}/artifacts/apk
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Các tham số |
packageName |
string
Tên gói của ứng dụng.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa một bản sao của Media
.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của InternalAppSharingArtifact
.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/androidpublisher
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eUploads an APK to internal app sharing for testing purposes within your organization.\u003c/p\u003e\n"],["\u003cp\u003eRequires a \u003ccode\u003epackageName\u003c/code\u003e to identify the application and uses a \u003ccode\u003eMedia\u003c/code\u003e object for the APK file.\u003c/p\u003e\n"],["\u003cp\u003eReturns an \u003ccode\u003eInternalAppSharingArtifact\u003c/code\u003e object with details about the uploaded artifact upon successful completion.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003eandroidpublisher\u003c/code\u003e OAuth scope for authorization to access and manage your application.\u003c/p\u003e\n"],["\u003cp\u003eIt's recommended to increase the HTTP request timeout when using Google API client libraries due to potential upload time.\u003c/p\u003e\n"]]],["This document details uploading an APK for internal app sharing via two HTTP POST URIs, one for media uploads and one for metadata. The `packageName` is a required path parameter. Requests require an instance of `Media` in the body and will return an `InternalAppSharingArtifact` object upon success. The process necessitates the `https://www.googleapis.com/auth/androidpublisher` OAuth scope and suggests a 2-minute HTTP request timeout when using Google API client libraries.\n"],null,["# Method: internalappsharingartifacts.uploadapk\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUploads an APK to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended).\n\nSee [Timeouts and Errors](https://developers.google.com/api-client-library/java/google-api-java-client/errors) for an example in java.\n\n### HTTP request\n\n- Upload URI, for media upload requests: \n `POST https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/internalappsharing/{packageName}/artifacts/apk`\n- Metadata URI, for metadata-only requests: \n `POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/internalappsharing/{packageName}/artifacts/apk`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|-----------------------------------|\n| `packageName` | `string` Package name of the app. |\n\n### Request body\n\nThe request body contains an instance of `Media`.\n\n### Response body\n\nIf successful, the response body contains an instance of [InternalAppSharingArtifact](/android-publisher/api-ref/rest/v3/internalappsharingartifacts#InternalAppSharingArtifact).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]