Help Center> RES> API Reference> API> Training Job> Querying the Candidate Sets of a Training Job

Querying the Candidate Sets of a Training Job

Function

This API is used to query the candidate sets of a specified workspace ID and resource ID.

URI

GET /v2.0/{project_id}/workspaces/{workspace_id}/resources/{resource_id}/result-set

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.

resource_id

Yes

String

Resource ID

workspace_id

Yes

String

Workspace ID

Table 2 Query parameters

Parameter

Mandatory

Type

Description

use_type

Yes

String

Usage type. The options are:

  • UI: recommending items based on users

  • UU: recommending users based on users

  • II: recommending items based on items

  • IU: recommending users based on items

Request Parameters

Table 3 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 4 Response body parameters

Parameter

Type

Description

result_set

Array of result_set objects

Candidate set list

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.)

Table 5 result_set

Parameter

Type

Description

availability

Integer

Availability

category

String

Category

job_id

String

Job No.

job_type

String

Job type

rec_id

String

rec No.

rec_type

String

rec type

scene_id

String

Scenario No.

table_name

String

Table name

workspace_id

String

Workspace No.

Example Requests

This API is used to query the UIREC candidate sets of a specified workspace ID and resource ID.

/v2.0/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/workspaces/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/resources/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/result-set?use_type=UI

-

Example Responses

Status code: 200

OK

{
  "result_set" : [ {
    "rec_id" : "22ab62118c404a668232ba43fb8b762c",
    "workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
    "scene_id" : "c27aea2b50004187a36fdbd136368895",
    "job_id" : "929d25d76a6f45b3a06490074949484b",
    "table_name" : "r4-UIREC",
    "rec_type" : "UIREC",
    "availability" : 1,
    "category" : "RECALL",
    "job_type" : "ItemCf"
  }, {
    "rec_id" : "382af563b5bf454c9242b9989f95d120",
    "workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
    "scene_id" : "c27aea2b50004187a36fdbd136368895",
    "job_id" : "2bb9cce018364e9992537d0776009222",
    "table_name" : "r2-UIREC",
    "rec_type" : "UIREC",
    "availability" : 1,
    "category" : "RECALL",
    "job_type" : "AttributeMatch"
  }, {
    "rec_id" : "d01e9e29aa64473da12a04f6b4e3a3f1",
    "workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
    "scene_id" : "c27aea2b50004187a36fdbd136368895",
    "job_id" : "0516d537a82c460caf2b78ebd638eb3b",
    "table_name" : "ab-UIREC",
    "rec_type" : "UIREC",
    "availability" : 1,
    "category" : "RECALL",
    "job_type" : "ItemCf"
  }, {
    "rec_id" : "d05955af59bf4b09b2539308434ebd97",
    "workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
    "scene_id" : "c27aea2b50004187a36fdbd136368895",
    "job_id" : "f79e55ca4e314d4188fab3045554efa8",
    "table_name" : "r3-UIREC",
    "rec_type" : "UIREC",
    "availability" : 1,
    "category" : "RECALL",
    "job_type" : "BhvHistory"
  }, {
    "rec_id" : "d9a317a2f1bb46fc8a25096a310108d6",
    "workspace_id" : "a79b01afa69d4ddc943aa3423fc43531",
    "scene_id" : "c27aea2b50004187a36fdbd136368895",
    "job_id" : "ca3fa69dbbaa4dcea3a0f5d466af0742",
    "table_name" : "a-UIREC",
    "rec_type" : "UIREC",
    "availability" : 1,
    "category" : "RECALL",
    "job_type" : "ItemCf"
  } ],
  "is_success" : true
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.