-
TRIRIGA Login using OSLC:
http://localhost:8001/oslc/login -
Base OSLC command:
http://localhost:8001/oslc/ -
List of Service Providers:
http://localhost:8001/oslc/sp -
Query Capability:
http://localhost:8001/oslc/spq/triAllWorkTasksQC -
Shapes (Resource):
http://localhost:8001/oslc/shapes/triWorkTaskRS -
Retrieve full record:
http://localhost:8001/oslc/so/triWorkTaskRS/132633803 (spec_id) -
View all actions on a record:
http://localhost:8001/oslc/system/action/triWorkTaskRS/132633803 (spec_id)
-
Authentication:
http://localhost:8001/oslc?USERNAME=system&PASSWORD=admin
http://localhost:8001/oslc/logout -
Retrieve all records:
http://localhost:8001/oslc/spq/triAllWorkTasksQC?oslc.select=* -
Retrieve selected fields:
http://localhost:8001/oslc/spq/triAllWorkTasksQC?oslc.select=dcterms:title,spi_wm:status,dcterms:description -
Retrieve selected fields from Linked Resources:
http://localhost:8001/oslc/spq/triAllWorkTasksQC?oslc.select=dcterms:title,spi_wm:status,spi:LinkedBuilding{dcterms:title,spi:triAreaNU,spi:LinkedFloor{dcterms:title}} -
Adding filters (oslc.where):
http://localhost:8001/oslc/spq/triAllWorkTasksQC?oslc.select=dcterms:title,spi_wm:status,dcterms:description&oslc.where=dcterms:description!="null" -
Adding multiple oslc.where clauses, separated by
and
:
http://localhost:8001/oslc/spq/triAllWorkTasksQC?oslc.select=dcterms:title,spi_wm:status,dcterms:description&oslc.where=dcterms:description!="null"%20and%20spi_wm:status="Active" -
Adding wildcards:
http://localhost:8001/oslc/spq/triAllWorkTasksQC?oslc.select=dcterms:title,spi_wm:status,dcterms:description&oslc.where=dcterms:description="%25sam%25"
(ASCII value for % is %25) -
Ordering records:
http://localhost:8001/oslc/spq/triAllWorkTasksQC?oslc.select=dcterms:title,spi_wm:schedfinish,dcterms:description&oslc.where=dcterms:description="null"&oslc.orderBy=%2Bspi_wm:schedfinish
(ASCII value for + is %2B, - is %2D) -
Adding Date Filters:
http://localhost:8001/oslc/spq/triAllWorkTasksQC?oslc.select=dcterms:title&oslc.where=spi:triModifiedSY%3E"2020-02-11"
(ASCII value for > is %3E, < is %3C) -
Adding Date and Time Filters:
http://localhost:8001/oslc/spq/cstReservationDefinitionQC?oslc.select=spi:subject,spi:triModifiedSY&oslc.where=spi:triModifiedSY%3E"2022-03-17T15%3A30%3A00.000%2B00%3A00"
(ASCII value for : is %3A, + is %2B)
Character | Code |
---|---|
> |
%3E |
< |
%3C |
+ |
%2B |
- |
%2D |
% |
%25 |
: |
%3A |
-
Create Work Task record:
http://localhost:8001/oslc/so/triWorkTaskCFBody:
{ "spi:triTaskTypeCL": "Corrective", "dcterms:title": "Sample01", "spi:action": "Create Draft", }
-
Create Work Task and Comment record with association:
http://localhost:8001/oslc/so/triWorkTaskCFBody:
{ "spi:triTaskTypeCL": "Corrective", "dcterms:title": "Sample02", "spi:action": "Create Draft", "spi:triAssociatedCommentsLR": [ { "spi:triCommentTX": "This is a comment.", "spi:triCommentTypeLI":"E-mail", "spi:action": "Create" }, { "spi:triCommentTX": "This is another comment.", "spi:triCommentTypeLI":"E-mail", "spi:action": "Create" } ] }
-
Create Work Task record and associate with existing record:
http://localhost:8001/oslc/so/triWorkTaskCFBody:
{ "spi:triTaskTypeCL": "Corrective", "dcterms:title": "Sample03", "spi:action": "Create Draft", "spi:triAssociatedComments": [ { "dcterms:identifier": "132633922" (spec_id) } ] }
- PUT request essentially replaces the record and only retains the info that is passed in the request. Thereby, PUT is rarely used. Read the documentation here.
Header Name | Header Value |
---|---|
x-method-override | PATCH |
PATCHTYPE | MERGE |
-
Document content (file) can downloaded by prefixing OSLC Resource with Document spec_id and /Content. e.g.
https://localhost:8001/oslc/so/triDocumentRS/142284589/Content
-
Document content (file) can be uploaded and associated to a record by using POST with the given headers as shown.
POST: https://localhost:8001/oslc/so/triDocumentRS/triWorkTaskRS/137313454
Header Value Content-Type multipart/form-data, image/png authorization Basic RE0xOkRNMDFfbWNz Accept application/json Slug testImage6.png x-document-description Test Image 5 x-document-meta \ROOT\TRIRIGAAnywhere Properties *