Help Center> FunctionGraph> API Reference> Function Management Zone API> Querying All Version Aliases of a Function

Querying All Version Aliases of a Function

Function

This API is used to query all version aliases of a function.

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/aliases

Table 1 Path parameters

Parameter

Mandatory

Type

Description

function_urn

Yes

String

Function URN.

project_id

Yes

String

Tenant's project ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

[items]

Array of FuncAlias objects

Function alias list.

Table 3 FuncAlias

Parameter

Type

Description

name

String

Alias name.

description

String

Description of the alias.

version

String

Version corresponding to the alias.

last_modified

String

Latest update time.

alias_urn

String

Alias URN.

additional_version_weights

Object

Additional version configuration. Key indicates the name of the additional version, which cannot be LATEST. The value is the percentage (1% to 99%) of traffic to be forwarded to the additional version.

Example Requests

GET https://{functiongraph_endpoint}/v2/7aad83af3e8d42e99ac194e8419e2c9b/fgs/functions/urn:fss:xxxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:latest/aliases

Example Responses

Status code: 200

OK

[ {
  "name" : "a1",
  "version" : "latest",
  "description" : "",
  "last_modified" : "2019-10-31T11:37:58+08:00",
  "alias_urn" : "urn:fss:cn-north-7:46b6f338fc3445b8846c71dfb1fbd9e8:function:default:xxxxx:!a1"
} ]

Status code: 404

Not Found

{
  "error_code" : "FSS.1051",
  "error_msg" : "Not found the function"
}

Status Codes

Status Code

Description

200

OK

404

Not Found

Error Codes

See Error Codes.