IBM Maximo: Dicas de APIs Rest: Difference between revisions

From Wiki
Line 113: Line 113:
Also supports date histograms – yearly/quarterly/monthly/weekly. For example GET /mxapiwodetail? gbcols=year$statusdate,quarter$statusdate,sum.actlabhrs
Also supports date histograms – yearly/quarterly/monthly/weekly. For example GET /mxapiwodetail? gbcols=year$statusdate,quarter$statusdate,sum.actlabhrs
|-
|-
|
|uri?'''_format'''=xml<br>uri?'''_format'''=csv || type of output
uri?'''_format'''=xml
|-
 
|uri?'''collectioncount'''=1 ||retorna o totalCount e totalPages na reposta<br>Set mxe.oslc.collectioncount system property to 1, the totalCount and totalPages parameters are included by default as part of the responseInfo.
uri?'''_format'''=csv  
|-
|| type of output
|uri?'''count'''=1 ||only the total count of records that match the query and not the records
|}
|}



Revision as of 01:55, 26 January 2022

Arquitetura

  • BO/OS: BO/Object Structure
  • MMI: Maximo Management Interface

Documentação, Artigos e Technotes

URLs

  • /maximo/oas3/api.html-> Maximo RESTful API - Swagger
  • /maximo/oslc/oas?includeactions=1-> Maximo RESTful API - Swagger include actions
  • /maximo/oslc/ -> Default uri os oslc
  • /maximo/oslc/apimeta -> APIs Metadata. Metadata for all the object structures that are API eligible
  • /maximo/oslc/license -> License Keys
  • /maximo/oslc/members -> Server Members, API for the Maximo Management Interface (MMI).
  • /maximo/oslc/members/thisserver ->This Server
  • /maximo/oslc/products -> Installed Products
  • /maximo/oslc/systeminfo -> System Info
  • /maximo/oslc/version -> Version
  • /maximo/oslc/whoami -> Who am I
  • /maximo/oslc/sp -> Service Provider



jsonschema/

GET jsonschema/mxapiwodetail – gets the schema for the OS, but one object at a time.
GET jsonschema/mxapiwodetail?oslc.select=* - gets the full schema

Support child object schemas GET jsonschema/mxapiasset/assetmeter
Support schema views - Get jsonschema/mxapiasset?oslc.select=attr1,rel1.attr2
Mbo schemas GET jsonmboschemas/asset


POST /maximo/oslc/os/mxasset{id}?action=wsmethod:changeStatus

{
 "rollToAllChildren": true,
 "removeFromActiveSP": true,
 "removeFromActiveRoutes": true,
 "status": "string",
 "changePMStatus": true
}

Headers

Key Value Description
maxauth=base64(username:password) required Username and Password encoded as base64
Content-Type=application/json - -
Accept=application/json - -

Parameters

Key Description
uri?lean=1 simple notation
uri?oslc.select especifica o conjunto de atributos a serem buscados nas estruturas de objetos, bem como nos objetos relacionados.
uri?oslc.paging=true -
uri?oslc.pageSize=N

especifica os recursos para cada página de uma consulta.

  • Stable Paging – good for downloading large data sets.
  • Auto paging – Helps prevent OOM for large dataset requests when no page size specified.
  • Limit Paging – Helps prevent OOM for large dataset requests when high page size specified.
uri?oslc.where especifica a cláusula WHERE para filtrar o conjunto de resultados de uma consulta.
uri?oslc.orderBy especifica como os resultados de uma consulta são ordenados.
uri?savedQuery=name Saved query can be SQL, Java, Auto Script. /apimeta/<os name> lists all saved queries for an Object Structure
uri?tlrange=-3M&tlattribute=dateattr[=indexdate]
  • tlattribute - the timeline attribute to which the range applies. If no

index data specified, its defaulted to the current date-time.

  • tlrange – The range in Months (M)/Years (Y)/ Week (W)/ Days (D)/ Hour (h)/Min (m)/ Seconds (s). + and - indicates whether to add or substract from tlattribute date-time.
POST uri?interactive=1 Handling Yes/No/Cancel interactions
GET uri?gbcols=status,count.*,sum.attr1&gbsortby=-count.*

Aggregation APIs. Also supports date histograms – yearly/quarterly/monthly/weekly. For example GET /mxapiwodetail? gbcols=year$statusdate,quarter$statusdate,sum.actlabhrs

uri?_format=xml
uri?_format=csv
type of output
uri?collectioncount=1 retorna o totalCount e totalPages na reposta
Set mxe.oslc.collectioncount system property to 1, the totalCount and totalPages parameters are included by default as part of the responseInfo.
uri?count=1 only the total count of records that match the query and not the records


oslc.select

Key Description
oslc.select=attr1,attr2,child{attr4,attr5,grandchild{*}} -
oslc.select=attr1,rel1.attr1,rel.rel2{attr1,attr2},rel.rel3.os {*}
  • rel1.attr1 – 1:1 relations. Results in a JSON Object for property named “rel1”.
  • rel.rel2 {attr1,attr2} – 1:* relations. Results in a JSON Array for property named “rel2”.
  • rel.rel3.os {*} – 1:* relations. Results in a JSON Array with OS json (for the named os) as array members.

oslc.where

Key Description
uri?oslc.where=attr1 in [“val1”,”val2”] and attr2>200 -
uri?oslc.where=objectname IN ['WORKORDER','WOACTIVITY'] -
uri?oslc.where=usewith='INTEGRATION' -

Ver também