ActiveMonitor API documentation version v8
http://server:port/activeviam/sentinel/rest/v8
Introduction
This document describes the REST API of ActiveMonitor server.
Note: the root URL provided here will depend of the deployment of your application. For this documentation, we used the URL as provided in ActivePivot sandbox. However, path from sentinel will remain the same.
/agents
API for agents
Agents are entities capable of processing monitors and generate events and alerts. Having them identify to ActiveMonitor allows for users to select an agent for their monitors and to contact an agent for complementary actions. ActivePivot server can act as one of those agents.
This provides information about the agents connected to ActiveMonitor. It also offers an end point for agents to check in to and out from ActiveMonitor.
Gets a list of agents.
get /agents
Gets a list of agents.
HTTP status code 200
Body
Type: application/json
Schema:
agents
Example:
[
{
"agentName": "EquityDerivativesManager",
"agentType": "KPI",
"sites": [
"EquityDerivativesManager/EquityDerivativesCubeSmall",
"EquityDerivativesManager/EquityDerivativesCube",
"EquityDerivativesManager/EquityDerivativesCubeEURGBP",
"EquityDerivativesManager/EquityDerivativesCubeDist"
],
"id": 0,
"connectionDetails": {
"url": "http://localhost:9090/webservices/rest",
"liveUrl": "http://localhost:8080/live"
}
},
...
]
Checks in an agent into a ActiveMonitor server.
If the agent is already known by ActiveMonitor, it may return the same id.
post /agents/checkIn
Checks in an agent into a ActiveMonitor server.
If the agent is already known by ActiveMonitor, it may return the same id.
Body
Type: application/json
Example:
{
"agentName": "DatabaseAgent",
"agentType": "Database",
"sites": [
"base-1",
...
],
"connectionDetails": {
"url": "http://localhost:9090/webservices/rest/database"
}
}
Checks out an agent from a ActiveMonitor server.
post /agents/checkOut
Checks out an agent from a ActiveMonitor server.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Id of an agent to check out",
"type": "integer"
}
Example:
1
HTTP status code 200
The description of the logged out agent
Body
Type: application/json
Example:
{
"agentName": "EquityDerivativesManager",
"agentType": "KPI",
"sites": [
"EquityDerivativesManager/EquityDerivativesCubeSmall",
"EquityDerivativesManager/EquityDerivativesCube",
"EquityDerivativesManager/EquityDerivativesCubeEURGBP",
"EquityDerivativesManager/EquityDerivativesCubeDist"
],
"id": 0,
"connectionDetails": {
"url": "http://localhost:9090/webservices/rest",
"liveUrl": "http://localhost:8080/live"
}
}
/alerts
API for alerts.
This provides information about the alerts and offer methods to start and stop alerts. This API has shortcut in /monitors, to easily create alerts for a particular monitor.
Gets a list of alerts.
Adds a new alert to ActiveMonitor.
get /alerts
Gets a list of alerts.
Query Parameters
- from: (string)
Beginning of the time windows.
The value is expected to be a UNIX timestamp in ms or the value
now
to indicate the current time on server side. - to: (string)
End of the time windows.
The value is expected to be a UNIX timestamp in ms or the value
now
to indicate the current time on server side. - acvive: (boolean)
Switch to get active alerts or closed ones.
Use true to get active alerts only, false for stopped alerts. If not specified, no filter is applied.
HTTP status code 200
Body
Type: application/json
Schema:
alert
Example:
[
{
"id": 1,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 8,
"start": 1458032780045,
"stop": 1458034564429,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[5]}"
},
{
"id": 2,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 9,
"start": 1458032780085,
"stop": 1458032963838,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskB].[4]}"
},
...
]
post /alerts
Adds a new alert to ActiveMonitor.
Body
Type: application/json
Schema:
alert_creation
Example:
{
"site": "site/of/the/alert",
"monitorId": 3,
"eventId": 32279,
"start": 1458040724444,
"content": "Content for my alert"
}
HTTP status code 200
Body
Type: application/json
Schema:
alert
Example:
{
"id": 364,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 32279,
"start": 1458040724444,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[1]}"
}
Entity representing a alert
Gets the alert with alert id = {alertId}
Updates an alert.
So far, the only field that can be updated is the content of the alert, as other fields are managed by the system.
Specifying the alert id in the body is not required. If not defined, it will be picked from the URL.
Stops an given alert.
get /alerts/{alertId}
Gets the alert with alert id = {alertId}
Path Parameters
- alertId: required (integer)
Id of the targeted alert
HTTP status code 200
Body
Type: application/json
Example:
{
"id": 364,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 32279,
"start": 1458040724444,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[1]}"
}
HTTP status code 400
When alerts is unknown
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
put /alerts/{alertId}
Updates an alert.
So far, the only field that can be updated is the content of the alert, as other fields are managed by the system.
Specifying the alert id in the body is not required. If not defined, it will be picked from the URL.
Path Parameters
- alertId: required (integer)
Id of the targeted alert
Body
Type: application/json
Example:
{
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 1,
"start": 1474880955890,
"content": "{location: \"Some other newer trade\"}"
}
HTTP status code 200
Result of the update, providing the full definition of the changed alert
Body
Type: application/json
Example:
{
"id": 18,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 1,
"start": 1474880955890,
"content": "{location: \"Some other newer trade\"}"
}
HTTP status code 400
When the alert does not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
HTTP status code 401
Resource only available to connected user
Body
Type: application/json
Example:
No content
delete /alerts/{alertId}
Stops an given alert.
Path Parameters
- alertId: required (integer)
Id of the targeted alert
HTTP status code 200
The description of the stopped alert
Body
Type: application/json
Example:
{
"id": 364,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 32279,
"start": 1458040724444,
"stop": 1458065036524,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[1]}"
}
/info
API to retrieve information about ActiveMonitor application
Get information regarding the connected user
Get information regarding the version of ActiveMonitor application
/messages
API to retrieve messages sent to the connected user
Gets a list of messages.
get /messages
Gets a list of messages.
HTTP status code 200
Body
Type: application/json
Schema:
messages
Example:
[
{
"id": 0,
"time": 1444722638563,
"sender": "workflow-service",
"title": "Monitor \"monitor admin\" created",
"level": "INFO",
"content": "Monitor \"monitor admin\" has been successfully created",
"type": "String",
"read": false
},
...
]
HTTP status code 401
Resource only available to connected user
Body
Type: application/json
Example:
No content
Sends a collection of new messages as the connected user
post /messages/send
Sends a collection of new messages as the connected user
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "array",
"items": { "$ref": "message" },
"minItems": 1,
"definitions": {
"message": {
"id": "message",
"type": "object",
"properties": {
"time": {
"description": "Unix timestamp of the message sending",
"type": "integer",
"required": true,
"minimum": 1
},
"recipients": {
"description": "List of user names to which the message is sent",
"type": "array",
"items": { "$ref": "recipient" },
"minItems": 1
},
"title": {
"description": "Title of the message",
"type": "string",
"required": true
},
"level": {
"description": "Level of the message",
"enum": [ "DEFAULT", "INFO", "SUCCESS", "WARNING", "DANGER" ],
"required": true
},
"category": {
"description": "Optional category for the message",
"type": "string"
},
"content": {
"description": "Content of the message",
"type": "object"
},
"type": {
"description": "Type of the message",
"type": "string"
}
}
},
"recipient": {
"id": "recipient",
"type": "string"
}
}
}
Example:
[
{
"time": 1444722638563,
"title": "Hello world",
"recipients": [ "john", "alfred" ],
"level": "INFO",
"category": "whatever",
"content": "A new message for both of you"
}
]
Deletes a message from the server
delete /messages/{id}
Deletes a message from the server
Path Parameters
- id: required (string)
HTTP status code 200
Body
Type: application/json
Example:
No content
HTTP status code 400
When the message does not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
HTTP status code 401
Resource only available to connected user
Body
Type: application/json
Example:
No content
Marks a message as read If the message is already read, this has no effect.
get /messages/{id}/mark-as-read
Marks a message as read If the message is already read, this has no effect.
Path Parameters
- id: required (string)
HTTP status code 200
Body
Type: application/json
Example:
No content
HTTP status code 400
When the message does not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
HTTP status code 401
Resource only available to connected user
Body
Type: application/json
Example:
No content
Answer a message. The result of this action is dependent of the message The request body is "just" an object. Its specification depends of the message.
post /messages/{id}/answer
Answer a message. The result of this action is dependent of the message The request body is "just" an object. Its specification depends of the message.
Path Parameters
- id: required (string)
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object"
}
Example:
{
"id": "abcde-123",
"comment": "Ok for validation",
"action": "validate"
}
HTTP status code 200
Body
Type: application/json
Example:
No content
HTTP status code 400
When the message does not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
HTTP status code 401
Resource only available to connected user
Body
Type: application/json
Example:
No content
/monitors
API allowing configuration of the ActiveMonitor server.
Retrieves all the monitors defined in the ActiveMonitor server.
Adds a new monitor to the ActiveMonitor server.
get /monitors
Retrieves all the monitors defined in the ActiveMonitor server.
HTTP status code 200
Successful retrieval of all the monitors within the ActiveMonitor server.
Body
Type: application/json
Example:
[
{
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1444662993768
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
},
...
]
post /monitors
Adds a new monitor to the ActiveMonitor server.
Body
Type: application/json
Example:
{
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"name": "monitor admin",
"creator": "admin",
"description": "Example one",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"workflowScheme": "private"
}
HTTP status code 200
Result of a successful monitor addition.
Body
Type: application/json
Example:
{
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1444662993768
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
}
Get all monitors stored in the given site
Gets a list of monitors.
Adds a new monitor to ActiveMonitor.
get /monitors/{site}
Gets a list of monitors.
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
HTTP status code 200
Body
Type: application/json
Example:
[
{
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1444662993768
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
},
...
]
post /monitors/{site}
Adds a new monitor to ActiveMonitor.
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
Body
Type: application/json
Example:
{
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1444662993768
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
}
HTTP status code 200
Body
Type: application/json
Example:
{
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1444662993768
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
}
Entity representing a monitor
Gets the monitor with monitor id = {monitorId}
Updates the monitor with monitor id = {monitorId}
Deletes the monitor with monitor id = {monitorId}
get /monitors/{site}/{monitorId}
Gets the monitor with monitor id = {monitorId}
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
- monitorId: required (integer)
Id of the targeted monitor
HTTP status code 200
Body
Type: application/json
Example:
{
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1444662993768
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
}
HTTP status code 400
When monitors is unknown
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
put /monitors/{site}/{monitorId}
Updates the monitor with monitor id = {monitorId}
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
- monitorId: required (integer)
Id of the targeted monitor
HTTP status code 200
Body
Type: application/json
Example:
{
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1444662993768
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
}
HTTP status code 400
When monitors is unknown
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
delete /monitors/{site}/{monitorId}
Deletes the monitor with monitor id = {monitorId}
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
- monitorId: required (integer)
Id of the targeted monitor
HTTP status code 200
Body
Type: application/json
Example:
No content
HTTP status code 400
When monitors is unknown
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
Gets the report of a given monitor.
This contains the definition of the monitor as well as statistics of the status - number of red, orange. green - as well as activity time.
get /monitors/{site}/{monitorId}/report
Gets the report of a given monitor.
This contains the definition of the monitor as well as statistics of the status - number of red, orange. green - as well as activity time.
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
- monitorId: required (integer)
Id of the targeted monitor
HTTP status code 200
Body
Type: application/json
Example:
{
"monitor": {
"internalId": 1,
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"during": 15000,
"createdAt": {
"id": 1,
"timestamp": 1458032764284
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
},
"statistics": {
"red": 6,
"green": 1
},
"lastActivityTime": 1458046493551,
"lastEventTime": 1458046488634
}
HTTP status code 400
If the monitor does not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
Retrieve the history for a given monitorId and a site.
get /monitors/{site}/{monitorId}/history
Retrieve the history for a given monitorId and a site.
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
- monitorId: required (integer)
Id of the targeted monitor
HTTP status code 200
List of all versions of the monitor definition
Body
Type: application/json
Example:
[
{
"id": 3,
"name": "monitor m1",
"description": "Example two",
"creator": "manager1",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1458032764284
},
"deletedAt": {
"id": 0,
"timestamp": 1458036618600,
"username": "manager1"
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring\",\n\t\"selection\" : \"[Bookings].[Desk].[BookId].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
},
{
"id": 3,
"name": "monitor m1",
"description": "Example two",
"creator": "manager1",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1458036618600,
"username": "manager1"
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring\",\n\t\"selection\" : \"[Bookings].[Desk].[BookId].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "manager_group"
},
...
]
Gets the events associated to a given monitor
get /monitors/{site}/{monitorId}/events
Gets the events associated to a given monitor
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
- monitorId: required (integer)
Id of the targeted monitor
Query Parameters
- from: required (integer)
Beginning of the time windows. The value is expected to be a UNIX timestamp in ms.
- to: required (integer)
End of the time windows. The value is expected to be a UNIX timestamp in ms.
HTTP status code 200
List of events related to a given monitor, in a particular time window if any provided
Body
Type: application/json
Schema:
events
Example:
[
{
"id": 8,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"updatedResource": {
"[Time].[HistoricalDates].[AsOfDate]": "[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016]",
"[Epoch].[Epoch].[Branch]": "[Epoch].[Epoch].[Branch].[master]",
"[Bookings].[Desk].[BookId]": "[Bookings].[Desk].[ALL].[AllMember].[DeskA].[5]"
},
"timestamp": 1458032779085,
"status": -1,
"states": [
{
"id": "epoch",
"caption": "epoch",
"value": 7,
"formattedValue": "7"
},
{
"id": "[PnL Limit Status]",
"caption": "[PnL Limit Status]",
"value": -1,
"formattedValue": "-1"
},
{
"id": "[pnl.SUM]",
"caption": "[pnl.SUM]",
"value": -5486.456197568232,
"formattedValue": "-5,486.46"
},
{
"id": "[PnL Limit]",
"caption": "[PnL Limit]",
"value": 0,
"formattedValue": "0"
}
]
},
{
"id": 9,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"updatedResource": {
"[Time].[HistoricalDates].[AsOfDate]": "[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016]",
"[Epoch].[Epoch].[Branch]": "[Epoch].[Epoch].[Branch].[master]",
"[Bookings].[Desk].[BookId]": "[Bookings].[Desk].[ALL].[AllMember].[DeskB].[4]"
},
"timestamp": 1458032779085,
"status": -1,
"states": [
{
"id": "epoch",
"caption": "epoch",
"value": 7,
"formattedValue": "7"
},
{
"id": "[PnL Limit Status]",
"caption": "[PnL Limit Status]",
"value": -1,
"formattedValue": "-1"
},
{
"id": "[pnl.SUM]",
"caption": "[pnl.SUM]",
"value": -1294.1120529404157,
"formattedValue": "-1,294.11"
},
{
"id": "[PnL Limit]",
"caption": "[PnL Limit]",
"value": 0,
"formattedValue": "0"
}
]
},
...
]
HTTP status code 400
If the monitor does not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
Gets a particular event associated to a monitor
get /monitors/{site}/{monitorId}/events/{eventId}
Gets a particular event associated to a monitor
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
- monitorId: required (integer)
Id of the targeted monitor
- eventId: required (integer)
Id of a particular event to fetch
HTTP status code 200
Body
Type: application/json
Example:
{
"id": 9,
"monitorId": 3,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"timestamp": 1458032779085,
"status": -1,
"updatedResource": {
"[Time].[HistoricalDates].[AsOfDate]": "[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016]",
"[Epoch].[Epoch].[Branch]": "[Epoch].[Epoch].[Branch].[master]",
"[Bookings].[Desk].[BookId]": "[Bookings].[Desk].[ALL].[AllMember].[DeskB].[4]"
},
"states": [
{
"id": "epoch",
"caption": "epoch",
"value": 7,
"formattedValue": "7"
},
{
"id": "[PnL Limit Status]",
"caption": "[PnL Limit Status]",
"value": -1,
"formattedValue": "-1"
},
{
"id": "[pnl.SUM]",
"caption": "[pnl.SUM]",
"value": -1294.1120529404157,
"formattedValue": "-1,294.11"
},
{
"id": "[PnL Limit]",
"caption": "[PnL Limit]",
"value": 0,
"formattedValue": "0"
}
]
}
HTTP status code 400
If the wanted event or the owning monitor do not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
Gets the alerts associated to a given monitor, started and stopped, in a given time period.
If a period is provided, it filters on alerts that either started or stopped in the period. For the filtering, from value is included while _to_ value is excluded.
get /monitors/{site}/{monitorId}/alerts
Gets the alerts associated to a given monitor, started and stopped, in a given time period.
If a period is provided, it filters on alerts that either started or stopped in the period. For the filtering, from value is included while _to_ value is excluded.
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
- monitorId: required (integer)
Id of the targeted monitor
Query Parameters
- from: (string)
Beginning of the time windows.
The value is expected to be a UNIX timestamp in ms or the value
now
to indicate the current time on server side. - to: (string)
End of the time windows.
The value is expected to be a UNIX timestamp in ms or the value
now
to indicate the current time on server side.
HTTP status code 200
List of alerts related to a given monitor, in a particular time window if any provided
Body
Type: application/json
Schema:
alerts
Example:
[
{
"id": 363,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 32195,
"start": 1458040704384,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[6]}"
},
{
"id": 364,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 32279,
"start": 1458040724444,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[1]}"
},
...
]
HTTP status code 400
If the monitor does not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
Adds new events to the monitor collections.
It is possible to add events in the same batch to many monitors.
post /monitors/{site}/events
Adds new events to the monitor collections.
It is possible to add events in the same batch to many monitors.
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
Body
Type: application/json
Example:
[
{
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"updatedResource": {
"[Time].[HistoricalDates].[AsOfDate]": "[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016]",
"[Epoch].[Epoch].[Branch]": "[Epoch].[Epoch].[Branch].[master]",
"[Bookings].[Desk].[BookId]": "[Bookings].[Desk].[ALL].[AllMember].[DeskA].[5]"
},
"timestamp": 1458032779085,
"previousStatus": 1,
"status": -1,
"states": [
{
"id": "epoch",
"caption": "epoch",
"value": 7,
"formattedValue": "7"
},
{
"id": "[PnL Limit Status]",
"caption": "[PnL Limit Status]",
"value": -1,
"formattedValue": "-1"
},
{
"id": "[pnl.SUM]",
"caption": "[pnl.SUM]",
"value": -5486.456197568232,
"formattedValue": "-5,486.46"
},
{
"id": "[PnL Limit]",
"caption": "[PnL Limit]",
"value": 0,
"formattedValue": "0"
}
]
},
{
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 4,
"updatedResource": {
"[Time].[HistoricalDates].[AsOfDate]": "[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016]",
"[Epoch].[Epoch].[Branch]": "[Epoch].[Epoch].[Branch].[master]",
"[Bookings].[Desk].[BookId]": "[Bookings].[Desk].[ALL].[AllMember].[DeskB].[4]"
},
"timestamp": 1458032779085,
"status": -1,
"states": [
{
"id": "epoch",
"caption": "epoch",
"value": 7,
"formattedValue": "7"
},
{
"id": "[PnL Limit Status]",
"caption": "[PnL Limit Status]",
"value": -1,
"formattedValue": "-1"
},
{
"id": "[pnl.SUM]",
"caption": "[pnl.SUM]",
"value": -1294.1120529404157,
"formattedValue": "-1,294.11"
},
{
"id": "[PnL Limit]",
"caption": "[PnL Limit]",
"value": 0,
"formattedValue": "0"
}
]
},
...
]
HTTP status code 200
Body
Type: application/json
Schema:
event-list.schema
Example:
[
{
"id": 8,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"updatedResource": {
"[Time].[HistoricalDates].[AsOfDate]": "[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016]",
"[Epoch].[Epoch].[Branch]": "[Epoch].[Epoch].[Branch].[master]",
"[Bookings].[Desk].[BookId]": "[Bookings].[Desk].[ALL].[AllMember].[DeskA].[5]"
},
"timestamp": 1458032779085,
"status": -1,
"states": [
{
"id": "epoch",
"caption": "epoch",
"value": 7,
"formattedValue": "7"
},
{
"id": "[PnL Limit Status]",
"caption": "[PnL Limit Status]",
"value": -1,
"formattedValue": "-1"
},
{
"id": "[pnl.SUM]",
"caption": "[pnl.SUM]",
"value": -5486.456197568232,
"formattedValue": "-5,486.46"
},
{
"id": "[PnL Limit]",
"caption": "[PnL Limit]",
"value": 0,
"formattedValue": "0"
}
]
},
{
"id": 9,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"updatedResource": {
"[Time].[HistoricalDates].[AsOfDate]": "[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016]",
"[Epoch].[Epoch].[Branch]": "[Epoch].[Epoch].[Branch].[master]",
"[Bookings].[Desk].[BookId]": "[Bookings].[Desk].[ALL].[AllMember].[DeskB].[4]"
},
"timestamp": 1458032779085,
"status": -1,
"states": [
{
"id": "epoch",
"caption": "epoch",
"value": 7,
"formattedValue": "7"
},
{
"id": "[PnL Limit Status]",
"caption": "[PnL Limit Status]",
"value": -1,
"formattedValue": "-1"
},
{
"id": "[pnl.SUM]",
"caption": "[pnl.SUM]",
"value": -1294.1120529404157,
"formattedValue": "-1,294.11"
},
{
"id": "[PnL Limit]",
"caption": "[PnL Limit]",
"value": 0,
"formattedValue": "0"
}
]
},
...
]
Adds new alerts to a monitor.
It is possible to add alerts in the same batch to many monitors.
post /monitors/{site}/alerts
Adds new alerts to a monitor.
It is possible to add alerts in the same batch to many monitors.
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
Body
Type: application/json
Example:
[
{
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 32195,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[6]}"
},
{
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 4,
"content": "{\"currency\": \"EUR\", \"epoch\": 753}"
},
...
]
HTTP status code 200
Body
Type: application/json
Schema:
alert-list.schema
Example:
[
{
"id": 363,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 32195,
"start": 1458040704384,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[6]}"
},
{
"id": 364,
"site": "EquityDerivativesManager/EquityDerivativesCube",
"monitorId": 3,
"eventId": 32279,
"start": 1458040724444,
"content": "Events alert on monitor EquityDerivativesManager/EquityDerivativesCube/3 on {[Time].[HistoricalDates].[AsOfDate]=[Time].[HistoricalDates].[AsOfDate].[Tue Mar 15 01:00:00 CET 2016], [Epoch].[Epoch].[Branch]=[Epoch].[Epoch].[Branch].[master], [Bookings].[Desk].[BookId]=[Bookings].[Desk].[ALL].[AllMember].[DeskA].[1]}"
},
...
]
Fetch the updates that occured in a given site
get /monitors/{site}/fetch
Fetch the updates that occured in a given site
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
Query Parameters
- from: required (integer)
Beginning of the time windows. The value is expected to be a UNIX timestamp in ms.
- to: required (integer)
End of the time windows. The value is expected to be a UNIX timestamp in ms.
HTTP status code 200
Body
Type: application/json
Example:
{
"addedOrUpdatedMonitors": [
{
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"createdAt": {
"id": 0,
"timestamp": 1445343776231
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
},
],
"deletedMonitorIds": [
2
],
"updatesTimestamp": 1445345195306
}
HTTP status code 400
If the site does not exist
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
Gets reports for all monitors in a given site.
get /monitors/{site}/reports
Gets reports for all monitors in a given site.
Path Parameters
- site: (string)
Equivalent of a folder path with underscore instead of slash. This is useful to organize resources
HTTP status code 200
Body
Type: application/json
Example:
[
{
"monitor": {
"internalId": 1,
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"during": 15000,
"createdAt": {
"id": 1,
"timestamp": 1458032764284
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
},
"statistics": {
"red": 6,
"green": 1
},
"lastActivityTime": 1458046493551,
"lastEventTime": 1458046488634
},
{
"monitor": {
"internalId": 2,
"id": 2,
"name": "Tunnel Count",
"description": "Tunnel Count",
"creator": "manager1",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"during": 15000,
"createdAt": {
"id": 2,
"timestamp": 1458032764284
},
"configuration": "{\n\t\"kpi\" : \"Tunnel Count Monitoring\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\",\n\t\"filter\" : \"skip_fine\"\n}",
"workflowScheme": "private"
},
"statistics": {
"red": 4
},
"lastActivityTime": 1458046493551,
"lastEventTime": 1458032779292
},
...
]
Gets reports for all monitors in any site.
get /monitors/reports
Gets reports for all monitors in any site.
HTTP status code 200
Body
Type: application/json
Example:
[
{
"monitor": {
"internalId": 1,
"id": 1,
"name": "monitor admin",
"description": "Example one",
"creator": "admin",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"during": 15000,
"createdAt": {
"id": 1,
"timestamp": 1458032764284
},
"configuration": "{\n\t\"kpi\" : \"PnL Monitoring (MDX)\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\"\n}",
"workflowScheme": "private"
},
"statistics": {
"red": 6,
"green": 1
},
"lastActivityTime": 1458046493551,
"lastEventTime": 1458046488634
},
{
"monitor": {
"internalId": 2,
"id": 2,
"name": "Tunnel Count",
"description": "Tunnel Count",
"creator": "manager1",
"site": "EquityDerivativesManager/EquityDerivativesCube",
"type": "KPI",
"during": 15000,
"createdAt": {
"id": 2,
"timestamp": 1458032764284
},
"configuration": "{\n\t\"kpi\" : \"Tunnel Count Monitoring\",\n\t\"selection\" : \"[Underlyings].[Underlyings].[UnderlierCurrency].AllMembers\",\n\t\"context\" : { },\n\t\"mode\" : \"CONTINUOUS\",\n\t\"filter\" : \"skip_fine\"\n}",
"workflowScheme": "private"
},
"statistics": {
"red": 4
},
"lastActivityTime": 1458046493551,
"lastEventTime": 1458032779292
},
...
]
/repository
API providing an proxy to apply workflows on parameter operations.
Updates the definitions for several parameter
post /repository/?update=
Updates the definitions for several parameter
Body
Type: application/json
Example:
[
{
"name": "lower_goal",
"deletions": [ {
"id": 6,
"name": "lower_goal",
"coordinates": {
"Currency": "*"
},
"value": 110,
"activation": 1460388680794,
"createdAt": {
"id": 2,
"timestamp": 1460388680794
}
} ],
}, {
"name": "upper_goal",
"updates": [ {
"from": {
"id": 8,
"name": "upper_goal",
"coordinates": {
"Desk": "*"
},
"value": 400,
"activation": 1460388680794,
"createdAt": {
"id": 2,
"timestamp": 1460388680794
}
},
"to": {
"id": 8,
"name": "upper_goal",
"coordinates": {
"Desk": "*"
},
"value": 240,
"activation": 1460930400000
}
} ],
}, {
"name": "middle_goal",
"additions": [ {
"name": "middle_goal",
"coordinates": {
"City": "*"
},
"value": 620,
"expiration": 1460756100000
} ]
}
]
Updates the definition of a parameter
put /repository/{parameter}?update=
Updates the definition of a parameter
Path Parameters
- parameter: required (string)
Name of the parameter
Body
Type: application/json
Example:
{
"name": "lower_goal",
"deletions": [ {
"id": 6,
"name": "lower_goal",
"coordinates": {
"Currency": "*"
},
"value": 110,
"activation": 1460388680794,
"createdAt": {
"id": 2,
"timestamp": 1460388680794
}
} ],
"updates": [ {
"from": {
"id": 8,
"name": "lower_goal",
"coordinates": {
"Desk": "*"
},
"value": 400,
"activation": 1460388680794,
"createdAt": {
"id": 2,
"timestamp": 1460388680794
}
},
"to": {
"id": 8,
"name": "lower_goal",
"coordinates": {
"Desk": "*"
},
"value": 240,
"activation": 1460930400000
}
} ],
"additions": [ {
"name": "lower_goal",
"coordinates": {
"City": "*"
},
"value": 620,
"expiration": 1460756100000
} ]
}
Deletes a parameter
/workflows
API for workflows
Currenly, it only allows to get and set configuration for workflows and schemas.
Gets a list of all defined schemes for a particular entity type.
get /workflows/{entityType}/schemes
Gets a list of all defined schemes for a particular entity type.
Path Parameters
- entityType: required (string)
Entity type name, such as monitor or parameter
HTTP status code 200
Body
Type: application/json
Schema:
schemes
Example:
[
{
"workflowScheme": "private",
"workflowConfiguration": {
"update-parameter": "update parameter without validation"
},
"default": false
},
{
"workflowScheme": "manager_group",
"workflowConfiguration": {
"update-parameter": "update parameter with validation"
},
"default": true
},
...
]
Entity representing a scheme
Gets a description for a single schema identified by its name
get /workflows/{entityType}/schemes/{schemaName}
Gets a description for a single schema identified by its name
Path Parameters
- entityType: required (string)
Entity type name, such as monitor or parameter
- schemaName: required (string)
Name of the schema to consider
HTTP status code 200
Body
Type: application/json
Example:
{
"workflowScheme": "private",
"workflowConfiguration": {
"update-parameter": "update parameter without validation"
},
"default": false
}
HTTP status code 400
When schemes is unknown
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
Gets a list of all entities of a particular entity type for which a schema is set. If entities do not appear in that listing, they are ruled by the default schema.
get /workflows/{entityType}/entities
Gets a list of all entities of a particular entity type for which a schema is set. If entities do not appear in that listing, they are ruled by the default schema.
Path Parameters
- entityType: required (string)
Entity type name, such as monitor or parameter
HTTP status code 200
Body
Type: application/json
Schema:
entities
Example:
[
{
"entityType": "parameter",
"entityId": "__default__",
// __default__ represent configuration of the default schema for parameter
"workflowSchema": "private",
"creationAudit": {
"id": 3,
"timestamp": 1473427367918
}
},
{
"entityType": "parameter",
"entityId": "lower_goal",
"workflowSchema": "production",
"creationAudit": {
"id": 13,
"timestamp": 1473427367961
}
},
...
]
Entity representing a entity
Gets the schema configured for an entity
Updates the schema configured for an entity
get /workflows/{entityType}/entities/{entityKey}
Gets the schema configured for an entity
Path Parameters
- entityType: required (string)
Entity type name, such as monitor or parameter
- entityKey: required (string)
Key identifying a particular entity.
As the type of entities changed depending on the value of parameter entityType, the key may have various forms. For monitors, it is
site/id
. For parameters, it isname
.
HTTP status code 200
Body
Type: application/json
Example:
{
"entityType": "parameter",
"entityId": "lower_goal",
"workflowSchema": "private",
"createdAt": {
"id": 0,
"timestamp": 1473427367918
}
}
HTTP status code 400
When entities is unknown
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}
put /workflows/{entityType}/entities/{entityKey}
Updates the schema configured for an entity
Path Parameters
- entityType: required (string)
Entity type name, such as monitor or parameter
- entityKey: required (string)
Key identifying a particular entity.
As the type of entities changed depending on the value of parameter entityType, the key may have various forms. For monitors, it is
site/id
. For parameters, it isname
.
Body
Type: application/json
Example:
private
HTTP status code 200
Body
Type: application/json
Example:
No content
HTTP status code 400
When an entity is unknown
Body
Type: application/json
Schema:
{
"errorChain": {
"description": "Chain of error messages, from the root cause to the top",
"type": "array",
"items": { "$ref": "errorLink" },
"minItems": 1,
"required": true
},
"stackTrace": {
"description": "Technical stack trace as a string. It generally include line breaks and tabulations for a better display",
"type": "string",
"required": true
},
"definitions": {
"errorLink": {
"type": {
"description": "Type of an error link",
"type": "string",
"required": true
},
"message": {
"description": "Message of a given link",
"type": "string",
"required": true
}
}
}
}
Example:
{
"errorChain" : [ {
"type" : "BadArgumentException",
"message" : "[400] Monitor 6 does not exist"
} ],
"stackTrace" : "com.qfs.fwk.services.BadArgumentException: [400] Monitor 6 does not exist\n\tat com.qfs.snl.rs.impl.MonitorRestService.safeGet(MonitorRestService.java:283)\n\tat com.qfs.snl.rs.impl.MonitorRestService.getReport(MonitorRestService.java:260)\n\tat sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)\n\tat org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)\n\tat org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)\n\t..."
}