↓ Skip to main content
A pen and ink drawing of a locksmith's workbench. In the middle stands a large orange padlock with a brass key turned in its lock. That key hangs on a ring with several more keys of different shapes and ages, each with a teal tag. A folding wooden ruler lies along the front of the bench, and two orange clips mark a short stretch of it. A vice, a tray of tools and a rack of punches stand around the bench.

Domain Values in Maximo REST API Queries

The Maximo REST API in Practice - This article is part of a series.
Part 6: This Article
A status in Manage has an internal value and any number of names on top of it. A client that checks 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 recordInternal value
OPERATINGOPERATING
ACTIVEOPERATING
LIMITEDUSEOPERATING
BROKENDECOMMISSIONED
SOLDDECOMMISSIONED

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. status has one. worktype and wopriority on a work order get no _maxvalue.
  • An alias carries over. With status--st the keys are st, st_description and st_maxvalue.
  • _description comes 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:

Three values share one internal value, and a filter on the internal value finds all of them Three values share one internal value, and a filter on the internal value finds all of them
Three values share one internal value, and a filter on the internal value finds all of them

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!=OPERATING

It 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=ACTIVE and status=operating are 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=OPERATING returns every record, without an error.
  • Some filters drop it. attributesearch, tlfilter and _fd do 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_ASSET

SRM_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=reportdate

This 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:

PartValues
sign- for the past, + for the future, +- for both sides
numbera whole number
unitY 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. MXAPIASSET and MXAPIWODETAIL have none, and the request failed with status 500 and a Java message.
  • tlmodedate=1 counts whole days. tlrange=-7D starts exactly seven days before now. With tlmodedate=1 it 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:00

This 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=10

The parts are year, quarter, month, week, day and hour. A | separates several values. Keep two things in mind:

  • month matches that month in every year. month$reportdate=10 returns each October of the history. Add the year in oslc.where when you want one October.
  • One part per request. Two parts in one tlfilter, an unknown part such as dayofweek, 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,description

The forms we used:

attributesearchA 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:

RequestResult
domaininternalwhere with oslc.whereboth apply
domaininternalwhere with tlrangeboth apply
domaininternalwhere with attributesearchdomaininternalwhere is dropped
domaininternalwhere with tlfilterdomaininternalwhere is dropped
domaininternalwhere with _fd_fd is dropped
~VALUE~ in oslc.where with any of themboth 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
#

RequestAnswerFix
domaininternalwhere with a value or lower case400 BMXAA0211Euse the internal value in upper case
domaininternalwhere with two attributes400 BMXAA0211Euse tildes in oslc.where
domaininternalwhere on an attribute without a synonym domain200, every recordcheck the attribute
_fd with an unknown domain or one of another object200, every recordcheck the domain’s object
tlrange=+3M with a raw plus500send %2B3M
tlrange without tlattribute500add tlattribute
tlrange with an unknown unit400 BMXAA9693Euse Y M W D h m s
tlattribute with an unknown attribute400 BMXAA4176Echeck the name
tlfilter with two parts or an unknown part400 BMXAA9757Eone of year quarter month week day hour
attributesearch without brackets or with an unknown attribute400write [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=1

Work 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=-reportdate

Work 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,description

What comes next
#

IBM’s own pages are the reference to keep next to this article:

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.

The Maximo REST API in Practice - This article is part of a series.
Part 6: This Article