Querying Dependencies
Function
This API is used to query all dependencies.
URI
GET /v2/{project_id}/fgs/dependencies
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
marker |
No |
String |
Final record queried last time. Default value: 0. |
maxitems |
No |
String |
Maximum number of items to return in a request. |
ispublic |
No |
String |
Whether a dependency is public. |
dependency_type |
No |
String |
Dependency type. Options: public, private, and all. Default value: all. |
runtime |
No |
String |
Environment in which a FunctionGraph function is executed. Options:
|
name |
No |
String |
Dependence name. |
limit |
No |
String |
Maximum number of dependencies that can be obtained in a query. Default value: 400. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
dependencies |
Array of ListDependenciesResult objects |
Dependency list. |
next_marker |
Long |
Next read location. |
count |
Long |
Total number of dependencies. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Dependency ID. |
owner |
String |
Dependency owner. public indicates a public dependency. |
link |
String |
URL of the dependency in the OBS console. |
runtime |
String |
Environment in which a FunctionGraph function is executed. Options:
Enumeration values:
|
etag |
String |
Dependency ID. |
size |
Long |
Dependency size. |
name |
String |
Dependency name. |
file_name |
String |
Dependency file name. |
description |
String |
Dependency description. |
version |
Long |
Dependence version. |
last_modified |
Long |
Time when the dependency was last updated. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Dependencies of the current tenant.
GET https://{Endpoint}/v2/{project_id}/fgs/ListDependencies?marker=0&maxitems=400
Example Responses
Status code: 200
ok
{ "dependencies" : [ { "id" : "6578de50-9a18-48fa-b84e-b2d36636e433", "owner" : "public", "link" : "https://{obs_endpoint}/functionstage-examples/fg_test_pandas_1.1.3.zip", "runtime" : "Python3.6", "etag" : "35a893d9495b3e22259b2773996bc94d-6", "size" : 31009808, "name" : "panda1.1.3" } ], "next_marker" : 43, "count" : 43 }
Status Codes
Status Code |
Description |
---|---|
200 |
ok |
401 |
Unauthorized. |
403 |
Forbidden. |
404 |
Not found. |
500 |
Internal server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot