unfortunately you cannot just like that pass parameters to a OS saved queries created directly in the Object Structures application. These can only be parameterized using typical placeholders (ref. psdi.mbo.SqlFormat
).
The simplest way to achieve this is to implement saved query automation script, by following this piece of official documentation. Under the hood you need to construct the where clause yourself but at least you can access request parameters.
If this post helps, please consider accepting it as a solution to help other members find it more quickly.
ZNAPZ B.V.
Original Message:
Sent: Thu July 03, 2025 08:53 AM
From: Christopher Stewart
Subject: REST call to get all work orders where user has assignments on?
When I try to do this:
mxapiwodetail?oslc.pageSize=100&savedQuery=ASSIGNEDWOLIST&collectioncount=1&ignorecollectionref=1&lean=1&oslc.select=wonum,siteid,orgid&oslc.where=personid="878237891" I get the error
"message": "BMXAA8781E - This is an invalid query term. The property personid is not found under the namespace http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#. You must review and update the query clause to use the correct property name.",
Any thoughts on what I can do to either pass the personid or userid through to get assignments assigned to a technician?
------------------------------
Christopher Stewart
Original Message:
Sent: Tue June 17, 2025 11:45 AM
From: Bartosz Marchewka
Subject: REST call to get all work orders where user has assignments on?
Hi @Christopher Stewart
I think you can achieve that by using saved query that is defined in MXAPIWODETAIL
object structure. You can use this one ASSIGNEDWOLIST
that is available out of the box, or you can create a custom one if you need.
Sample REST call url:
https://main.manage.site.maximo.com/maximo/api/os/mxapiwodetail?oslc.select=wonum,siteid,orgid&oslc.pageSize=100&savedQuery=ASSIGNEDWOLIST&
&collectioncount=1&ignorecollectionref=1&lean=1
To review saved query please navigate to MAS Manage application:
- Select "Integrations" -> "Object Structures" application
- Find
MXAPIWODETAIL
object structure definition - Select "Query Definition" from "More Actions" section
- Find
ASSIGNEDWOLIST
using filter option. To create your custom one you can use "New Row" button but then please remember to set correct saved query name in weburl request.
------------------------------
Bartosz Marchewka
IBM Maximo Consultant
AFRY
Original Message:
Sent: Tue June 17, 2025 09:48 AM
From: Christopher Stewart
Subject: REST call to get all work orders where user has assignments on?
I am trying to get a list of all work orders where the logged in user has assignments on. I was trying to do something like this but it does not seem to be working.
https://main.manage.site.maximo.com/maximo/api/os/mxapiwodetail?lean=1&oslc.select=wonum,description&workorder.showassignment.where=labor.personid="882664"&workorder.showassignment.domaininternalwhere=status="ASSIGNED"
Does anyone know how I should go about this?
------------------------------
Christopher Stewart
------------------------------