Prev | Next |
Combine WHERE and SELECT Parameters
The oslc.where and oslc.select Query parameters can be combined in the base URI of the Query Capability to retrieve the required properties of all those Requirements that satisfy the specified condition. This is similar to using WHERE and SELECT clauses together in a SQL statement.
Examples
These example queries act on a model called firebird_model connected by the Cloud.
Example |
Query |
---|---|
1 |
Query: http://localhost:480/firebird_model/oslc/qc/?oslc.where= dcterms:title="Requirement1" & oslc.select=dcterms:title Retrieves the OSLC property title of all Requirements that have the title 'Requirement1'. |
2 |
Query: http://localhost:480/firebird_model/oslc/qc/?oslc.where= dcterms:title in ["Requirement1","Requirement2"] & oslc.select=dcterms:title,dcterms:created,dcterms:creator{foaf:name} Retrieves the OSLC properties 'title', 'created' and 'creator' of all Requirements that have the title 'Requirement1' or 'Requirement2'. |
3 |
Query: http://localhost:480/firebird_model/oslc/qc/?oslc.where=dcterms:title="Requirement1" and dcterms:creator{foaf:name}="User1" & oslc.select=* Retrieves all the OSLC properties of all Requirements that have the title 'Requirement1', created by 'User1'. |
4 |
Query: http://localhost:480/firebird_model/oslc/qc/?oslc.where=dcterms:created<"01-07-2020"oslc.select=dcterms:title Returns an error response, as the value of the property 'created' is not in the valid format. |
Notes
- This facility is available through the Pro Cloud Server, with a valid license
- Dates must be specified in the format YYYY-MM-DD