...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "classifications": { "resources": [ { "id": "class2", "codes": { "resources": [ { "value": "1", "label": "one" }, { "value": "2", "label": "two" } ], "info": { "codeLimit": 100, "codeOffset": 0, "count": 2, "moreCodes": false } } } ], "info": { "limit": 1, "offset": 1, "codeLimit": 100, "codeOffset": 0, "more": true, "count": 63 } } } |
Sorting a
...
Group of Classifications
In addition to paginating classifications, they can also be sorted by their ID. Adding the sort parameter with either a value of ASC or DESC will result in sorted classifications.
Code Block | ||
---|---|---|
| ||
http://{host}/rds/catalog/collection/datasource/classifications?sort=DESC |
Code Block |
---|
{
"classifications": {
"resources": [
{
"id": "class3",
"codes": {
"resources": [
{
"value": "1",
"label": "one"
},
{
"value": "2",
"label": "two"
},
{
"value": "3",
"label": "three"
}
],
"info": {
"codeLimit": 100,
"codeOffset": 0,
"count": 3,
"moreCodes": false
}
}
},
{
"id": "class2",
"codes": {
"resources": [
{
"value": "1",
"label": "one"
},
{
"value": "2",
"label": "two"
}
],
"info": {
"codeLimit": 100,
"codeOffset": 0,
"count": 2,
"moreCodes": false
}
}
},
{
"id": "class1",
"codes": {
"resources": [
{
"value": "1",
"label": "one"
}
],
"info": {
"codeLimit": 100,
"codeOffset": 0,
"count": 1,
"moreCodes": false
}
}
},
...
],
"info": {
"limit": 100,
"offset": 0,
"codeLimit": 100,
"codeOffset": 0,
"more": false,
"count": 63
}
}
} |