Method: internalappsharingartifacts.uploadapk
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
संगठन में काम करने वालों के साथ ऐप्लिकेशन शेयर करने की सुविधा के लिए APK अपलोड करता है. अगर Google API क्लाइंट लाइब्रेरी का इस्तेमाल किया जा रहा है, तो इस एंडपॉइंट को कॉल करने से पहले, कृपया एचटीटीपी अनुरोध का टाइम आउट बढ़ाएं. हमारा सुझाव है कि दो मिनट का टाइम आउट सेट करें.
JavaScript के उदाहरण के लिए, टाइमआउट और गड़बड़ियां देखें.
एचटीटीपी अनुरोध
- मीडिया अपलोड करने के अनुरोधों के लिए, यूआरआई अपलोड करें:
POST https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/internalappsharing/{packageName}/artifacts/apk
- सिर्फ़ मेटाडेटा से जुड़े अनुरोधों के लिए, मेटाडेटा यूआरआई:
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/internalappsharing/{packageName}/artifacts/apk
यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ के पैरामीटर
पैरामीटर |
packageName |
string
ऐप्लिकेशन का पैकेज नाम.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में Media
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में InternalAppSharingArtifact
का एक इंस्टेंस शामिल किया जाता है.
अनुमति देने के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/androidpublisher
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 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,["- [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\nHTTP 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\nPath parameters\n\n| Parameters ||\n|---------------|-----------------------------------|\n| `packageName` | `string` Package name of the app. |\n\nRequest body\n\nThe request body contains an instance of `Media`.\n\nResponse body\n\nIf successful, the response body contains an instance of [InternalAppSharingArtifact](/android-publisher/api-ref/rest/v3/internalappsharingartifacts#InternalAppSharingArtifact).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]