Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only

OSLC Properties 

Wed March 18, 2020 11:47 AM

oslc.properties

When querying a single resource, the response will contain all the properties of the resource based on the configuration of the OSLC object structure that defines the resource within Maximo.  

 

Query Request

 

Query Response

 

Using the oslc.properties parameter, you can reduce the list of properties returned in the query by providing a comma separated list of property names.  When this parameter is provided, only the properties specified in the parameter will be returned in the response of the query.

 Request using oslc.properties to include only spi:status (WO status), olsc:shortTitle (WO number) and spi:asset (WO asset):

 

Request Response only includes properties identified in oslc.properties:

 

 

In the examples above, the resource name is oslcwodetail.  In Maximo, the resource is defined using an integration object structure.  In this object structure the root object is WORKORDER and there are multiple child objects.  One of the child objects is the TASK object.  Using the oslc.properties, you can also request selected fields from the child objects.  For example if you want the Work Order Number from the Work Order object and the Task ID of each of its tasks, then your URL would look like this:

 http://localhost/maximo/oslc/os/oslcwodetail/_QkVERk9SRC8xMDAy?oslc.properties=oslc:shortTitle,spi:task{spi_wm:taskid}

 In the above URL:

oslc:shortTitle is the OSLC name for the Work Order Number

spi:task is the OSLC name for the TASK object

  spi:taskid is the OSLC name for the TASKID property of the TASK object.  One or more properties of the TASK object can

        be provided within the { } - such as spi:task{spi_wm:taskid,spi_wm:changeby,spi_wm:disabled}.  If you specify *

        for spi:task{*}, then the repsonse will include all the properties of the Task object.

 

 

Using this URL, http://localhost/maximo/oslc/os/oslcwodetail/_QkVERk9SRC8xMDAy?oslc.properties=oslc:shortTitle,spi:task{spi_wm:taskid}, a portion of the response would look like this:

 

 

In the case where your resource object structure had a hierarchy of objects that is 3 (or more) levels deep you can specify attributes for the 3rd level object as follows:

 Object structure: ABC

            Objects:  A (root)

                               B (child of A)

                                   C (child of B)

 Using OSLC Properties to retrieve select properties of each object:

            oslc.properties=a1,a2,B{b1,b2,C{c1,c2}}

            where

a1,a2,B are properties of A

b1,b2,C are properties of B

c1,c2 are properties of C




#Maximo
#MaximoIntegrationandScripting
#AssetandFacilitiesManagement

Statistics
0 Favorited
18 Views
0 Files
0 Shares
0 Downloads