Algorithm API
4.9 Algorithm API (3.7.0)¶
4.9.1 Get Algorithm List¶
Path: /api-asset/algorithms
Method: GET
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type | Notes |
|---|---|---|---|---|---|
| type | query | Enum: "client", "cloud", "" |
Yes | string | |
| clientId | query | Client machine UUID | No | string | 3.7.0 |
| isWindows | query | Whether the algorithm runs on Windows | No | boolean | |
| projectId | query | Project ID | No | string | |
| keyword | query | Search keyword | No | string | |
| page | query | Page number | Yes | string | |
| pageSize | query | Items per page | No | string |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok | AlgorithmListResponse |
4.9.2 Get an Algorithm Version¶
Path: /api-asset/algorithms/\({algorithmId}/versions/\)
Method: GET
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| algorithmId | path | Algorithm ID | Yes | string |
| versionId | path | Algorithm version ID | No | string |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok | AlgorithmVersion |
4.9.3 Get Algorithm Version List¶
Path: /api-asset/algorithms/${algorithmId}/versions
Method: GET
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| algorithmId | path | Algorithm ID | Yes | string |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok | [AlgorithmVersion] |
4.9.4 Create an Algorithm¶
Path: /api-asset/algorithms
Method: POST
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| data | body | Algorithm and version data | Yes | AlgorithmCreateData |
| sourceId | body | Uploaded algorithm Asset | No | string |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok | { "name": string; "id": string } |
4.9.5 Update an Algorithm¶
Path: /api-asset/algorithms/${id}
Method: PUT
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| name | body | Provide when renaming the algorithm | No | string |
| activatedId | body | When deleting the current activated algorithm version, reset with a new activatedId |
No | string |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok | { "name": string; "id": string } |
4.9.6 Delete Algorithms¶
Path: /api-asset/algorithms/delete
Method: POST
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| ids | body | IDs of algorithms to delete | No | string[] |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok |
4.9.7 Check if an Algorithm Name Already Exists¶
Path: /api-asset/algorithms/exists/{name}
Method: GET
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| name | path | Name | Yes | string |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok | { "exists": string; "id": string } |
4.9.8 Add an Algorithm Version¶
Path: /api-asset/algorithms/${id}/versions
Method: POST
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| id | path | Algorithm ID | Yes | string |
| data | body | Algorithm version data | Yes | Partial<AlgorithmVersion> |
| sourceId | body | Uploaded algorithm Asset | No | string |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok | { "name": string; "id": string } |
4.9.9 Delete Algorithm Versions¶
Path: /api-asset/algorithms/versions/delete
Method: POST
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| ids | body | List of algorithm version IDs | Yes | string[] |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok |
4.9.10 Check if an Algorithm Version Already Exists¶
Path: /api-asset/algorithms/\({algorithmId}/exists/\)
Method: GET
Headers:Headers
Request Parameters¶
| Parameter Name | Format | Description | Required | Type |
|---|---|---|---|---|
| algorithmId | path | Algorithm ID | Yes | string |
| version | path | Algorithm version | Yes | string |
Response¶
| Code | Description | Type |
|---|---|---|
| 200 | Ok | { "exists": string; "id": string } |