Help Center> RES> API Reference> API> Querying Specifications> Querying Training Job Specifications

Querying Training Job Specifications

Function

This API is used to query the offline computing specifications, real-time computing specifications, and ranking model training specifications provided by RES. These information is required when you create data sources and scenarios.

URI

GET /v2.0/{project_id}/resource-specs

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details on how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Content type. The value is application/json.

X-Auth-Token

Yes

String

User token. For details on how to obtain the user token, see Obtaining a User Token Through Password Authentication.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

offline_spec

Array of strings

Offline computing specifications

nearline_spec

Array of strings

Real-time computing specifications

deep_learning_spec

Array of strings

Ranking model computing specifications

is_success

Boolean

Whether the request is successful

message

String

Response message (This field is not returned when the request is successful.)

error_code

String

Error code (This parameter is not returned when the request is successful.)

Example Requests

This API is used to query the computing specifications.

/v2.0/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/resource-specs

-

Example Responses

Status code: 200

OK

{
  "offline_spec" : [ "16CU", "32CU", "4CU", "8CU" ],
  "nearline_spec" : [ "16CU", "2CU", "4CU", "8CU" ],
  "deep_learning_spec" : [ "8CU" ],
  "is_success" : true
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.