You can call this operation to obtain the list of layers.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

GET /layers HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
prefix String Query No prefix-Layer

The name prefix of the layer. The names of the returned resources must contain the prefix. If the name prefix is a, the names of the returned resources must start with a.

startKey String Query No Layer-name

The name of the initial layer. The start position of the result list. Results are in alphabetical order and the results that follow startKey (inclusive) are listed.

nextToken String Query No Layer-name

The token used to obtain more results. If the number of resources exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent calls to obtain more results. You do not need to provide this parameter in the first call.

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

An array that consists of the information of layers.

nextToken String _FUN_NAS-classify

The token used to obtain more results.

Note If this parameter is not returned, all results are returned.


Sample requests

GET /2016-08-15/layers HTTP/1.1
Common request headers

Sample success responses

JSON format

HTTP/1.1 200 OK

  "layers" : [ {
    "layerName" : "Layer-name",
    "version" : 1,
    "description" : "Layer-description",
    "code" : {
      "repositoryType" : "OSS",
      "location" : ""
    "codeSize" : 421,
    "codeChecksum" : "2825179536350****",
    "createTime" : "2020-11-11T11:08:00Z",
    "acl" : 0,
    "compatibleRuntime" : [ "python3" ],
    "arn" : "02f81d283888f5ec63442a88fe82b260#Layer-name#1"
  } ],
  "nextToken" : "_FUN_NAS-classify"