status="OPERATING" works on one system and misses records on the next one. This guide
shows how to read the internal value, filter by it, and use the other domain and date filters of
the REST API.The rules here come from IBM’s documentation and from our own work with the REST API, on Manage in
the MAS 9.2 series. We ran every request on our test system, against IBM’s demo data, as a user
without administrator rights. The examples read the object structures MXAPIASSET and
MXAPIWODETAIL.
Internal values and synonyms#
A synonym domain, such as LOCASSETSTATUS for the asset status, has two columns:
- The internal value is fixed. Manage’s own logic works with it:
OPERATING,NOT READY,DECOMMISSIONED. - The value is what the record stores and the user sees. Each internal value has one value with the same name, and a customer can add more.
IBM’s demo data already has such synonyms:
| Value in the record | Internal value |
|---|---|
OPERATING | OPERATING |
ACTIVE | OPERATING |
LIMITEDUSE | OPERATING |
BROKEN | DECOMMISSIONED |
SOLD | DECOMMISSIONED |
An asset with status ACTIVE is operating for Manage. A client that shows a green dot for
OPERATING shows none for it. So decide by the internal value and display the value.
Read the internal value: internalvalues=1#
internalvalues=1 adds <attribute>_maxvalue to every attribute with a synonym domain:
oslc.where=status="ACTIVE"
oslc.select=assetnum,status
internalvalues=1{
"member": [
{
"assetnum": "AH001",
"status": "ACTIVE",
"status_description": "Active",
"status_maxvalue": "OPERATING"
}
]
}Three details:
- Only synonym domains get it.
statushas one.worktypeandwopriorityon a work order get no_maxvalue. - An alias carries over. With
status--stthe keys arest,st_descriptionandst_maxvalue. _descriptioncomes without the parameter. The select article lists it with the other properties Manage adds.
Filter by internal value#
oslc.where=status="OPERATING" compares the stored value. It finds the operating assets and
misses the ones with status ACTIVE. Two filters work on the internal value instead, and
both find OPERATING, ACTIVE and LIMITEDUSE:
Tildes in oslc.where#
A value in tildes is an internal value. Manage turns it into every value of the domain that has this internal value:
oslc.where=status="~OPERATING~"It works with the rest of the where clause, with != and with in:
oslc.where=siteid="BEDFORD" and status!="~DECOMMISSIONED~"
oslc.where=status in ["~OPERATING~","~DECOMMISSIONED~"]!= is a NOT IN over all values of that internal value. The
where clause article lists the other values Manage fills in for
you, such as -dfltsite-.
domaininternalwhere#
domaininternalwhere does the same as its own query parameter. It takes one attribute and a comma
list of internal values, with = for IN and != for NOT IN:
domaininternalwhere=status=OPERATING,DECOMMISSIONED
domaininternalwhere=status!=OPERATINGIt is joined with oslc.where by AND. On our test system it behaved like this:
- The values must be internal values, in upper case.
status=ACTIVEandstatus=operatingare refused with BMXAA0211E, “ACTIVE is not defined in the domain LOCASSETSTATUS”. - One attribute per request. A second attribute after a
;becomes part of the value, and the request fails with BMXAA0211E. - An attribute without a synonym domain is ignored.
domaininternalwhere=description=OPERATINGreturns every record, without an error. - Some filters drop it.
attributesearch,tlfilterand_fddo not combine with it, see which filters combine below.
The tildes in oslc.where have none of these limits. We use them by default, and
domaininternalwhere only where a client builds the list of internal values as a parameter.
Table domains: _fd#
A table domain picks its values from another object with a where clause, the list where clause.
_fd=<domain> applies that clause to the collection:
/api/os/mxapiasset
_fd=SRM_ASSETSRM_ASSET is a table domain of the demo data that lists the assets a person uses or owns. With
_fd=SRM_ASSET, each user gets their own assets, with one request for everybody.
The domain must read the main object of the object structure. _fd=SRM_ASSET on
MXAPIWODETAIL, and an unknown domain name, are ignored without an error, and the request returns
every record. So compare the count with and without _fd once, as with a saved query.
Ranges and timelines#
A range in the where clause uses the attribute twice:
oslc.where=wopriority>1 and wopriority<=3
oslc.where=reportdate>="2026-01-01" and reportdate<"2027-01-01"For dates, two parameters are shorter. They also move with the calendar, so a saved link stays right.
tlrange and tlattribute#
tlrange gives the length of the range, and tlattribute the date attribute:
/api/os/mxapiwodetail
tlrange=-3M
tlattribute=reportdateThis returns the work orders reported in the last three months. The range starts three months before now and ends now. The value has three parts:
| Part | Values |
|---|---|
| sign | - for the past, + for the future, +- for both sides |
| number | a whole number |
| unit | Y year, M month, W week, D day, h hour, m minute, s second |
A value without a sign, such as 3M, is a past range. Four rules from our test system:
- Encode the plus. A raw
+in a URL turns into a space, and the request fails with status 500, “For input string”. Send%2B3M, or let your HTTP library encode the parameter. - Name the attribute. Without
tlattribute, Manage takes the timeline attribute of the object structure.MXAPIASSETandMXAPIWODETAILhave none, and the request failed with status 500 and a Java message. tlmodedate=1counts whole days.tlrange=-7Dstarts exactly seven days before now. Withtlmodedate=1it starts at midnight of that day, so it can return more records.- Errors in the value are 400s. An unknown unit gives BMXAA9693E, which lists the valid units. An unknown attribute gives BMXAA4176E.
The range can start from another date. Put it after the attribute:
tlrange=%2B1Y
tlattribute=reportdate=2011-01-01T00:00:00This returns the work orders reported in 2011, the same records as the where clause with two dates.
tlfilter: a part of the date#
tlfilter filters on one part of a date, in the form <part>$<attribute>=<value>:
tlfilter=year$reportdate=2026
tlfilter=year$reportdate=2025|2026
tlfilter=month$reportdate=10The parts are year, quarter, month, week, day and hour. A | separates several
values. Keep two things in mind:
monthmatches that month in every year.month$reportdate=10returns each October of the history. Add the year inoslc.wherewhen you want one October.- One part per request. Two parts in one
tlfilter, an unknown part such asdayofweek, or an unknown attribute are refused with BMXAA9757E, “Error executing the request”.
Classification attributes: attributesearch#
attributesearch finds records by the values of their classification attributes, for
example the specifications of an asset:
/api/os/mxapiasset
attributesearch=[SPEED:>=50]
oslc.select=assetnum,descriptionThe forms we used:
attributesearch | A record matches when |
|---|---|
[SPEED] | its classification has the attribute SPEED |
[SPEED:1800] | SPEED is 1800, the same as [SPEED:=1800] |
[SPEED:>=50] | SPEED is 50 or more; >, < and <= work too |
[SPEED:>=50;CAPACITY:>=10000] | both conditions hold |
The square brackets are required. Without them, and with an unknown attribute, the request is refused with status 400 and the message “assetattribute#invalid assetattribute id”, without a BMXAA code. The attribute name is the one of the classification, as in the Attributes application.
Which filters combine#
oslc.where and a saved query combine with every filter in this article. The others do not
always combine with each other. We measured each pair on our test system:
| Request | Result |
|---|---|
domaininternalwhere with oslc.where | both apply |
domaininternalwhere with tlrange | both apply |
domaininternalwhere with attributesearch | domaininternalwhere is dropped |
domaininternalwhere with tlfilter | domaininternalwhere is dropped |
domaininternalwhere with _fd | _fd is dropped |
~VALUE~ in oslc.where with any of them | both apply |
A dropped filter gives no error. The request returns more records than you asked for, which is
easy to miss in a test with little data. This is the main reason we filter by internal value with
tildes in oslc.where.
Errors at a glance#
| Request | Answer | Fix |
|---|---|---|
domaininternalwhere with a value or lower case | 400 BMXAA0211E | use the internal value in upper case |
domaininternalwhere with two attributes | 400 BMXAA0211E | use tildes in oslc.where |
domaininternalwhere on an attribute without a synonym domain | 200, every record | check the attribute |
_fd with an unknown domain or one of another object | 200, every record | check the domain’s object |
tlrange=+3M with a raw plus | 500 | send %2B3M |
tlrange without tlattribute | 500 | add tlattribute |
tlrange with an unknown unit | 400 BMXAA9693E | use Y M W D h m s |
tlattribute with an unknown attribute | 400 BMXAA4176E | check the name |
tlfilter with two parts or an unknown part | 400 BMXAA9757E | one of year quarter month week day hour |
attributesearch without brackets or with an unknown attribute | 400 | write [NAME:value] |
Examples#
Each request below returned data on our test system. Each line is one query parameter.
Operating assets of a site, with the internal value for the client’s logic:
/api/os/mxapiasset
oslc.where=siteid="BEDFORD" and status="~OPERATING~"
oslc.select=assetnum,status
internalvalues=1Work orders waiting for approval, reported in the last three months:
/api/os/mxapiwodetail
oslc.where=siteid="BEDFORD" and status="~WAPPR~"
tlrange=-3M
tlattribute=reportdate
oslc.select=wonum,description,reportdate
oslc.orderBy=-reportdateWork orders of one year, counted per status:
/api/os/mxapiwodetail
oslc.where=siteid="BEDFORD"
tlfilter=year$reportdate=2026
gbcols=status,count.*Fast machines that are operating:
/api/os/mxapiasset
attributesearch=[SPEED:>=1000]
oslc.where=siteid="BEDFORD" and status="~OPERATING~"
oslc.select=assetnum,descriptionWhat comes next#
IBM’s own pages are the reference to keep next to this article:
- Filtering in the IBM Maximo Manage documentation.
- Query (GET) / Filtering in IBM’s Maximo REST API guide on GitHub.
This article closes the reading part of the series. The next one starts with writing data: create, update and merge, and child objects. The series overview lists all parts. If you want help with the REST API in your own Manage, our services page shows how we work, or get in touch.
IBM and Maximo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide.
