Query select parameter
The oslc.select query parameter requests a partial resource representation of the resources in a collection resource. The oslc.select parameter always applies to a collection resource. You specify the list of properties to include in the request.
Example: Partial resource request
The oslc.select parameter
provides a comma-separated list of qualified property names. The oslc.prefix parameter
is not supported. The following query requests a partial resource:
oslc.select=oslc:shortTitle, dcterms:creator
The
query returns the following information:
{
"rdf:about": "some uri",
"rdfs:member": [
{
"oslc:shortTitle": "1022",
"rdf:about": "some workorder uri",
"dcterms:creator":
{
"rdf:about": "some person uri"
}
Example: Selecting properties from referenced resources
With
the oslc.select parameter, you can select properties
from referenced resources. The following query requests the name
of the creator:
oslc.select= oslc:shortTitle, dcterms:creator{foaf:name}
The query returns the following information:
{
"rdf:about": "some uri",
"rdfs:member": [
{
"oslc:shortTitle": "1022",
"rdf:about": "some workorder uri",
"dcterms:creator":
{
"rdf:about": "some person uri",
"foaf:name": "Todd Winston"
}
In this example, the foaf:Person resource is the name of the person that is specified in
the creator property value. To get all the properties from the resource, you can use
oslc.select=*
. The same syntax can be applied to the
oslc.properties parameter when you search for an OSLC
resource.