REST system properties

System properties are available to configure how the REST API works for your specific requirements.

Predefined system properties

Use the following system properties to configure how the REST API works. The properties all start with mxe.rest, such as mxe.rest.format.json.mimetypes.

Table 1. Predefined REST system properties
mxe.rest.property name Description Default value
format.json.mimetypes A comma-separated list of supported MIME types for JSON that is included in the HTTP Accept header property. The value is used only for content negotiation and is superseded by query parameters that specify a format. application/json
format.xml.mimetypes A comma-separated list of supported MIME types for XML that is included in the HTTP Accept header property. The value is used only for content negotiation and is superseded by query parameters that specify a format. application/xml,text/xml
handler.mbo The resource handler class file for business objects. com.ibm.tivoli.maximo.rest.MboResourceRequestHandler
handler.os The resource handler class file for object structures. com.ibm.tivoli.maximo.rest.OSResourceRequestHandler
handler.ss The standard service handler class file that supports access to system data. com.ibm.tivoli.maximo.rest.MaxServiceResourceRequestHandler
mbo.blockaccess A comma-separated list of business objects that the REST API cannot access. This property overrides any configured authorization restrictions.  
mbo.defaultformat The default representation for all business objects. This property is superseded by the value of the Accept header that is used in content negotiation and by query parameters that specify a representation. xml
mbo.imglib.defaultformat The REST default representation for the IMGLIB business object. image
os.blockaccess A comma-separated list of object structures that the REST API cannot access. This property overrides any configured authorization restrictions.  
os.defaultformat The default representation for all object structures. This property is superseded by the value of the Accept header property that is used in content negotiation and by query parameters that specify a representation. xml
serializer.mbo.imglib.image The serializer class for the IMGLIB business object that is in image format. com.ibm.tivoli.maximo.rest.ImageLibSerializer
serializer.mbo.json The serializer class for business objects that are in JSON format. com.ibm.tivoli.maximo.rest.MboJSONSerializer
serializer.mbo.xml The serializer class for business objects that are in XML format. com.ibm.tivoli.maximo.rest.MboXMLSerializer
serializer.os.json The serializer class for object structures that are in JSON format. com.ibm.tivoli.maximo.rest.OSJSONSerializer
serializer.os.xml The serializer class for object structures that are in XML format. com.ibm.tivoli.maximo.rest.OSXMLSerializer
serializer.ss.json The serializer class for standard service system data that is in JSON format. com.ibm.tivoli.maximo.rest.ServiceMethodResponseJSONSerializer
serializer.ss.xml The serializer class for standard service system data that is in XML format. com.ibm.tivoli.maximo.rest.ServiceMethodResponseXMLSerializer
ss.defaultformat The default representation for all standard service system data. This property is superseded by the value of the Accept header property that is used in content negotiation and by query parameters that specify a representation. xml
supportedformats The list of supported representations. xml,json,image
webappurl The URL for the token authentication web application. This property is for internal use only.  
whereclause.usepolicy Specifies how the _uw query parameter is used. If the value is parse, the SQL WHERE clause is inspected to prevent cross-site scripting and SQL injection attacks. If the value is noparse, the clause is not inspected. If the value is anything else, the WHERE clause is ignored. parse

Optional system properties for caching

You can create the following properties to configure caching in the REST API. The properties all must start with mxe.rest, such as mxe.rest.mbo.wo.cache

Table 2. Optional REST system properties for caching
mxe.rest.property name Type Description Examples

handler.resource.cache

Boolean

Enables pessimistic caching for the specified handler and resource.

Defaults to false.

mxe.rest.mbo.wo.cache set to 1

mxe.rest.os.mxwo.cache set to 1

handler.resource.deepetag

Boolean

If optimistic caching is enabled, specifies that all objects in the object structure are evaluated instead of just the root object.

Defaults to false.

 

handler.resource.optimistic

Boolean

Enables optimistic caching for the specified handler and resource. Applies to collections of one or more resources.

For an object structure, only the main business object is evaluated for a change in state. Child business objects are not evaluated. Non-persistent attributes of a business object are excluded from the evaluations of state changes.

If you enable optimistic caching, you can also specify the handler.resource.deepetag system property.

Defaults to false.

mxe.rest.mbo.wo.optimistic set to 1

mxe.rest.os.mxwo.optimistic set to 1

handler.resource.maxage

Integer, in seconds

Specified the maximum amount of time, in seconds, that a resource collection is maintained in the cache.

mxe.rest.mbo.wo.maxage set to 60

mxe.rest.os.mxwo.maxage set to 60



Feedback