Come for answers, stay for best practices. All we're missing is you.
Querying OSLC Resources in Maximo – Getting Started
This section of the wiki will take you through an example of a Query request (using HTTP GET) you would make, starting by querying the Work Management Service Provider through to querying a specific Work Order resource. Subsequent sections will build upon this section to display additional capabilities beyond what is covered here. Also included is some utilities you can leverage to help with your development/testing.
If you are looking to build a client that will use OSLC to query and/or update Maximo resources, one helpful development/testing tool you can use is a Browser Plug-in that supports the formatted viewing of JSON data and the configuration/viewing of HTTP Header properties. There are multiple plug-ins available on the internet, for executing OSLC requests, in this discussion we will be using a FireFox plug-in called RESTClient.
RESTClient Download
RESTClient Sample
From the ‘OSLC as a Maximo API’ section in this wiki, we noted that you can retrieve a list of Service Providers in Maximo as follows:
When Maximo is using its native authentication, you need to provide the user:pw in a HTTP header called maxauth. The value has to be base-64 encoded. There are online tools that you can use to encode your values such as the following:
Using the WorkManagement Service Provider URI found in the Maximo Service Provider collection:
You can view the available resources (oslcwodetail – work order details) and their supported operations from that service provide:
.
You can use a Saved Query to retrieve a collection of resources:
Saved Query Request:
The URIs returned are returned in the format of the primary queryBase (seen in the service provider document) with resource’s ID appended.
Saved Query response:
You can then use one of resource links from the collection to query a specific resource (work order).
Work Order Query:
Response of the request is a Work Order resource in the OSLC/JSON format: