Querying Job Engine Specifications
Function
This API is used to obtain the engine type and version of a specified job.
You must specify the engine specifications when creating a training job or an inference job.
URI
GET /v1/{project_id}/job/ai-engines
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain a project ID, see Obtaining a Project ID and Name. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| job_type | No | String | Job type. The value can be train or inference. |
Request Body
None
Response Body
| Parameter | Type | Description |
|---|---|---|
| is_success | Boolean | Whether the request is successful |
| error_message | String | Error message of a failed API call. This parameter is not included when the API call succeeds. |
| error_code | String | Error code of a failed API call. For details, see Error Codes. This parameter is not included when the API call succeeds. |
| engines | engines array | List of engine specifications attributes. For details, see Table 4. |
| Parameter | Type | Description |
|---|---|---|
| engine_type | Integer | Engine type of a training job
|
| engine_id | Long | ID of the engine selected for a training job |
| engine_name | String | Name of the engine selected for a training job |
| engine_version | String | Version of the engine selected for a training job |
Sample Request
The following shows how to obtain the engine specifications of a training job.
GET https://endpoint/v1/{project_id}/job/ai-engines?job_type=train Sample Response
- Successful response
{ "is_success": true, "engines": [ { "engine_type": 1, "engine_name": "TensorFlow", "engine_id": 1, "engine_version": "TF-1.4.0-python2.7" } ] } - Failed response
{ "is_success": false, "error_message": "Error string", "error_code": "ModelArts.0105" }
Status Code
For details about the status code, see Table 1.