Centron MAP REST API
This document shows how to use Centreon MAP REST API to manage views, read the following document for more details.
NOTICE : Adding an element to a view requires 1 HTTP call on the view endpoint, which will update the elements of the view automatically, according to the content request.
See below for the list of resources available through REST API :
Map : Access point to a main view.
View : Canvas used to contain various graphical elements (shapes, hosts, services etc.).
Graphical elements :
Container : Graphical representation of a sub-view. When a container is created, automatically the sub-view it stands for is created.
Centreon resources : Graphical representation of Centreon resources, such as
Widgets : Dynamic gadget which agglomerates some underlying data
Shapes : Static geometric forms
Media : Speaks for itself
Links : Line shaped elements
Return a session token on success. The most important values to store are "jwtToken", because it is they that will have to be returned in other header calls.
login required | string Centreon user |
password required | string Password of this user |
{- "login": "string",
- "password": "string"
}
{- "jwtToken": "string"
}
Retrieve the list of available Maps and their root View
size | integer <int64> Default: 25 size |
offset | integer <int64> Default: 0 offset |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
[- {
- "id": 0,
- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "viewId": 0,
- "privilege": "OWNER",
- "mapStatus": "OK"
}
]
Create a Map with a root View. The view will be created automatically. You must to have creator role to create a map.
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
name required | string Map name |
description | string More information about the Map |
locked | boolean Default: false Lock the view to prevent deleting it |
hidden | boolean Default: false Do not display it in the default listing |
object (Image) Properties of the image |
{- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}
}
{- "id": 0,
- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "viewId": 0,
- "privilege": "OWNER",
- "mapStatus": "OK"
}
Update a Map with new properties, NOT for the element in its view. Only admin user or user with creator role can update a map.
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
id required | integer <int64> The id of map |
name | string Map name |
description | string More information about the Map |
locked | boolean Default: false Lock the view to prevent deleting it |
hidden | boolean Default: false Do not display it in the default listing |
object (Image) Properties of the image | |
viewId | integer <int64> The id of view (The view represents the "canvas" of the requested Map) |
privilege | string Enum: "OWNER" "EDITOR" "VIEWER" "NONE" |
mapStatus | string Enum: "OK" "WARNING" "CRITICAL" "UNKNOWN" "PENDING" "NA" Worst status ("ok", "warning", "critical", "unknown", "pending", "na") |
{- "id": 0,
- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "viewId": 0,
- "privilege": "OWNER",
- "mapStatus": "OK"
}
{- "id": 0,
- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "viewId": 0,
- "privilege": "OWNER",
- "mapStatus": "OK"
}
Retrieve a map by its ID, its root View ID will be retrieved as well
id required | integer <int64> Identifier of the Map to retrieve |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
{- "id": 0,
- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "viewId": 0,
- "privilege": "OWNER",
- "mapStatus": "OK"
}
Remove a Map. If it's root view is not refered in another container, it will also be removed. Only admin user or user with creator role can delete a map.
id required | integer <int64> Identifier of the map to delete |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
{- "id": 0,
- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "viewId": 0,
- "privilege": "OWNER",
- "mapStatus": "OK"
}
Export a map with all elements.
id required | integer <int64> Identifier of the map to export |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
{- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "view": {
- "id": 0,
- "containers": [
- {
- "id": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}, - "centreonImageId": 0,
- "viewId": 0
}
], - "centreonResources": [
- { }
], - "studioWidgets": [
- { }
], - "shapes": [
- { }
], - "media": [
- { }
], - "links": [
- { }
]
}
}
Import a Map with all elements.
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
name | string Map name |
description | string More information about the Map |
locked | boolean Default: false Lock the view to prevent deleting it |
hidden | boolean Default: false Do not display it in the default listing |
object (Image) Properties of the image | |
object |
{- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "view": {
- "id": 0,
- "containers": [
- {
- "id": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}, - "centreonImageId": 0,
- "viewId": 0
}
], - "centreonResources": [
- { }
], - "studioWidgets": [
- { }
], - "shapes": [
- { }
], - "media": [
- { }
], - "links": [
- { }
]
}
}
{- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "view": {
- "id": 0,
- "containers": [
- {
- "id": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}, - "centreonImageId": 0,
- "viewId": 0
}
], - "centreonResources": [
- { }
], - "studioWidgets": [
- { }
], - "shapes": [
- { }
], - "media": [
- { }
], - "links": [
- { }
]
}
}
Migrate a Map from Map (Legacy) with all elements. Only admin user can migrate a map.
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
{- "name": "string",
- "description": "string",
- "locked": false,
- "hidden": false,
- "image": {
- "id": 0,
- "name": "string",
- "url": "string"
}, - "view": {
- "id": 0,
- "containers": [
- {
- "id": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}, - "centreonImageId": 0,
- "viewId": 0
}
], - "centreonResources": [
- { }
], - "studioWidgets": [
- { }
], - "shapes": [
- { }
], - "media": [
- { }
], - "links": [
- { }
]
}
}
Retrieve a View by its ID, with contained element ids
mapId required | integer <int64> Identifier of the Map to retrieve |
id required | integer <int64> Identifier of the View to retrieve |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
{- "id": 0,
- "resources": [
- {
- "id": 0,
- "type": "HOST_GROUP",
- "resourceId": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}
}
], - "containers": [
- {
- "id": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}, - "centreonImageId": 0,
- "viewId": 0
}
], - "links": [
- {
- "id": 0,
- "type": "SIMPLE_LINK",
- "linkSourceId": 0,
- "linkTargetId": 0,
- "bendpoints": "string",
- "bendLatlngs": "string",
- "xSource": 0,
- "ySource": 0,
- "xTarget": 0,
- "yTarget": 0,
- "graphics": {
- "displayLabel": true,
- "fillColor": "string",
- "fontStyle": "string",
- "fontColor": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opacity": 0,
- "opaque": true,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true
}
}
], - "media": [
- {
- "id": 0,
- "type": "IMAGE",
- "centreonImageId": 0,
- "needNewDimension": true,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}
}
], - "shapes": [
- {
- "id": 0,
- "type": "RECTANGLE",
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}
}
], - "widgets": [
- {
- "id": 0,
- "type": "GAUGE",
- "resourceType": "HOST_GROUP",
- "resourceId": 0,
- "metricName1": "string",
- "metric1Min": 0,
- "metric1Max": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}
}
], - "isGeo": true,
- "latitude": 0,
- "longitude": 0,
- "zoom": 0,
- "xPov": 0,
- "yPov": 0
}
Create, Update and Delete an existing Graphical Element to the target view.
mapId required | integer <int64> Identifier of the Map in which to update or delete the Element |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
id | integer <int64> The id of view |
Array of HostGroup (object) or Host (object) or ServiceGroup (object) or MetaService (object) or Service (object) or BusinessActivity (object) | |
containers | Array of integers <int64> |
links | Array of integers <int64> |
media | Array of integers <int64> |
shapes | Array of integers <int64> |
widgets | Array of integers <int64> |
isGeo | boolean |
latitude | number <float> |
longitude | number <float> |
zoom | number <float> |
xPov | number <float> |
yPov | number <float> |
{- "id": 0,
- "resources": [
- {
- "id": 0,
- "type": "HOST_GROUP",
- "resourceId": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}
}
], - "containers": [
- 0
], - "links": [
- 0
], - "media": [
- 0
], - "shapes": [
- 0
], - "widgets": [
- 0
], - "isGeo": true,
- "latitude": 0,
- "longitude": 0,
- "zoom": 0,
- "xPov": 0,
- "yPov": 0
}
{- "id": 0,
- "resources": [
- {
- "id": 0,
- "type": "HOST_GROUP",
- "resourceId": 0,
- "graphics": {
- "borderColor": "string",
- "diplayImage": true,
- "displayLabel": true,
- "fillColor": "string",
- "fontColor": "string",
- "fontFamily": "string",
- "fontSize": 0,
- "fontStyle": 0,
- "height": 0,
- "horizontalAlign": "LEFT",
- "horizontalLabelPosition": "LEFT",
- "image": "string",
- "label": "string",
- "layer": 0,
- "line": "SOLID",
- "locked": true,
- "opaque": true,
- "opacity": 0,
- "style": "DEFAULT",
- "thickness": 0,
- "useBackgroundStatusColor": true,
- "useFontStatusColor": true,
- "verticalAlign": "TOP",
- "verticalLabelPosition": "TOP",
- "width": 0,
- "x": 0,
- "y": 0
}
}
], - "containers": [
- 0
], - "links": [
- 0
], - "media": [
- 0
], - "shapes": [
- 0
], - "widgets": [
- 0
], - "isGeo": true,
- "latitude": 0,
- "longitude": 0,
- "zoom": 0,
- "xPov": 0,
- "yPov": 0
}
Get a list of available Geoiews
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
[- {
- "id": 0,
- "name": "string",
- "position": {
- "latitude": 0,
- "longitude": 0
}, - "zoom": 0,
- "markerClustering": false,
- "htHostGroupIds": [
- 0
], - "baBusinessViewIds": [
- 0
], - "dataLayerIds": [
- 0
], - "hostGroupIds": [
- 0
]
}
]
Create a Geoview
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
id | integer <int64> The id of geoview |
name | string Name of the geoview |
object | |
zoom | integer Lower zoom levels means that the map shows entire continents, while higher zoom levels means that the map can show details of a city. |
markerClustering | boolean Default: false Group markers by cluster |
htHostGroupIds | Array of integers The list of host indexed by host group identifiers |
baBusinessViewIds | Array of integers The list of business activities indexed by business view |
dataLayerIds | Array of integers The list of data layers |
hostGroupIds | Array of integers The list of hostgroup |
{- "id": 0,
- "name": "string",
- "position": {
- "latitude": 0,
- "longitude": 0
}, - "zoom": 0,
- "markerClustering": false,
- "htHostGroupIds": [
- 0
], - "baBusinessViewIds": [
- 0
], - "dataLayerIds": [
- 0
], - "hostGroupIds": [
- 0
]
}
{- "id": 0,
- "name": "string",
- "position": {
- "latitude": 0,
- "longitude": 0
}, - "zoom": 0,
- "markerClustering": false,
- "htHostGroupIds": [
- 0
], - "baBusinessViewIds": [
- 0
], - "dataLayerIds": [
- 0
], - "hostGroupIds": [
- 0
]
}
Get a Geoiew
id required | integer <int64> Update a Geoview by its ID |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
{- "id": 0,
- "name": "string",
- "position": {
- "latitude": 0,
- "longitude": 0
}, - "zoom": 0,
- "markerClustering": false,
- "htHostGroupIds": [
- 0
], - "baBusinessViewIds": [
- 0
], - "dataLayerIds": [
- 0
], - "hostGroupIds": [
- 0
]
}
Update a Geoiew
id required | integer <int64> Update a Geoview by its ID |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
id | integer <int64> The id of geoview |
name | string Name of the geoview |
object | |
zoom | integer Lower zoom levels means that the map shows entire continents, while higher zoom levels means that the map can show details of a city. |
markerClustering | boolean Default: false Group markers by cluster |
htHostGroupIds | Array of integers The list of host indexed by host group identifiers |
baBusinessViewIds | Array of integers The list of business activities indexed by business view |
dataLayerIds | Array of integers The list of data layers |
hostGroupIds | Array of integers The list of hostgroup |
{- "id": 0,
- "name": "string",
- "position": {
- "latitude": 0,
- "longitude": 0
}, - "zoom": 0,
- "markerClustering": false,
- "htHostGroupIds": [
- 0
], - "baBusinessViewIds": [
- 0
], - "dataLayerIds": [
- 0
], - "hostGroupIds": [
- 0
]
}
{- "id": 0,
- "name": "string",
- "position": {
- "latitude": 0,
- "longitude": 0
}, - "zoom": 0,
- "markerClustering": false,
- "htHostGroupIds": [
- 0
], - "baBusinessViewIds": [
- 0
], - "dataLayerIds": [
- 0
], - "hostGroupIds": [
- 0
]
}
Delete a Geoiew
id required | integer <int64> Delete a Geoview by its ID |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
{- "id": 0,
- "name": "string",
- "position": {
- "latitude": 0,
- "longitude": 0
}, - "zoom": 0,
- "markerClustering": false,
- "htHostGroupIds": [
- 0
], - "baBusinessViewIds": [
- 0
], - "dataLayerIds": [
- 0
], - "hostGroupIds": [
- 0
]
}
Retrieve the privileges of a map by its ID. Only the admin user or the user who is part of an aclgroup with owner privilege on the map can retrieve privileges of the map.
mapId required | integer <int64> Identifier of the Map to retrieve |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
[- {
- "id": 0,
- "name": "string",
- "mapId": 0,
- "privilege": "OWNER"
}
]
Update the privileges of a map by its ID. Only the admin user or the user who is part of an aclgroup with owner privilege on the map can update privileges of the map.
mapId required | integer <int64> Identifier of the Map to update |
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
id required | integer The identifier of the aclgroup |
name required | string The name of the aclgroup |
mapId required | integer The identifier of the map |
privilege required | string Enum: "OWNER" "EDITOR" "VIEWER" "NONE" |
[- {
- "id": 0,
- "name": "string",
- "mapId": 0,
- "privilege": "OWNER"
}
]
[- {
- "id": 0,
- "name": "string",
- "mapId": 0,
- "privilege": "OWNER"
}
]
Retrieve the roles of each aclgroup. Only the admin user can retrieve the roles of each aclgroup.
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
[- {
- "id": 0,
- "name": "string",
- "isCreator": true
}
]
Update the role of aclgroups. Only the admin user can update the roles of aclgroup.
Authorization required | string Concatenation of "bearer " and "jwtToken" value from authentication |
id required | integer The identifier of the aclgroup |
name required | string The name of the aclgroup |
isCreator required | boolean True means the aclgroup is creator |
[- {
- "id": 0,
- "name": "string",
- "isCreator": true
}
]
[- {
- "id": 0,
- "name": "string",
- "isCreator": true
}
]