You can call this operation to obtain the list of layer versions.
Request headers
This operation uses only common request headers. For more information, see Common parameters.
Request syntax
GET /layers/{layerName}/versions HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
layerName | String | Path | Yes | Layer-name |
The name of the layer. |
startVersion | Integer | Query | No | 1 |
The initial version of the layer. |
limit | Integer | Query | No | 20 |
The maximum number of resources to be returned. Default value: 20. Maximum value: 100. The number of returned resources is smaller than or equal to the specified number. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
layers | Array of Layer |
The list of layer versions. |
|
nextVersion | Integer | 2 |
The token used to obtain more results. Note If this parameter is not returned, all results are returned.
|
Examples
Sample requests
GET /2016-08-15/layers/Layer-name/versions?startVersion=1&limit=20 HTTP/1.1
Common request headers
Sample success responses
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"layers" : [ {
"layerName" : "Layer-name",
"version" : 1,
"description" : "Layer-description",
"code" : {
"repositoryType" : "OSS",
"location" : "https://xyz.oss-cnxxx.aliyuncs.com/xxx/xxx/xxx"
},
"codeSize" : 421,
"codeChecksum" : "2825179536350****",
"createTime" : "2020-11-11T11:08:00Z",
"acl" : 0,
"compatibleRuntime" : [ "python3" ],
"arn" : "02f81d283888f5ec63442a88fe82b260#Layer-name#1"
} ],
"nextVersion" : 2
}