=== get 1 row from set by qualifying the key
Request:
GET /artist?me.artistid=2
Accept: application/hal+json
Response:
200 OK
Content-type: application/hal+json
{
"_embedded" : {
"artist" : [
{
"_links" : {
"cds" : {
"href" : "/cd?me.artist=2"
},
"cds_cref_cond" : {
"href" : "/cd/2"
},
"self" : {
"href" : "/artist/2"
}
},
"artistid" : 2,
"charfield" : null,
"name" : "Random Boy Band",
"rank" : 13
}
]
},
"_links" : {
"self" : {
"href" : "/artist?rows=30&me.artistid=2&page=1",
"title" : "TestSchema::Result::Artist"
}
}
}
=== get specific rows via json array
Request:
GET /artist PARAMS: me.artistid~json=>[1,3]
GET /artist?me.artistid~json=%5B1%2C3%5D
Accept: application/hal+json
Response:
200 OK
Content-type: application/hal+json
{
"_embedded" : {
"artist" : [
{
"_links" : {
"cds" : {
"href" : "/cd?me.artist=1"
},
"cds_cref_cond" : {
"href" : "/cd/1"
},
"self" : {
"href" : "/artist/1"
}
},
"artistid" : 1,
"charfield" : null,
"name" : "Caterwauler McCrae",
"rank" : 13
},
{
"_links" : {
"cds" : {
"href" : "/cd?me.artist=3"
},
"cds_cref_cond" : {
"href" : "/cd/3"
},
"self" : {
"href" : "/artist/3"
}
},
"artistid" : 3,
"charfield" : null,
"name" : "We Are Goth",
"rank" : 13
}
]
},
"_links" : {
"self" : {
"href" : "/artist?rows=30&me.artistid~json=%5B1%2C3%5D&page=1",
"title" : "TestSchema::Result::Artist"
}
}
}
=== get specific rows via json qualifier expression
Request:
GET /artist PARAMS: me.artistid~json=>{"<=",2}
GET /artist?me.artistid~json=%7B%22%3C%3D%22%3A2%7D
Accept: application/hal+json
Response:
200 OK
Content-type: application/hal+json
{
"_embedded" : {
"artist" : [
{
"_links" : {
"cds" : {
"href" : "/cd?me.artist=1"
},
"cds_cref_cond" : {
"href" : "/cd/1"
},
"self" : {
"href" : "/artist/1"
}
},
"artistid" : 1,
"charfield" : null,
"name" : "Caterwauler McCrae",
"rank" : 13
},
{
"_links" : {
"cds" : {
"href" : "/cd?me.artist=2"
},
"cds_cref_cond" : {
"href" : "/cd/2"
},
"self" : {
"href" : "/artist/2"
}
},
"artistid" : 2,
"charfield" : null,
"name" : "Random Boy Band",
"rank" : 13
}
]
},
"_links" : {
"self" : {
"href" : "/artist?rows=30&me.artistid~json=%7B%22%3C%3D%22%3A2%7D&page=1",
"title" : "TestSchema::Result::Artist"
}
}
}
=== get no rows, empty set, due to qualifier that matches none
Request:
GET /artist?me.artistid=999999
Accept: application/hal+json
Response:
200 OK
Content-type: application/hal+json
{
"_embedded" : {
"artist" : []
},
"_links" : {
"self" : {
"href" : "/artist?rows=30&me.artistid=999999&page=1",
"title" : "TestSchema::Result::Artist"
}
}
}