2.10.3 Obtaining Grade List
This API acquires a list of grades contained in a consumer.
Execution permission
Admin, Modify
API version
v1
Request format
GET http[s]://host:port/Analytics/version/objects/Grades
Request body
Not applicable.
Response body
The structure of the response body and the object attributes are as follows:{
"data":[{
"gradeKey":"...",
"name":"...",
"displayOrder":"..."
},
:
],
"pagination":{
"page":"...",
"pageSize":"...",
"numPages":"...",
"totalCount":"..."
},
"count":"..."
}
Collections (Type: Collections)
|
Attribute |
Type |
Description |
|---|---|---|
|
data |
Grade[] |
A list of Grade objects. For details about Grade, see the table below. |
|
pagination |
Pagination |
Page information. This parameter is displayed only when the relevant resource exists. |
|
count |
int |
Number of data items that meet the conditions. |
data (Type: Grade)
|
Attribute |
Type |
Description |
|---|---|---|
|
gradeKey |
string |
ID for identifying grades |
|
name |
string |
Grade name |
|
displayOrder |
int |
Priority of the grade |
pagination (Type: Pagination)
|
Attribute |
Type |
Description |
|---|---|---|
|
page |
integer |
page |
|
pageSize |
integer |
Size of the pages |
|
numPages |
integer |
Number of the pages |
|
totalCount |
integer |
Number of the objects |
Status codes
|
Status code |
Reason phrase |
Description |
|---|---|---|
|
200 |
OK |
Success. |
|
400 |
Bad Request |
A query parameter is invalid. |
|
401 |
Unauthorized |
No login privilege. |
|
403 |
Forbidden |
No reference privilege. |
|
412 |
Precondition Failed |
The server is not available. |
|
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header]
GET /Analytics/v1/objects/Grades HTTP/1.1
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
User-Agent: curl/7.33.0
Host: localhost:22015
Accept: application/json
Accept-Language: ja
[Response Header]
HTTP/1.1 200 OK
Date: Fri, 27 Nov 2015 05:21:50 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO 723cc9c7dbae3aa85bad85fc46d1bc9edb64d_WVlGcHsLfg5ffg0I_V0810
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked
Content-Type: application/json
[Response Body]
{
"data" : [ {
"instanceID" : 410,
"gradeKey" : "0",
"name" : "Platinum",
"displayOrder" : 0
}, {
"instanceID" : 413,
"gradeKey" : "10",
"name" : "Gold",
"displayOrder" : 10
}, {
"instanceID" : 412,
"gradeKey" : "20",
"name" : "Silver",
"displayOrder" : 20
}, {
"instanceID" : 411,
"gradeKey" : "30",
"name" : "Bronze",
"displayOrder" : 30
} ],
"count" : 4
}