Obtaining a Dependency List

Function

This API is used to obtain a dependency list.

URI

GET /v2/{project_id}/fgs/dependencies

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

dependency_type

No

String

Dependency type. Options: public, private, and all. Default value: all.

Enumeration values:

  • public

  • private

  • all

runtime

No

String

Runtime.

Enumeration values:

  • Java8

  • Node.js6.10

  • Node.js8.10

  • Node.js10.16

  • Node.js12.13

  • Python2.7

  • Python3.6

  • Go1.8

  • Go1.x

  • C#(.NET Core 2.0)

  • C#(.NET Core 2.1)

  • C#(.NET Core 3.1)

  • PHP7.3

name

No

String

Name of the dependency.

marker

No

String

Final record queried last time. Default value: 0.

limit

No

String

Maximum number of dependencies that can be obtained in a query. Default value: 400.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

count

Integer

Total number of dependencies.

dependencies

Array of Dependency objects

Dependency list.

next_marker

Long

Next read location.

Table 4 Dependency

Parameter

Type

Description

id

String

Dependency ID.

owner

String

Dependency owner.

link

String

URL of the dependency in the OBS console.

runtime

String

Runtime.

etag

String

Unique ID of the dependency.

size

Long

Size of the dependency.

name

String

Name of the dependency.

description

String

Description of the dependency.

file_name

String

File name of the dependency.

Example Requests

GET https://{functiongraph_endpoint}/v2/7aad83af3e8d42e99ac194e8419e2c9b/fgs/dependencies

Example Responses

Status code: 200

ok

{
  "count" : 1,
  "dependencies" : [ {
    "id" : "4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3",
    "owner" : "*****",
    "link" : "https://***.obs.cn-north-1.myhuaweicloud.com/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3.zip",
    "runtime" : "Python3.6",
    "etag" : "83863be4b6c3a86aef995dbc83aae68f",
    "size" : 577118,
    "name" : "python-kafka",
    "description" : "kafka lib of python",
    "file_name" : "python-kafka.zip"
  } ],
  "next_marker" : 2
}

Status Codes

Status Code

Description

200

ok

Error Codes

See Error Codes.