If you're building something interactive, add rsmeta=1 to the request. Editability rules are going to be dynamic and this will tell you what fields are currently readonly, required, have a method of retrieving values, etc.
EX Request: /maximo/api/os/mxapiwodetail?lean=1&oslc.select=wonum,description,siteid,assetnum,location,status,estdur&rsmeta=1&ignorecollectionref=1&oslc.where=wonum="1001"
EX Response:
{
"member": [
{
"status_description": "Approved",
"$assetnum_meta": {
"constrainedValueList": "https://mydomain.com/maximo/api/os/mxapiwodetail/_QkVERk9SRC8xMDAx/getlist~assetnum"
},
"description": "12 Month Service on Shipping Dept #1 Conveyor",
"$siteid_meta": {
"readOnly": true,
"constrainedValueList": "https://mydomain.com/maximo/api/os/mxapiwodetail/_QkVERk9SRC8xMDAx/getlist~siteid"
},
"wonum": "1001",
"_rowstamp": "102754038",
"assetnum": "12600",
"$status_meta": {
"readOnly": true,
"constrainedValueList": "https://mydomain.com/maximo/api/os/mxapiwodetail/_QkVERk9SRC8xMDAx/getlist~status"
},
"siteid": "BEDFORD",
"location": "SHIPPING",
"href": "https://mydomain.com/maximo/api/os/mxapiwodetail/_QkVERk9SRC8xMDAx",
"$wonum_meta": {
"readOnly": true,
"constrainedValueList": "https://mydomain.com/maximo/api/os/mxapiwodetail/_QkVERk9SRC8xMDAx/getlist~wonum"
},
"$location_meta": {
"constrainedValueList": "https://mydomain.com/maximo/api/os/mxapiwodetail/_QkVERk9SRC8xMDAx/getlist~location"
},
"$estdur_meta": {
"required": true
},
"estdur": 4.0,
"status": "APPR"
}
],
"href": "https://mydomain.com/maximo/api/os/mxapiwodetail",
"responseInfo": {
"href": "https://mydomain.com/maximo/api/os/mxapiwodetail?lean=1&oslc.select=wonum,description,siteid,assetnum,location,status,estdur&rsmeta=1&ignorecollectionref=1&oslc.where=wonum=%221001%22",
"totalCount": 1
}
}
------------------------------
Steven Shull
IBM
------------------------------
Original Message:
Sent: 07-07-2023 13:17
From: Roger Vallee
Subject: How to handle Read-Only API Calls from External Applications?
I am not sure if this has been answered in another post after searching so I wanted to ask it here.
MAXREST call - Object Structure - example - my-woAPI - workorder parent - 10 fields that are read only.
How do most people address these fields on an update from maxrest call?
#Integrations
------------------------------
Roger Vallee
Prometheus Group
------------------------------