Obtaining Your Algorithm Services
Function
This API is used to obtain your algorithm services.
URI
GET /v2/{project_id}/algorithm/services/user
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name_like |
No |
String |
Service name. Fuzzy match is supported. |
is_paged |
No |
Boolean |
Whether to display records on different pages Default: false |
page_size |
No |
Integer |
Maximum number of records on each page Minimum: 5 Maximum: 200 Default: 10 |
page_num |
No |
Integer |
Page number Minimum: 1 Maximum: 10000 Default: 1 |
order_by |
No |
String |
Sorting order. The value can be asc or desc, indicating ascending or descending order. Default: desc |
sort_name |
No |
String |
Sorting parameter. The value can be created_at or function_version. Default: created_at |
alg_status |
No |
Array |
Service status. Multiple options can be selected. Options: service_running, service_deploying, service_failed, service_stopping, service_stopped, service_upgrading, service_finished, service_concerning, and not_deployed. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. For details about how to obtain a user token, see Authentication. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Number of filtered algorithms |
service_list |
Array of ServicesListInfoDto objects |
Service list |
total |
Integer |
Total number of your algorithms |
Parameter |
Type |
Description |
---|---|---|
alg_id |
String |
Algorithm ID |
service_id |
String |
Service ID |
service_name |
String |
Service name |
package_id |
String |
Algorithm service package ID |
package_name |
String |
Algorithm service package name |
company |
String |
Vendor name |
alg_version |
String |
Algorithm version |
function_version |
String |
Service version |
tags |
Array of strings |
Application scenario tag |
created_at |
Long |
Creation time |
alg_status |
String |
Algorithm status. The value can be service_running, service_deploying, service_failed, service_stopping, service_stopped, service_upgrading, service_finished, service_concerning or "not_deployed". |
deploy_type |
String |
Deployment type. The value can be cloud or edge. |
alg_class |
String |
Algorithm type. The value can be self or partner. |
request_mode |
String |
Request mode. The value can be sync or async. |
description |
String |
Algorithm description. This parameter is returned when it is not empty. |
error_msg |
String |
Service exception information. This parameter is returned when it is not empty. |
can_update |
Boolean |
Whether the algorithm can be upgraded. This parameter is returned when the value is true. |
new_alg_id |
String |
Algorithm ID after the upgrade. This parameter is returned when the algorithm can be upgraded. |
Example Requests
This request is used to obtain algorithm services in Running, Stop, or Deployment failed.
GET https://{endpoint}/v2/{project_id}/algorithm/services/user?alg_status=service_running&alg_status=service_stopped&alg_status=service_failed
Example Responses
Status code: 200
Request body for obtaining algorithm services
{ "count" : 3, "service_list" : [ { "alg_id" : "068ed4d8-077e-4ec9-aa19-bc******e925", "service_id" : "331bcb4a-5b3c-4e67-87cc-6c******d77b", "service_name" : "Edge Intrusion Detection", "function_version" : "1.0", "created_at" : 1680008856502, "alg_status" : "service_running", "deploy_type" : "edge", "alg_class" : "self", "request_mode" : "async", "can_update" : true, "new_alg_id" : "3320b2b9-562b-4bee-bfee-0e******01c1" }, { "alg_id" : "5c73bd3f-6498-40e5-a40f-7b******1139", "service_id" : "04dc08b7-da07-46ee-83e7-c3******f668", "service_name" : "test-event-01", "function_version" : "1.0", "created_at" : 1680005185627, "alg_status" : "service_stopped", "deploy_type" : "cloud", "alg_class" : "self", "request_mode" : "async" }, { "alg_id" : "c01ec07f-874f-42f1-ba1d-15******d71b", "service_id" : "db1ec2d2-d023-4d20-ab6f-bc******4eeb", "service_name" : "TEST-CLOUD-ALG", "function_version" : "1.0", "created_at" : 1680008219078, "alg_status" : "service_failed", "deploy_type" : "cloud", "alg_class" : "self", "request_mode" : "async", "description" : "Cloud algorithm for testing" } ], "total" : 3 }
Status Codes
Status Code |
Description |
---|---|
200 |
Request body for obtaining algorithm services |
400 |
Request error |
500 |
Internal 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