IBM Maximo: Dicas de APIs Rest: Difference between revisions
| Line 47: | Line 47: | ||
} | } | ||
}</nowiki> | }</nowiki> | ||
== Get the attributes of Object Structures== | |||
'''Request''' | |||
<small>curl -X GET r/maximo/oslc/os/MXOBJECTCFG?lean=1&oslc.select=objectname,rel.maxattributecfg{attributename,maxtype,primarykeycolseq,required,title}&oslc.pageSize=1001&oslc.where=objectname%20IN%20%5B%22WORKORDER%22%2C%22WOACTIVITY%22%5D' \</small> \ | |||
-H 'Accept: application/json' \ | |||
-H 'Cache-Control: no-cache' \ | |||
-H 'Content-Type: application/json' \ | |||
-H 'maxauth: '''<CHANGE_HERE>'''' | |||
* Traz apenas parte dos atributos: oslc.select=objectname,rel.maxattributecfg{attributename,maxtype,primarykeycolseq,required,title} | |||
* Define a seleção com oslc.where=objectname IN ["WORKORDER","WOACTIVITY"]' | |||
'''Response''' | |||
<nowiki>{ | |||
"member": [ | |||
{ | |||
"_rowstamp": "5517901218", | |||
"maxattributecfg_collectionref": "https://mx.com/maximo/oslc/os/mxobjectcfg/_V09SS09SREVS/maxattributecfg", | |||
"maxattributecfg": [ | |||
{ | |||
"maxtype_description": "Data e Hora", | |||
"maxtype": "DATETIME", | |||
"attributename": "ACTFINISH", | |||
"title": "Término Efetivo", | |||
"required": false | |||
}, | |||
... | |||
], | |||
"objectname": "WORKORDER", | |||
"href": "https://mx.com/maximo/oslc/os/mxobjectcfg/_V09SS09SREVS" | |||
}, | |||
{ | |||
"_rowstamp": "5517899849", | |||
"maxattributecfg_collectionref": "https://mx.com/maximo/oslc/os/mxobjectcfg/_V09BQ1RJVklUWQ--/maxattributecfg", | |||
"maxattributecfg": [ | |||
{ | |||
"maxtype_description": "Alfanumérico", | |||
"maxtype": "ALN", | |||
"attributename": "DESCRIPTION", | |||
"title": "Descrição", | |||
"required": false | |||
}, | |||
... | |||
], | |||
"objectname": "WOACTIVITY", | |||
"href": "https://mx.com/maximo/oslc/os/mxobjectcfg/_V09BQ1RJVklUWQ--" | |||
}, | |||
], | |||
"href": "https://mx.com/maximo/oslc/os/MXOBJECTCFG", | |||
"responseInfo": { | |||
"href": "https://mx.com/maximo/oslc/os/MXOBJECTCFG?lean=1&oslc.select=objectname,rel.maxattributecfg{attributename,maxtype,primarykeycolseq,required,title}&oslc.pageSize=1001&oslc.where=objectname%20IN%20%5B%22WORKORDER%22%2C%22WOACTIVITY%22%5D", | |||
"pagenum": 1 | |||
} | |||
}</nowiki> | |||
= Ver também = | = Ver também = | ||
Revision as of 20:05, 8 December 2021
Documento em Rascunho (Draft)
URLs
Getting the list of Object Structures
Request
curl -X GET '/maximo/oslc/os/MXINTOBJECT?lean=1&oslc.select=intobjectname,description,rel.maxintobjdetail{objectname,hierarchypath}&oslc.pageSize=1001&oslc.where=usewith%3D%22INTEGRATION%22' \
-H 'Accept: application/json' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'maxauth: <CHANGE_HERE>'
- Traz apenas parte dos atributos: oslc.select=intobjectname,description,rel.maxintobjdetail{objectname,hierarchypath}
- Define a seleção com oslc.where=usewith="INTEGRATION"
Response
{
"member": [
{
"_rowstamp": "1401947183",
"maxintobjdetail_collectionref": "https://mx.com/maximo/oslc/os/mxintobject/_TVhJTlZFTlRPUlk-/maxintobjdetail",
"description": "Definição de Blablabla",
"maxintobjapp_collectionref": "https://mx.com/maximo/oslc/os/mxintobject/_TVhJTlZFTlRPUlk-/maxintobjapp",
"maxintobjdetail": [
{
"hierarchypath": "WORKORDER",
"objectname": "WORKORDER"
},
{
"hierarchypath": "WORKORDER/WOACTIVITY",
"objectname": "WOACTIVITY"
},
],
"href": "https://mx.com/maximo/oslc/os/mxintobject/_TVhJTlZFTlRPUlk-",
"intobjectname": "MXWOBLABLA"
},
...
],
"href": "https://mx.com/maximo/oslc/os/MXINTOBJECT",
"responseInfo": {
"href": "https://mx....",
"pagenum": 1
}
}
Get the attributes of Object Structures
Request
curl -X GET r/maximo/oslc/os/MXOBJECTCFG?lean=1&oslc.select=objectname,rel.maxattributecfg{attributename,maxtype,primarykeycolseq,required,title}&oslc.pageSize=1001&oslc.where=objectname%20IN%20%5B%22WORKORDER%22%2C%22WOACTIVITY%22%5D' \ \
-H 'Accept: application/json' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'maxauth: <CHANGE_HERE>'
- Traz apenas parte dos atributos: oslc.select=objectname,rel.maxattributecfg{attributename,maxtype,primarykeycolseq,required,title}
- Define a seleção com oslc.where=objectname IN ["WORKORDER","WOACTIVITY"]'
Response
{
"member": [
{
"_rowstamp": "5517901218",
"maxattributecfg_collectionref": "https://mx.com/maximo/oslc/os/mxobjectcfg/_V09SS09SREVS/maxattributecfg",
"maxattributecfg": [
{
"maxtype_description": "Data e Hora",
"maxtype": "DATETIME",
"attributename": "ACTFINISH",
"title": "Término Efetivo",
"required": false
},
...
],
"objectname": "WORKORDER",
"href": "https://mx.com/maximo/oslc/os/mxobjectcfg/_V09SS09SREVS"
},
{
"_rowstamp": "5517899849",
"maxattributecfg_collectionref": "https://mx.com/maximo/oslc/os/mxobjectcfg/_V09BQ1RJVklUWQ--/maxattributecfg",
"maxattributecfg": [
{
"maxtype_description": "Alfanumérico",
"maxtype": "ALN",
"attributename": "DESCRIPTION",
"title": "Descrição",
"required": false
},
...
],
"objectname": "WOACTIVITY",
"href": "https://mx.com/maximo/oslc/os/mxobjectcfg/_V09BQ1RJVklUWQ--"
},
],
"href": "https://mx.com/maximo/oslc/os/MXOBJECTCFG",
"responseInfo": {
"href": "https://mx.com/maximo/oslc/os/MXOBJECTCFG?lean=1&oslc.select=objectname,rel.maxattributecfg{attributename,maxtype,primarykeycolseq,required,title}&oslc.pageSize=1001&oslc.where=objectname%20IN%20%5B%22WORKORDER%22%2C%22WOACTIVITY%22%5D",
"pagenum": 1
}
}