The REST API provides the following methods to retrieve engine statistics:

POST /api/statistics/memoryusage

URI

POST /api/statistics/memoryusage

Description Retrieves the current in use memory, used by the JVM, working, or total allocated for Rhapsody in a specified time period.
Request Header Content-Type: application/json 
Accept: application/json
Content-Type: application/vnd.orchestral.rhapsody.6_1+json 
Accept: application/vnd.orchestral.rhapsody.6_1+json
Request Body

The request body has the following structure:

  • memoryType - can be either IN_USE, JVM_IN_USE, TOTAL_ALLOCATED or WORKING.
  • startTime.

  • endTime.

  • samplingResolution - the sampling resolution in ISO 8601 duration format, for example:

ISO 8601 Duration Description
PT2M  2 minutes 
PT5M  5 minutes 
PT1H  1 hour 
P1D  1 day 
{
 "memoryType":"IN_USE",
 "startTime":"2015-08-13T14:01:02.123",
 "endTime":"2015-08-13T15:30:02.123"
 "samplingResolution":"PT10M"
}
Response Status 200 OK - operation successful.
Response Body

The response body has the following structure:

 {
 "data":{
   "startTime":"2015\u002D08\u002D13T14\u003A01\u003A02\u002E123",
   "endTime":"2015\u002D08\u002D13T15\u003A30\u003A02\u002E123",
   "samplingResolution":null,
   "results":[{
     "time":"20150813T140130\u002E000\u002B1200",
     "value":228825920
    },{
     "time":"20150813T140200\u002E000\u002B1200",
      "value":231971648
   }],
   "memoryType":"IN_USE"
 },
 "error":null}
Access Rights 'View engine statistics REST API'.

GET /api/statistics/memoryusage

URI

GET /api/statistics/memoryusage

Description Retrieves the current memory usage (currently in use, used by the JVM, working, and total allocated) for Rhapsody.
Request Header Accept: application/json
Accept: application/vnd.orchestral.rhapsody.6_2+json
Request Body Empty.
Response Status 200 OK - operation successful.
Response Body

The response body has the following structure:

{
 "data":{
   "inUse": 210,
   "jvmInUse": 256,
   "totalAllocated": 2048,
   "working": 210
  }, "error": null
}
Access Rights 'View engine statistics REST API'.

POST /api/statistics/diskspace

URI

POST /api/statistics/diskspace

Description Retrieves the disk space for Rhapsody in a specified time period.
Request Header

Content-Type: application/json
Accept: application/json

Content-Type: application/vnd.orchestral.rhapsody.6_2+json
Accept: application/vnd.orchestral.rhapsody.6_2+json
Request Body

The request body has the following structure:

{
  "startTime":"2015-08-17T16:01:00",
  "endTime":"2015-08-17T17:01:00",
  "samplingResolution":"PT10M"
}
Response Status 200 OK - operation successful.
Response Body

The response body has the following structure:

Example...
{
  "data":{
    "startTime":"2015\u002D08\u002D17T16\u003A01\u003A00",
    "endTime":"2015\u002D08\u002D17T17\u003A01\u003A00",
    "samplingResolution":"PT30M",
    "diskResults":[
      {
      "path":"C\u003A\u005CDev\u002DRhapsody\u005Cdeploy\u005Crhapsody",
      "results":[{
        "time":"20150817T160100\u002E000\u002B1200",
        "value":313597923328
      },{
        "time":"20150817T163930\u002E000\u002B1200",
        "value":313515995136
      },{
        "time":"20150817T170100\u002E000\u002B1200",
        "value":313474179072
      }]},
      {
   "path":"C\u003A\u005CDev\u002DRhapsody\u005Cdeploy\u005Crhapsody\u005Cdata",
      "results":[{
        "time":"20150817T160100\u002E000\u002B1200",
        "value":313597923328
      },{
        "time":"20150817T163930\u002E000\u002B1200",
        "value":313515995136
      },{
        "time":"20150817T170100\u002E000\u002B1200",
        "value":313474179072
      }]
    }]
  },
  "error":null
}
Access Rights 'View engine statistics REST API'.

GET /api/statistics/diskspace

URI

GET /api/statistics/diskspace

Description

Retrieves the current available and total disk space for the installation and data directories on the Rhapsody engine.

Request Header Accept: application/json
Accept: application/vnd.orchestral.rhapsody.6_2+json
Request Body Empty.
Response Status

200 OK - operation successful.

Response Body

The response body has the following structure:

{
  "data":{
    "availableDataSpace":298992,
    "totalDataSpace":477931,
    "availableInstallSpace":298992,
    "totalInstallSpace":477931
  },
  "error":null
}
Access Rights 'View engine statistics REST API'.

GET /api/statistics/cpuusage

URI GET /api/statistics/cpuusage
Description Retrieves the current CPU usage of the system hosting the Rhapsody engine as a percentage.
Request Header Accept: text/plain
Request Body Empty.
Response Status 200 OK - operation successful.
Response Body

Returns a numerical value (between 0 and 100) in plain text format.

Access Rights 'View engine statistics REST API'.

GET /api/statistics/messagecount

URI

GET /api/statistics/messagecount

Description

Retrieves the number of received, processed, sent and failed messages on the engine.

Request Header

Accept: application/json, text/html

Accept: application/vnd.orchestral.rhapsody.6_0+json

Accept: application/vnd.orchestral.rhapsody.6_5+json

Request Body

Empty.

Response Status

200 OK - operation successful.

Response Body

The response body has the following structure:

Example...
{
  "data": {
    "totalReceived": 22359,
    "totalProcessed": 27421,
    "totalSent": 19531
    "totalFailed": 1
  },
  "error": null
}

Access Rights

'View message statistics REST API'.

POST /api/statistics/messagecount

URI

POST /api/statistics/messagecount

Description

Retrieves the number of received, processed, sent or failed messages on the engine in a specified time period.

Request Header

Content-Type: application/json
Accept: application/json

Content-Type: application/vnd.orchestral.rhapsody.6_1+json
Accept: application/vnd.orchestral.rhapsody.6_1+json
Content-Type: application/vnd.orchestral.rhapsody.6_5+json
Accept: application/vnd.orchestral.rhapsody.6_5+json

Request Body

The request body has the following structure:

  • messageCountType - SENT, RECEIVED, PROCESSED or FAILED.
  • startTime.
  • endTime.

  • samplingResolution - the sampling resolution in ISO 8601 duration format, for example:

    ISO 8601 Duration Description
    PT2M  2 minutes 
    PT5M  5 minutes 
    PT1H  1 hour 
    P1D  1 day 
{
 "messageCountType":"SENT",
 "startTime":"2012-09-22T17:01:02.123",
 "endTime":"2012-09-22T17:01:02.123",
 "samplingResolution":"PT5M"
}
Response Status 200 OK - operation successful.

Response Body

The response body has the following structure:

Example...
 {
 "data":{
  "startTime":"2014-09-02T14:05:38+12:00",
  "endTime":  "2014-09-02T14:30:38+12:00",
  "samplingResolution": "PT2M",
  "messageCountType": "SENT",
  "results":[
    {
     "time": "20140902T142930.000+1200",
     "value": 0
    },
    {
     "time": "20140902T143030.000+1200",
     "value": 0
    }
   ]
 },
"error": null
}

Access Rights

'View message statistics REST API'.