All Products
Search
Document Center

Serverless App Engine:GetPackageVersionAccessableUrl

Last Updated:Sep 01, 2023

Queries the URL of the code package of an application version.

A limit is imposed on the validity period of the URL.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers and does not have operation-specific request headers. For more information, see Common request and response headers.

Request syntax

GET /pop/v1/sam/oss/assignUploadSignature HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
PackageVersion String Query No eb204f8c-dbfb-4650-9a47-*

The version ID of the application. If you leave this parameter empty, the ID of the most recent deployed application version is used.

AppId String Query Yes ea401733-0180-4e22-9d12-*

The application ID.

Response parameters

Parameter Type Example Description
RequestId String 91F93257-7A4A-4BD3-9A7E-2F6EAE6D****

The request ID.

Message String success

The returned message.

TraceId String 0a981dd515966966104121683d****

The trace ID that is used to query the details of the request.

Data String https://.oss-cn-beijing.aliyuncs.com/*/*?*=*

The returned URL of the code package. If the code package is uploaded by using Serverless App Engine (SAE), the URL has a validity period. If the code package is deployed by using an image, null is returned.

ErrorCode String Null

The error code. Valid values:

  • If the call is successful, the ErrorCode parameter is not returned.
  • If the call fails, the ErrorCode parameter is returned. For more information, see the "Error codes" section in this topic.
Code String 200

The HTTP status code. Valid values:

  • 2xx: The call was successful.
  • 3xx: The call was redirected.
  • 4xx: The call failed.
  • 5xx: A server error occurred.
Success String true

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

GET /pop/v1/sam/oss/assignUploadSignature?PackageVersion=eb204f8c-dbfb-4650-9a47-*&AppId=ea401733-0180-4e22-9d12-* HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetPackageVersionAccessableUrlResponse>
    <RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
    <Message>success</Message>
    <TraceId>0a981dd515966966104121683d****</TraceId>
    <Data>https://.oss-cn-beijing.aliyuncs.com/*/*?*=*</Data>
    <Code>200</Code>
    <Success>true</Success>
</GetPackageVersionAccessableUrlResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message" : "success",
  "TraceId" : "0a981dd515966966104121683d****",
  "Data" : "https://.oss-cn-beijing.aliyuncs.com/*/*?*=*",
  "Code" : "200",
  "Success" : "true"
}

Error codes

For a list of error codes, see Service error codes.