New features

  • Added media endpoint (POST)
  • Added metrics by service listing endpoint (GET)
  • Added graph template endpoint (GET)
  • Added connector endpoint (GET)
  • Added host endpoint (PATCH)
  • Added service enpdoint (PATCH)
  • Added service severity configuration endpoint (PUT)
  • Added hosts status count endpoint (GET)

Updated features

  • Added metrics by service listing endpoint to service resource type

Information

All dates are in ISO 8601 format

Authentication

There are two modes of authentication:

  • By token: after identification with your login credentials
  • By cookie: by reusing a valid session ID

Acknowledgement

List all acknowledgements

Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Massively disacknowledge resources

Authorizations:
TokenCookie
Request Body schema: application/json
required
object (Disacknowledgement.Resource)
Array of objects (Monitoring.Resource.Action)

Responses

Request samples

Content type
application/json
{
  • "disacknowledgement": {
    },
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Display one acknowledgement

Display one acknowledgement.

Authorizations:
TokenCookie
path Parameters
acknowledgement_id
required
integer <int64>
Example: 227

ID of the acknowledgement

Responses

Response samples

Content type
application/json
{
  • "id": 34,
  • "author_id": 3,
  • "author_name": "admin",
  • "comment": "Acknowledged by admin",
  • "deletion_time": "2019-08-24T14:15:22Z",
  • "entry_time": "2019-08-24T14:15:22Z",
  • "host_id": 12,
  • "poller_id": 1,
  • "is_notify_contacts": false,
  • "is_persistent_comment": true,
  • "is_sticky": true,
  • "state": 1,
  • "service_id": 5
}

List all hosts acknowledgements

Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on multiple hosts

Authorizations:
TokenCookie
Request Body schema: application/json
required
Array
comment
string

Short description of the acknowledgement

is_notify_contacts
boolean

Indicates whether notification is sent to the contacts linked to the host or service

is_persistent_comment
boolean

Indicates whether acknowledgement is maintained in the case of a restart of the scheduler

is_sticky
boolean

Indicates whether acknowledgement is maintained in the case of a change of status

with_services
boolean

Indicates whether we should add the downtime on the host-related services

resource_id
integer <int64>

ID of the resource

parent_resource_id
integer or null <int64>

ID of the parent resource (eg: host id)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all services acknowledgements

Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on multiple services

Authorizations:
TokenCookie
Request Body schema: application/json
required
Array
comment
string

Short description of the acknowledgement

is_notify_contacts
boolean

Indicates whether notification is sent to the contacts linked to the host or service

is_persistent_comment
boolean

Indicates whether acknowledgement is maintained in the case of a restart of the scheduler

is_sticky
boolean

Indicates whether acknowledgement is maintained in the case of a change of status

resource_id
integer <int64>

ID of the resource

parent_resource_id
integer or null <int64>

ID of the parent resource (eg: host id)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all acknowledgements of a host

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on chosen host

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Request Body schema: application/json
required
comment
string

Short description of the acknowledgement

is_notify_contacts
boolean

Indicates whether notification is sent to the contacts linked to the host or service

is_persistent_comment
boolean

Indicates whether acknowledgement is maintained in the case of a restart of the scheduler

is_sticky
boolean

Indicates whether acknowledgement is maintained in the case of a change of status

with_services
boolean

Indicates whether we should add the downtime on the host-related services

Responses

Request samples

Content type
application/json
{
  • "comment": "Acknowledged by admin",
  • "is_notify_contacts": false,
  • "is_persistent_comment": true,
  • "is_sticky": true,
  • "with_services": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Cancel an acknowledgement on a host

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Responses

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all acknowledgements of a service

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on chosen service

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Request Body schema: application/json
required
comment
string

Short description of the acknowledgement

is_notify_contacts
boolean

Indicates whether notification is sent to the contacts linked to the host or service

is_persistent_comment
boolean

Indicates whether acknowledgement is maintained in the case of a restart of the scheduler

is_sticky
boolean

Indicates whether acknowledgement is maintained in the case of a change of status

Responses

Request samples

Content type
application/json
{
  • "comment": "Acknowledged by admin",
  • "is_notify_contacts": false,
  • "is_persistent_comment": true,
  • "is_sticky": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Cancel an acknowledgement on a service

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Responses

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all acknowledgements of a metaservice

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on chosen metaservice

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Request Body schema: application/json
required
comment
string

Short description of the acknowledgement

is_notify_contacts
boolean

Indicates whether notification is sent to the contacts linked to the host or service

is_persistent_comment
boolean

Indicates whether acknowledgement is maintained in the case of a restart of the scheduler

is_sticky
boolean

Indicates whether acknowledgement is maintained in the case of a change of status

Responses

Request samples

Content type
application/json
{
  • "comment": "Acknowledged by admin",
  • "is_notify_contacts": false,
  • "is_persistent_comment": true,
  • "is_sticky": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Cancel an acknowledgement on a metaservice

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Responses

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Acknowledge multiple resources

Authorizations:
TokenCookie
Request Body schema: application/json
required
object (Acknowledgement.Resource)
Array of objects (Monitoring.Resource.Action)

Responses

Request samples

Content type
application/json
{
  • "acknowledgement": {
    },
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Administration

get local provider configuration with password security policy

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "password_security_policy": {
    }
}

update local provider configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
required
object

Responses

Request samples

Content type
application/json
{
  • "password_security_policy": {
    }
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

get openid provider configuration

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "is_active": true,
  • "is_forced": false,
  • "base_url": "https://localhost:8080",
  • "authorization_endpoint": "/authorize",
  • "token_endpoint": "/token",
  • "introspection_token_endpoint": "/introspect",
  • "userinfo_endpoint": "/userinfo",
  • "endsession_endpoint": "/logout",
  • "connection_scopes": [
    ],
  • "login_claim": "sub",
  • "client_id": "client_id",
  • "client_secret": "client_secret",
  • "authentication_type": "client_secret_post",
  • "verify_peer": true,
  • "auto_import": true,
  • "contact_template": {
    },
  • "email_bind_attribute": "email",
  • "fullname_bind_attribute": "name",
  • "redirect_url": "https://my_custom_domain.com",
  • "authentication_conditions": {
    },
  • "groups_mapping": {
    },
  • "roles_mapping": {
    }
}

update openid provider configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
is_active
required
boolean

Indicates whether the provider is active or not

is_forced
required
boolean

Indicates whether the provider is forced or not

base_url
required
string or null

Base URL of the provider

authorization_endpoint
required
string or null

Authorization endpoint of the provider

token_endpoint
required
string or null

Token endpoint of the provider

introspection_token_endpoint
required
string or null

Introspection token endpoint of the provider

userinfo_endpoint
required
string or null

Userinfo endpoint of the provider

endsession_endpoint
required
string or null

Endsession endpoint of the provider

connection_scopes
required
Array of strings

List of scopes to request

login_claim
required
string or null

Claim used to login

client_id
required
string or null

Client ID

client_secret
required
string or null

Client secret

authentication_type
required
string or null
Enum: "client_secret_post" "client_secret_basic"

Authentication type

verify_peer
required
boolean

Verify peer

auto_import
required
boolean

Auto import user from external provider

required
object or null
email_bind_attribute
required
string or null

Email bind attribute

fullname_bind_attribute
required
string or null

Fullname bind attribute

redirect_url
required
string or null

custom redirect url

object
object
object

Responses

Request samples

Content type
application/json
{
  • "is_active": true,
  • "is_forced": false,
  • "base_url": "https://localhost:8080",
  • "authorization_endpoint": "/authorize",
  • "token_endpoint": "/token",
  • "introspection_token_endpoint": "/introspect",
  • "userinfo_endpoint": "/userinfo",
  • "endsession_endpoint": "/logout",
  • "connection_scopes": [
    ],
  • "login_claim": "sub",
  • "client_id": "client_id",
  • "client_secret": "client_secret",
  • "authentication_type": "client_secret_post",
  • "verify_peer": true,
  • "auto_import": true,
  • "contact_template": {
    },
  • "email_bind_attribute": "email",
  • "fullname_bind_attribute": "name",
  • "redirect_url": "https://my_custom_domain.com",
  • "authentication_conditions": {
    },
  • "groups_mapping": {
    },
  • "roles_mapping": {
    }
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

partially update openid provider configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
is_active
boolean

Indicates whether the provider is active or not

is_forced
boolean

Indicates whether the provider is forced or not

base_url
string or null

Base URL of the provider

authorization_endpoint
string or null

Authorization endpoint of the provider

token_endpoint
string or null

Token endpoint of the provider

introspection_token_endpoint
string or null

Introspection token endpoint of the provider

userinfo_endpoint
string or null

Userinfo endpoint of the provider

endsession_endpoint
string or null

Endsession endpoint of the provider

connection_scopes
Array of strings

List of scopes to request

login_claim
string or null

Claim used to login

client_id
string or null

Client ID

client_secret
string or null

Client secret

authentication_type
string or null
Enum: "client_secret_post" "client_secret_basic"

Authentication type

verify_peer
boolean

Verify peer

auto_import
boolean

Auto import user from external provider

object or null
email_bind_attribute
string or null

Email bind attribute

fullname_bind_attribute
string or null

Fullname bind attribute

redirect_url
string or null

custom redirect url

object
object
object

Responses

Request samples

Content type
application/json
{
  • "is_active": true,
  • "is_forced": false,
  • "base_url": "https://localhost:8080",
  • "authorization_endpoint": "/authorize",
  • "token_endpoint": "/token",
  • "introspection_token_endpoint": "/introspect",
  • "userinfo_endpoint": "/userinfo",
  • "endsession_endpoint": "/logout",
  • "connection_scopes": [
    ],
  • "login_claim": "sub",
  • "client_id": "client_id",
  • "client_secret": "client_secret",
  • "authentication_type": "client_secret_post",
  • "verify_peer": true,
  • "auto_import": true,
  • "contact_template": {
    },
  • "email_bind_attribute": "email",
  • "fullname_bind_attribute": "name",
  • "redirect_url": "https://my_custom_domain.com",
  • "authentication_conditions": {
    },
  • "groups_mapping": {
    },
  • "roles_mapping": {
    }
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Get SAML provider configuration

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "is_active": true,
  • "is_forced": false,
  • "remote_login_url": "https://idp/saml",
  • "entity_id_url": "https://idp/saml",
  • "certificate": "string",
  • "user_id_attribute": "string",
  • "logout_from": true,
  • "logout_from_url": "https://idp/saml",
  • "auto_import": true,
  • "contact_template": {
    },
  • "email_bind_attribute": "email",
  • "fullname_bind_attribute": "name",
  • "authentication_conditions": {
    },
  • "groups_mapping": {
    },
  • "roles_mapping": {
    }
}

Update SAML provider configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
is_active
required
boolean

Indicates whether the provider is active or not

is_forced
required
boolean

Indicates whether the provider is forced or not

remote_login_url
required
string

Indicates the remote login URL

entity_id_url
required
string

Indicates the issuer URL

certificate
required
string

IDP certificate

user_id_attribute
required
string
logout_from
required
boolean

Logout

logout_from_url
string or null

Indicates the logout URL

auto_import
boolean

Auto import user from external provider

required
object or null
email_bind_attribute
required
string or null

Email bind attribute

fullname_bind_attribute
required
string or null

Fullname bind attribute

object
object
object

Responses

Request samples

Content type
application/json
{
  • "is_active": true,
  • "is_forced": false,
  • "remote_login_url": "https://idp/saml",
  • "entity_id_url": "https://idp/saml",
  • "certificate": "string",
  • "user_id_attribute": "string",
  • "logout_from": true,
  • "logout_from_url": "https://idp/saml",
  • "auto_import": true,
  • "contact_template": {
    },
  • "email_bind_attribute": "email",
  • "fullname_bind_attribute": "name",
  • "authentication_conditions": {
    },
  • "groups_mapping": {
    },
  • "roles_mapping": {
    }
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

get web-sso provider configuration information

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "is_active": true,
  • "is_forced": false,
  • "trusted_client_addresses": [
    ],
  • "blacklist_client_addresses": [
    ],
  • "login_header_attribute": "HTTP_AUTH_USER",
  • "pattern_matching_login": "/@.*/",
  • "pattern_replace_login": "/@.*/"
}

update web-sso provider configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
is_active
required
boolean

Indicates whether the provider is active or not

is_forced
required
boolean

Indicates whether the provider is forced or not

trusted_client_addresses
required
Array of strings

List of trusted client addresses

blacklist_client_addresses
required
Array of strings

List of blacklisted client addresses

login_header_attribute
required
string or null

Header used to retrieve user's login

pattern_matching_login
required
string or null

Pattern to search for in the login header attribute name

pattern_replace_login
required
string or null

String that will replace the string defined in the Pattern match login (regex) field

Responses

Request samples

Content type
application/json
{
  • "is_active": true,
  • "is_forced": false,
  • "trusted_client_addresses": [
    ],
  • "blacklist_client_addresses": [
    ],
  • "login_header_attribute": "HTTP_AUTH_USER",
  • "pattern_matching_login": "/@.*/",
  • "pattern_replace_login": "/@.*/"
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Administration parameters

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "monitoring_default_downtime_duration": 3600,
  • "monitoring_default_refresh_interval": 15,
  • "monitoring_default_acknowledgement_persistent": true,
  • "monitoring_default_acknowledgement_sticky": true,
  • "monitoring_default_acknowledgement_notify": true,
  • "monitoring_default_acknowledgement_force_active_checks": true,
  • "monitoring_default_acknowledgement_with_services": true,
  • "monitoring_default_downtime_fixed": true,
  • "monitoring_default_downtime_with_services": true
}

Create vault configuration

Authorizations:
TokenCookie
path Parameters
vault_id
required
integer <int64>
Example: 1

ID of vault provider

Request Body schema: application/json
required
name
required
string

Vault configuration name

address
required
string

Vault URL or IP

port
required
integer

Vault Port

root_path
required
string

Vault root storage path

role_id
required
string

Vault role id

secret_id
required
string

Vault secret id

Responses

Request samples

Content type
application/json
{
  • "name": "centreon_vault",
  • "address": "127.0.0.1",
  • "port": 8200,
  • "root_path": "centreon",
  • "role_id": "string",
  • "secret_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List vault configurations by provider

Authorizations:
TokenCookie
path Parameters
vault_id
required
integer <int64>
Example: 1

ID of vault provider

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Update vault configuration

Authorizations:
TokenCookie
path Parameters
vault_id
required
integer <int64>
Example: 1

ID of vault provider

vault_configuration_id
required
integer <int64>
Example: 1

ID of existing vault configuration

Request Body schema: application/json
required
address
required
string

Vault URL or IP

port
required
integer

Vault Port

role_id
required
string

Vault role id

secret_id
required
string

Vault secret id

Responses

Request samples

Content type
application/json
{
  • "address": "127.0.0.1",
  • "port": 8200,
  • "role_id": "string",
  • "secret_id": "string"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete vault configuration

Authorizations:
TokenCookie
path Parameters
vault_id
required
integer <int64>
Example: 1

ID of vault provider

vault_configuration_id
required
integer <int64>
Example: 1

ID of existing vault configuration

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List one vault configuration by its id

Authorizations:
TokenCookie
path Parameters
vault_id
required
integer <int64>
Example: 1

ID of vault provider

vault_configuration_id
required
integer <int64>
Example: 1

ID of existing vault configuration

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "centreon_vault",
  • "vault_id": 1,
  • "address": "127.0.0.1",
  • "port": 8200,
  • "root_path": "centreon",
  • "role_id": "string"
}

Authentication

Login and logout endpoints to retrieve authentication token

Login

Entry point to retrieve an authentication token.

Request Body schema: application/json
required

Authentication schema

object

Responses

Request samples

Content type
application/json
{
  • "security": {
    }
}

Response samples

Content type
application/json
{
  • "contact": {
    },
  • "security": {
    }
}

Logout

Entry point to delete an existing authentication token.

Authorizations:
Token

Responses

Response samples

Content type
application/json
{
  • "message": "Successful logout"
}

Update user password

Authorizations:
TokenCookie
path Parameters
alias
required
string

Alias of the user

Request Body schema: application/json
required
old_password
string

Old user password

new_password
string

New user password

Responses

Request samples

Content type
application/json
{
  • "old_password": "Centreon!2021",
  • "new_password": "Centreon!2022"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Providers Configurations

Endpoint to list active existing providers configuration

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Authentication to provider

Authorizations:
TokenCookie
path Parameters
provider_configuration_name
required
string
Example: local
Request Body schema: application/json
required
login
string
password
string

Responses

Request samples

Content type
application/json
{
  • "login": "admin",
  • "password": "centreon"
}

Response samples

Content type
application/json
{
  • "redirect_uri": "/centreon/main.php?p=50113&o=ldap"
}

Logout Session

Entry point to delete an existing session token.

Authorizations:
Token

Responses

Response samples

Content type
application/json
{
  • "message": "Successful logout"
}

Command

Find all commands

Return all command configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • type
  • is_locked
Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a command

Add a command configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
required
string

Command name

type
required
integer

Indicates the type of command

  • 1 - NOTIFICATION
  • 2 - CHECK
  • 3 - MISCELLANEOUS
  • 4 - DISCOVERY
command_line
required
string

Command line to be executed by the poller

is_shell
boolean

Is required if your command requires shell features like pipes, redirections, globbing etc.

If you are using the monitoring engine this option cannot be disabled.

Note that commands that require shell features are slowing down the poller server.

argument_example
string or null

Example of command argument values

Array of objects

descriptions of arguments used in the command line

Array of objects

descriptions of macros used in the command line

connector_id
integer or null

A connector is run in the background and executes specific commands without the need to execute a binary.

graph_template_id
integer or null

Graph template for the command

Responses

Request samples

Content type
application/json
{
  • "name": "check_host_alive",
  • "type": 2,
  • "command_line": "string",
  • "is_shell": true,
  • "argument_example": "!80!90",
  • "arguments": [
    ],
  • "macros": [
    ],
  • "connector_id": 0,
  • "graph_template_id": 0
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "check_host_alive",
  • "type": 2,
  • "command_line": "string",
  • "is_shell": true,
  • "is_locked": false,
  • "is_activated": true,
  • "argument_example": "!80!90",
  • "arguments": [
    ],
  • "macros": [
    ],
  • "connector": {
    },
  • "graph_template": {
    }
}

Downtime

List all downtimes

List all downtimes

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • host.id
  • host.name
  • host.alias
  • host.address
  • host.display_name
  • host.state
  • poller.id
  • contact.id
  • contact.name
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Display one downtime

Display one downtime.

Authorizations:
TokenCookie
path Parameters
downtime_id
required
integer <int64>
Example: 329

ID of the downtime

Responses

Response samples

Content type
application/json
{
  • "id": 329,
  • "author_id": 3,
  • "author_name": "admin",
  • "host_id": 12,
  • "comment": "Downtime set by admin",
  • "duration": 7200,
  • "entry_time": "2019-08-24T14:15:22Z",
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z",
  • "deletion_time": null,
  • "actual_start_time": "2019-08-24T14:15:22Z",
  • "actual_end_time": null,
  • "is_started": true,
  • "is_cancelled": false,
  • "is_fixed": true,
  • "service_id": 5
}

Cancel a downtime

Cancel a downtime.

Authorizations:
TokenCookie
path Parameters
downtime_id
required
integer <int64>
Example: 329

ID of the downtime

Responses

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all hosts downtimes

List all downtimes of hosts

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • host.id
  • host.name
  • host.alias
  • host.address
  • host.display_name
  • host.state
  • poller.id
  • contact.id
  • contact.name
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an downtime on multiple hosts

Authorizations:
TokenCookie
Request Body schema: application/json
required
Array
start_time
string <date-time>

Scheduled start date of the downtime (ISO8601)

end_time
string <date-time>

Scheduled end date of the downtime (ISO8601)

is_fixed
boolean

Indicates whether the downtime is fixed

duration
integer

Downtime duration in seconds

comment
string

Comment of the downtime

with_services
boolean

Indicates whether we should add the downtime on the host-related services

resource_id
integer <int64>

ID of the resource

parent_resource_id
integer or null <int64>

ID of the parent resource (eg: host id)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all services downtimes

List all downtimes of services

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • host.id
  • host.name
  • host.alias
  • host.address
  • host.display_name
  • host.state
  • poller.id
  • contact.id
  • contact.name
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an downtime on multiple services

Authorizations:
TokenCookie
Request Body schema: application/json
required
Array
start_time
string <date-time>

Scheduled start date of the downtime (ISO8601)

end_time
string <date-time>

Scheduled end date of the downtime (ISO8601)

is_fixed
boolean

Indicates whether the downtime is fixed

duration
integer

Downtime duration in seconds

comment
string

Comment of the downtime

resource_id
integer <int64>

ID of the resource

parent_resource_id
integer or null <int64>

ID of the parent resource (eg: host id)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all downtimes of a host

List all downtimes of a host.

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • contact.id
  • contact.name
Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
show_service
boolean
Default: false
Example: show_service=true

Allows to display services belonging to items

search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a downtime on a host

Add a downtime on a host.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Request Body schema: application/json
required
start_time
string <date-time>

Scheduled start date of the downtime (ISO8601)

end_time
string <date-time>

Scheduled end date of the downtime (ISO8601)

is_fixed
boolean

Indicates whether the downtime is fixed

duration
integer

Downtime duration in seconds

comment
string

Comment of the downtime

with_services
boolean

Indicates whether we should add the downtime on the host-related services

Responses

Request samples

Content type
application/json
{
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "comment": "Downtime set by admin",
  • "with_services": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all downtimes of a service

List all downtimes of a service.

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • contact.id
  • contact.name
Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a downtime on a service

Add a downtime on a service.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Request Body schema: application/json
required
start_time
string <date-time>

Scheduled start date of the downtime (ISO8601)

end_time
string <date-time>

Scheduled end date of the downtime (ISO8601)

is_fixed
boolean

Indicates whether the downtime is fixed

duration
integer

Downtime duration in seconds

comment
string

Comment of the downtime

Responses

Request samples

Content type
application/json
{
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "comment": "Downtime set by admin"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all downtimes of a metaservice

List all downtimes of a service.

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • contact.id
  • contact.name
Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a downtime on a metaservice

Add a downtime on a metaservice.

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Request Body schema: application/json
required
start_time
string <date-time>

Scheduled start date of the downtime (ISO8601)

end_time
string <date-time>

Scheduled end date of the downtime (ISO8601)

is_fixed
boolean

Indicates whether the downtime is fixed

duration
integer

Downtime duration in seconds

comment
string

Comment of the downtime

Responses

Request samples

Content type
application/json
{
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "comment": "Downtime set by admin"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Set downtime for multiple resources

Authorizations:
TokenCookie
Request Body schema: application/json
required
object (Downtime.Resource)
Array of objects (Monitoring.Resource.Action)

Responses

Request samples

Content type
application/json
{
  • "downtime": {
    },
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Gorgone

Gorgone poller responses token

Authorizations:
TokenCookie
path Parameters
poller_id
required
integer <int64>
Example: 5

ID of the poller

token
required
string

Gorgone Token

Responses

Response samples

Content type
application/json
{ }

Gorgone command on specific poller

Authorizations:
TokenCookie
path Parameters
poller_id
required
integer <int64>
Example: 5

ID of the poller

command_name
required
string

Gorgone Command

Responses

Response samples

Content type
application/json
{
  • "token": "string"
}

Host

Delete a host configuration

Delete a host configuration

Authorizations:
TokenCookie
path Parameters
host_id
required
integer >= 1
Example: 1

Host ID

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Partially update a host configuration

Partially update a host configuration.

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer >= 1
Example: 1

Host ID

Request Body schema: application/json
required
monitoring_server_id
integer

ID of the host's monitoring server

name
string

Host name

address
string

IP or domain of the host

alias
string

Host alias

snmp_community
string or null

Community of the SNMP agent

snmp_version
string or null
Enum: 1 "2c" 3

Version of the SNMP agent.

The value can be 1, 2c or 3

geo_coords
string or null

Geographic coordinates of the host

timezone_id
integer or null

Timezone ID

severity_id
integer or null

Severity ID

check_command_id
integer or null

Check command ID. Must be of type 'Check'.

check_command_args
Array of strings

Check command arguments

check_timeperiod_id
integer or null

Check command timeperiod ID

max_check_attempts
integer or null

Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state

normal_check_interval
integer or null

Define the number of 'time units' between regularly scheduled checks of the host.

With the default time unit of 60s, this number will mean multiples of 1 minute.

retry_check_interval
integer or null

Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected.

With the default time unit of 60s, this number will mean multiples of 1 minute.

Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate.

active_check_enabled
integer

Indicates whether active checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
passive_check_enabled
integer

Indicates whether passive checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_enabled
integer

Specify whether notifications for this host are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_options
integer or null

Define the states of the host for which notifications should be sent out.

The value is the sum of all the values of the selected options.

  • 0 - NONE
  • 1 - DOWN
  • 2 - UNREACHABLE
  • 4 - RECOVERY
  • 8 - FLAPPING
  • 16 - DOWNTIME_SCHEDULED
  • NULL - (inheritance of its parent's value. If there is no parent, the values used will be: DOWN, UNREACHABLE, RECOVERY, FLAPPING and DOWNTIME_SCHEDULED)

example: A value equal to 5 corresponds to the selected options DOWN and RECOVERY

notification_interval
integer or null

Define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable.

With the default time unit of 60s, this number will mean multiples of 1 minute.

A value of 0 disables re-notifications of contacts about alerts for this host - only one alert notification will be sent out.

notification_timeperiod_id
integer or null

Notification timeperiod ID

add_inherited_contact_group
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contact definition will not override the definitions on template levels, it will be appended instead.

add_inherited_contact
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead.

first_notification_delay
integer or null

Define the number of "time units" to wait before sending out the first alert notification when this host enters a non-UP state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

recovery_notification_delay
integer or null

Define the number of "time units" to wait before sending out the recovery notification when this host enters an UP state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

acknowledgement_timeout
integer or null

Specify a duration of acknowledgement for this host.

freshness_checked
integer

Indicates whether freshness is checked or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
freshness_threshold
integer or null

Specify the freshness threshold (in seconds) for this host.

flap_detection_enabled
integer

Indicates whether the flap detection is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
low_flap_threshold
integer or null

Specify the low state change threshold used in flap detection for this host

high_flap_threshold
integer or null

Specify the high state change threshold used in flap detection for this host

event_handler_enabled
integer

Indicates whether the event handler is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
event_handler_command_id
integer or null

Event handler command ID

event_handler_command_args
Array of strings

Event handler command arguments

note_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more information about the host.

note
string or null <= 65535 characters

Define an optional note.

action_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more actions to be performed on the host.

icon_id
integer or null

Define the ID of the image that should be associated with this host

icon_alternative
string or null <= 200 characters

Define an optional string that is used as alternative description for the icon

comment
string or null

Host comments

is_activated
boolean

Indicates whether the host is activated or not

categories
Array of integers

Define the host category IDs that should be associated with this host

groups
Array of integers

Define the host group IDs that should be associated with this host

templates
Array of integers

Define the parent host template IDs that should be associated with this host. The order of the IDs determines the inheritance priority order.

Array of objects

Host macros defined for the host (directly or through a template or command inheritance)

If multiple macros are defined with the same name, only the last one will be saved.

Responses

Request samples

Content type
application/json
{
  • "monitoring_server_id": 0,
  • "name": "generic-active-host",
  • "address": "127.0.0.1",
  • "alias": "generic-active-host",
  • "snmp_community": "string",
  • "snmp_version": "2c",
  • "geo_coords": "48.10,12.5",
  • "timezone_id": 1,
  • "severity_id": 1,
  • "check_command_id": 1,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": 1,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 0,
  • "passive_check_enabled": 0,
  • "notification_enabled": 0,
  • "notification_options": 5,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "add_inherited_contact_group": true,
  • "add_inherited_contact": true,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 0,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 0,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 0,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "note_url": "string",
  • "note": "string",
  • "action_url": "string",
  • "icon_id": 1,
  • "icon_alternative": "string",
  • "comment": "string",
  • "is_activated": true,
  • "categories": [
    ],
  • "groups": [
    ],
  • "templates": [
    ],
  • "macros": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Find all host configurations

Return all host configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • address
  • poller.id
  • poller.name
  • category.id
  • category.name
  • severity.id
  • severity.name
  • group.id
  • group.name
  • is_activated

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Create a host configuration

Create a host configuration

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
Request Body schema: application/json
required
monitoring_server_id
required
integer

ID of the host's monitoring server

name
required
string

Host template name

address
required
string

IP or domain of the host

alias
string

Host template alias

snmp_community
string or null

Community of the SNMP agent

snmp_version
string or null
Enum: 1 "2c" 3

Version of the SNMP agent.

The value can be 1, 2c or 3

geo_coords
string or null

Geographic coordinates of the host

timezone_id
integer or null

Timezone ID

severity_id
integer or null

Severity ID

check_command_id
integer or null

Check command ID. Must be of type 'Check'.

check_command_args
Array of strings

Check command arguments

check_timeperiod_id
integer or null

Check command timeperiod ID

max_check_attempts
integer or null

Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state

normal_check_interval
integer or null

Define the number of 'time units' between regularly scheduled checks of the host.

With the default time unit of 60s, this number will mean multiples of 1 minute.

retry_check_interval
integer or null

Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected.

With the default time unit of 60s, this number will mean multiples of 1 minute.

Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate.

active_check_enabled
integer

Indicates whether active checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
passive_check_enabled
integer

Indicates whether passive checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_enabled
integer

Specify whether notifications for this host are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_options
integer or null

Define the states of the host for which notifications should be sent out.

The value is the sum of all the values of the selected options.

  • 0 - NONE
  • 1 - DOWN
  • 2 - UNREACHABLE
  • 4 - RECOVERY
  • 8 - FLAPPING
  • 16 - DOWNTIME_SCHEDULED
  • NULL - (inheritance of its parent's value. If there is no parent, the values used will be: DOWN, UNREACHABLE, RECOVERY, FLAPPING and DOWNTIME_SCHEDULED)

example: A value equal to 5 corresponds to the selected options DOWN and RECOVERY

notification_interval
integer or null

Define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable.

With the default time unit of 60s, this number will mean multiples of 1 minute.

A value of 0 disables re-notifications of contacts about alerts for this host - only one alert notification will be sent out.

notification_timeperiod_id
integer or null

Notification timeperiod ID

add_inherited_contact_group
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contact definition will not override the definitions on template levels, it will be appended instead.

add_inherited_contact
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead.

first_notification_delay
integer or null

Define the number of "time units" to wait before sending out the first alert notification when this host enters a non-UP state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

recovery_notification_delay
integer or null

Define the number of "time units" to wait before sending out the recovery notification when this host enters an UP state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

acknowledgement_timeout
integer or null

Specify a duration of acknowledgement for this host.

freshness_checked
integer

Indicates whether freshness is checked or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
freshness_threshold
integer or null

Specify the freshness threshold (in seconds) for this host.

flap_detection_enabled
integer

Indicates whether the flap detection is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
low_flap_threshold
integer or null

Specify the low state change threshold used in flap detection for this host

high_flap_threshold
integer or null

Specify the high state change threshold used in flap detection for this host

event_handler_enabled
integer

Indicates whether the event handler is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
event_handler_command_id
integer or null

Event handler command ID

event_handler_command_args
Array of strings

Event handler command arguments

note_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more information about the host.

note
string or null <= 65535 characters

Define an optional note.

action_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more actions to be performed on the host.

icon_id
integer or null

Define the ID of the image that should be associated with this host

icon_alternative
string or null <= 200 characters

Define an optional string that is used as alternative description for the icon

comment
string or null

Host template comments

is_activated
boolean

Indicates whether the host template is activated or not

categories
Array of integers

Define the host category IDs that should be associated with this host

groups
Array of integers

Define the host group IDs that should be associated with this host

templates
Array of integers

Define the parent host template IDs that should be associated with this host. The order of the IDs determines the inheritance priority order.

Array of objects

Host macros defined for the host (directly or through a template or command inheritance)

If multiple macros are defined with the same name, only the last one will be saved.

Responses

Request samples

Content type
application/json
{
  • "monitoring_server_id": 0,
  • "name": "generic-active-host",
  • "address": "127.0.0.1",
  • "alias": "generic-active-host",
  • "snmp_community": "string",
  • "snmp_version": "2c",
  • "geo_coords": "48.10,12.5",
  • "timezone_id": 1,
  • "severity_id": 1,
  • "check_command_id": 1,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": 1,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 0,
  • "passive_check_enabled": 0,
  • "notification_enabled": 0,
  • "notification_options": 5,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "add_inherited_contact_group": true,
  • "add_inherited_contact": true,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 0,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 0,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 0,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "note_url": "string",
  • "note": "string",
  • "action_url": "string",
  • "icon_id": 1,
  • "icon_alternative": "string",
  • "comment": "string",
  • "is_activated": true,
  • "categories": [
    ],
  • "groups": [
    ],
  • "templates": [
    ],
  • "macros": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "monitoring_server_id": 1,
  • "name": "generic-active-host",
  • "address": "127.0.0.1",
  • "alias": "generic-active-host",
  • "snmp_community": "string",
  • "snmp_version": "2c",
  • "geo_coords": "48.10,12.5",
  • "timezone_id": 1,
  • "severity_id": 1,
  • "check_command_id": 1,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": 1,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 0,
  • "passive_check_enabled": 0,
  • "notification_enabled": 0,
  • "notification_options": 5,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "add_inherited_contact_group": true,
  • "add_inherited_contact": true,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 0,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 0,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 0,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "note_url": "string",
  • "note": "string",
  • "action_url": "string",
  • "icon_id": 1,
  • "icon_alternative": "string",
  • "comment": "string",
  • "is_activated": true,
  • "categories": [
    ],
  • "groups": [
    ],
  • "templates": [
    ],
  • "macros": [
    ]
}

List all hosts

List all the hosts in real-time monitoring.

The available parameters to search / sort_by are:

  • host.id
  • host.name
  • host.alias
  • host.address
  • host.state
  • poller.id
  • service.display_name
  • host_group.id
  • host.is_acknowledged
  • host.downtime
  • host.criticality
Authorizations:
TokenCookie
query Parameters
show_service
boolean
Default: false
Example: show_service=true

Allows to display services belonging to items

search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Get a host

Return a single host with full details and some details about its services.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Responses

Response samples

Content type
application/json
{
  • "id": 12,
  • "alias": "Central",
  • "display_name": "Central",
  • "name": "Central",
  • "state": 0,
  • "services": [
    ],
  • "poller_id": 1,
  • "acknowledged": false,
  • "address_ip": "127.0.0.1",
  • "check_attempt": 1,
  • "checked": true,
  • "execution_time": 0.070906,
  • "icon_image": "ppm/operatingsystems-linux-snmp-linux-128.png",
  • "icon_image_alt": "",
  • "last_check": "2019-08-24T14:15:22Z",
  • "last_hard_state_change": "2019-08-24T14:15:22Z",
  • "last_state_change": "2019-08-24T14:15:22Z",
  • "last_time_down": "2019-08-24T14:15:22Z",
  • "last_time_unreachable": "2019-08-24T14:15:22Z",
  • "last_time_up": "2019-08-24T14:15:22Z",
  • "last_update": "2019-08-24T14:15:22Z",
  • "max_check_attempts": 3,
  • "output": "OK - 127.0.0.1 rta 0.100ms lost 0%\n",
  • "passive_checks": false,
  • "state_type": 0,
  • "timezone": ":Europe/Paris",
  • "scheduled_downtime_depth": 0,
  • "criticality": 10,
  • "active_checks": true,
  • "check_command": "base_host_alive",
  • "check_interval": 5,
  • "check_period": "24x7",
  • "check_type": 0,
  • "last_hard_state": "2019-08-24T14:15:22Z",
  • "last_notification": "2019-08-24T14:15:22Z",
  • "latency": 0.005,
  • "next_check": "2019-08-24T14:15:22Z",
  • "next_host_notification": 0,
  • "notification_interval": 30,
  • "notification_number": 3,
  • "notify": true,
  • "notify_on_down": true,
  • "notify_on_downtime": false,
  • "notify_on_flapping": false,
  • "notify_on_recovery": true,
  • "notify_on_unreachable": false,
  • "flapping": false,
  • "percent_state_change": 3.5,
  • "downtimes": [
    ],
  • "acknowledgement": {
    }
}

Host category

List host categories

List of host category configurations

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • is_activated
  • hostgroup.name
  • hostgroup.id
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Create a host category

Create a host category

This endpoint does NOT update the ACL rights with the new host category

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
string

Host category name

alias
string

Host category alias

is_activated
boolean

is active or not (enable/disable)

comment
string or null

some comment

Responses

Request samples

Content type
application/json
{
  • "name": "host-category",
  • "alias": "host-category",
  • "is_activated": true,
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Get a host category

Get a host category configuration

Authorizations:
TokenCookie
path Parameters
host_category_id
required
integer <int64>
Example: 1

ID of existing host category configuration

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "host-category",
  • "alias": "host-category",
  • "is_activated": true,
  • "comment": "string"
}

Update a host category

Update a host category

Authorizations:
TokenCookie
path Parameters
host_category_id
required
integer <int64>
Example: 1

ID of existing host category configuration

Request Body schema: application/json
required
name
string

Host category name

alias
string

Host category alias

is_activated
boolean

is active or not (enable/disable)

comment
string or null

some comment

Responses

Request samples

Content type
application/json
{
  • "name": "host-category",
  • "alias": "host-category",
  • "is_activated": true,
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete a host category

Delete a host category configuration

Authorizations:
TokenCookie
path Parameters
host_category_id
required
integer <int64>
Example: 1

ID of existing host category configuration

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Delete a service category

Delete a service category configuration

Authorizations:
TokenCookie
path Parameters
service_category_id
required
integer <int64>
Example: 1

ID of existing service category configuration

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all real-time host categories

List of all host categories in real-time context

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Host group

List all host groups

Return all host group configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • is_activated
  • hostcategory.id
  • hostcategory.name

Changes in 23.04 :

  • icon was renamed icon_id and is no longer an object but the image ID
  • icon_map was renamed icon_map_id and is no longer an object but the image ID

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a host group

Add a new host group configuration.

Mandatory body properties are:

  • name

Since Centreon web 23.04

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
string <= 200 characters

Host group name

alias
string or null <= 200 characters

Host group alias

notes
string or null <= 255 characters

Define an optional string of notes pertaining to the host group

notes_url
string or null <= 255 characters

Define an optional URL that can be used to provide more information about the host group

action_url
string or null <= 255 characters

Define an optional URL that can be used to provide more actions to be performed on the host group. You will see the link to the action URL in the host group details

icon_id
integer or null

Define the image ID that should be associated with this host group

icon_map_id
integer or null

Define an image ID that should be associated with this host group in the statusmap CGI in monitoring engine

geo_coords
string or null <= 32 characters

Geographical coordinates use by Centreon Map module to position element on map

rrd
integer or null [ 1 .. 2147483648 ]

RRD retention duration in days of all the services that are in this host group

comment
string or null <= 65535 characters

Comments on this host group

is_activated
boolean

Indicates whether the host group is activated or not

Responses

Request samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "notes": "my notes",
  • "notes_url": "notes url",
  • "action_url": "action url",
  • "icon_id": 1,
  • "icon_map_id": 1,
  • "geo_coords": "48.51,2.20",
  • "rrd": 2,
  • "comment": "string",
  • "is_activated": true
}

Response samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "notes": "my notes",
  • "notes_url": "notes url",
  • "action_url": "action url",
  • "icon_id": 1,
  • "icon_map_id": 1,
  • "geo_coords": "48.51,2.20",
  • "rrd": 2,
  • "comment": "string",
  • "is_activated": true,
  • "id": 1
}

Get a host group

internal

Since Centreon web 23.10

Get host group.

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
path Parameters
hostgroup_id
required
integer <int64>
Example: 5

ID of the host group

Responses

Response samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "notes": "my notes",
  • "notes_url": "notes url",
  • "action_url": "action url",
  • "icon_id": 1,
  • "icon_map_id": 1,
  • "geo_coords": "48.51,2.20",
  • "rrd": 2,
  • "comment": "string",
  • "is_activated": true,
  • "id": 1
}

Delete a host group

internal

Since Centreon web 23.04

Delete host group.

Authorizations:
TokenCookie
path Parameters
hostgroup_id
required
integer <int64>
Example: 5

ID of the host group

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Update a host group

internal

Since Centreon web 23.10

Update host group.

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
path Parameters
hostgroup_id
required
integer <int64>
Example: 5

ID of the host group

Request Body schema: application/json
required
name
string <= 200 characters

Host group name

alias
string or null <= 200 characters

Host group alias

notes
string or null <= 255 characters

Define an optional string of notes pertaining to the host group

notes_url
string or null <= 255 characters

Define an optional URL that can be used to provide more information about the host group

action_url
string or null <= 255 characters

Define an optional URL that can be used to provide more actions to be performed on the host group. You will see the link to the action URL in the host group details

icon_id
integer or null

Define the image ID that should be associated with this host group

icon_map_id
integer or null

Define an image ID that should be associated with this host group in the statusmap CGI in monitoring engine

geo_coords
string or null <= 32 characters

Geographical coordinates use by Centreon Map module to position element on map

rrd
integer or null [ 1 .. 2147483648 ]

RRD retention duration in days of all the services that are in this host group

comment
string or null <= 65535 characters

Comments on this host group

is_activated
boolean

Indicates whether the host group is activated or not

Responses

Request samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "notes": "my notes",
  • "notes_url": "notes url",
  • "action_url": "action url",
  • "icon_id": 1,
  • "icon_map_id": 1,
  • "geo_coords": "48.51,2.20",
  • "rrd": 2,
  • "comment": "string",
  • "is_activated": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all host groups by host id

List all the host groups in real-time monitoring by host id

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List all host groups

List all the host groups in real-time monitoring.

The available parameters to search / sort_by are:

  • id
  • name
  • host.id
  • host.name
  • host.alias
  • host.address
  • host.display_name
  • host.state
  • poller.id
  • service.display_name
  • host_group.id
Authorizations:
TokenCookie
query Parameters
show_host
boolean
Default: false
Example: show_host=true

Allows to display hosts belonging to items

show_service
boolean
Default: false
Example: show_service=true

Allows to display services belonging to items

search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Meta service

List all meta services configurations

List all meta services configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • is_activate
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Get a meta service

Get a meta service configuration by its id

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Responses

Response samples

Content type
application/json
{
  • "id": 2,
  • "name": "TOTAL_FIREWALL_CONNECTIONS",
  • "output": "Number of connections: %d",
  • "calulation_type": "average",
  • "data_source_type": "gauge",
  • "meta_select_mode": 2,
  • "regexp_string": "%service_name%",
  • "metric": "used",
  • "warning": "80",
  • "critical": "90",
  • "is_activated": true
}

List all meta service metrics

List all meta services metrics from realtime.

The available parameters to search / sort_by are:

  • id
  • name
  • service_description
  • host_name
Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List all acknowledgements of a metaservice

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List all downtimes of a metaservice

List all downtimes of a service.

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • contact.id
  • contact.name
Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Check metaservice

Schedule immediate check on chosen metaservice

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Request Body schema: application/json
required
is_forced
boolean

Indicates whether the check is forced (do not take into account the check timeperiod)

Responses

Request samples

Content type
application/json
{
  • "is_forced": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Submit a result to a single metaservice

Submit a result (check status, output and perfdata) to a single metaservice

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Request Body schema: application/json
required
status
required
string
Enum: 0 1 2 3

Service status code that can be submitted

  • 0 - OK
  • 1 - WARNING
  • 2 - CRITICAL
  • 3 - UNKNOWN
output
string or null

Output result of the check sent

performance_data
string or null

Performance data result of the check sent

Responses

Request samples

Content type
application/json
{
  • "status": 2,
  • "output": "CRITICAL: Memory exceeded ",
  • "performance_data": "'used'=453849088B;;;0;1927262208"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Host severity

List all host severities

List of all host severity configurations

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • level
  • is_activated

Changes in 23.04 :

  • icon was renamed icon_id and is no longer an object but the image ID
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Create a host severity

Create a host severity

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
string
alias
string
level
integer
icon_id
integer

Responses

Request samples

Content type
application/json
{
  • "name": "host-severity-name",
  • "alias": "host-severity-alias",
  • "level": 2,
  • "icon_id": 1
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete a host severity

Delete a host severity configuration

Authorizations:
TokenCookie
path Parameters
host_severity_id
required
integer <int64>
Example: 1

ID of existing host severity configuration

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Get a host severity

Get a host severity configuration

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "host-severity",
  • "alias": "host-severity",
  • "level": 2,
  • "icon_id": 1,
  • "comment": "string",
  • "is_activated": true
}

Update a host severity

Update a host severity

Authorizations:
TokenCookie
path Parameters
host_severity_id
required
integer <int64>
Example: 1

ID of existing host severity configuration

Request Body schema: application/json
required
name
string

Host severity name

alias
string

Host severity alias

level
integer

Host severity priority

icon_id
integer

Define the image ID associated with this severity

comment
string or null

Host severity comment

is_activated
boolean

Indicates whether this host severity is enabled or not

Responses

Request samples

Content type
application/json
{
  • "name": "host-severity",
  • "alias": "host-severity",
  • "level": 2,
  • "icon_id": 1,
  • "comment": "string",
  • "is_activated": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Host template

Find all host template configurations

Return all host template configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • is_locked

Changes in 23.10 :

  • check_interval was renamed normal_check_interval:
  • active_checks_status was renamed active_check_enabled
  • passive_checks_status was renamed passive_check_enabled
  • notifications_status was renamed notification_enabled
  • url_notes was renamed note_url
  • note was renamed note
  • icon was renamed icon_id and is no longer an object but the image ID

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Create a host template configuration

Create a host template configuration

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
required
string

Host template name

alias
required
string

Host template alias

snmp_community
string or null

Community of the SNMP agent

snmp_version
string or null
Enum: 1 "2c" 3

Version of the SNMP agent.

The value can be 1, 2c or 3

timezone_id
integer or null

Timezone ID

severity_id
integer or null

Severity ID

check_command_id
integer or null

Check command ID. Must be of type 'Check'.

check_command_args
Array of strings

Check command arguments

check_timeperiod_id
integer or null

Check command timeperiod ID

max_check_attempts
integer or null

Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state

normal_check_interval
integer or null

Define the number of 'time units' between regularly scheduled checks of the host.

With the default time unit of 60s, this number will mean multiples of 1 minute.

retry_check_interval
integer or null

Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected.

With the default time unit of 60s, this number will mean multiples of 1 minute.

Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate.

active_check_enabled
integer

Indicates whether the active checks is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
passive_check_enabled
integer

Indicates whether passive checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_enabled
integer

Specify whether notifications for this host are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_options
integer or null

Define the states of the host for which notifications should be sent out.

The value is the sum of all the values of the selected options.

  • 0 - NONE
  • 1 - DOWN
  • 2 - UNREACHABLE
  • 4 - RECOVERY
  • 8 - FLAPPING
  • 16 - DOWNTIME_SCHEDULED
  • NULL - (inheritance of its parent's value. If there is no parent, the values used will be: DOWN, UNREACHABLE, RECOVERY, FLAPPING and DOWNTIME_SCHEDULED)

example: A value equal to 5 corresponds to the selected options DOWN and RECOVERY

notification_interval
integer or null

Define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable.

With the default time unit of 60s, this number will mean multiples of 1 minute.

A value of 0 disables re-notifications of contacts about problems for this host - only one problem notification will be sent out.

notification_timeperiod_id
integer or null

Notification timeperiod ID

add_inherited_contact_group
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contact definition will not override the definitions on template levels, it will be appended instead.

add_inherited_contact
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead.

first_notification_delay
integer or null

Define the number of "time units" to wait before sending out the first problem notification when this host enters a non-UP state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

recovery_notification_delay
integer or null

Define the number of "time units" to wait before sending out the recovery notification when this host enters an UP state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

acknowledgement_timeout
integer or null

Specify a duration of acknowledgement for this host.

freshness_checked
integer

Indicates whether freshness is checked or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
freshness_threshold
integer or null

Specify the freshness threshold (in seconds) for this host.

flap_detection_enabled
integer

Indicates whether the flap detection is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
low_flap_threshold
integer or null

Specify the low state change threshold used in flap detection for this host

high_flap_threshold
integer or null

Specify the high state change threshold used in flap detection for this host

event_handler_enabled
integer

Indicates whether the event handler is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
event_handler_command_id
integer or null

Event handler command ID

event_handler_command_args
Array of strings

Event handler command arguments

note_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more information about the host.

note
string or null <= 65535 characters

Define an optional note.

action_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more actions to be performed on the host.

icon_id
integer or null

Define the image ID that should be associated with this host template

icon_alternative
string or null <= 200 characters

Define an optional string that is used as alternative description for the icon

comment
string or null

Host template comments

categories
Array of integers

Define the host category IDs that should be associated with this host template

templates
Array of integers

Define the parent host templates IDs that should be associated with this host template. The order of the IDs determine the inheritance priority order.

Array of objects

Host macros defined for the host (directly or through a template or command inheritance)

If multiple macros are defined with the same name, only the last one will be saved.

Responses

Request samples

Content type
application/json
{
  • "name": "generic-active-host",
  • "alias": "generic-active-host",
  • "snmp_community": "string",
  • "snmp_version": "2c",
  • "timezone_id": 1,
  • "severity_id": 1,
  • "check_command_id": 1,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": 1,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 0,
  • "passive_check_enabled": 0,
  • "notification_enabled": 0,
  • "notification_options": 5,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "add_inherited_contact_group": true,
  • "add_inherited_contact": true,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 0,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 0,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 0,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "note_url": "string",
  • "note": "string",
  • "action_url": "string",
  • "icon_id": 1,
  • "icon_alternative": "string",
  • "comment": "string",
  • "categories": [
    ],
  • "templates": [
    ],
  • "macros": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "generic-active-host",
  • "alias": "generic-active-host",
  • "snmp_community": "string",
  • "snmp_version": "2c",
  • "timezone_id": 1,
  • "severity_id": 1,
  • "check_command_id": 1,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": 1,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 0,
  • "passive_check_enabled": 0,
  • "notification_enabled": 0,
  • "notification_options": 5,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "add_inherited_contact_group": true,
  • "add_inherited_contact": true,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 0,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 0,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 0,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "note_url": "string",
  • "note": "string",
  • "action_url": "string",
  • "icon_id": 1,
  • "icon_alternative": "string",
  • "comment": "string",
  • "is_locked": true,
  • "categories": [
    ],
  • "templates": [
    ],
  • "macros": [
    ]
}

Delete a host template configuration

Delete a host template configuration

Authorizations:
TokenCookie
path Parameters
host_template_id
required
integer >= 1
Example: 1

Host template ID

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Partially update a host template configuration

Partially update a host template configuration.

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
path Parameters
host_template_id
required
integer >= 1
Example: 1

Host template ID

Request Body schema: application/json
required
Array of objects

Host macros defined for the host (directly or through a template or command inheritance)

If multiple macros are defined with the same name, only the last one will be saved.

categories
Array of integers

Define the host category IDs that should be associated with this host template

In the case of non-admin users, only categories the user has access to will be accepted and their association to the host template created or deleted.

templates
Array of integers

Define the parent host templates IDs that should be associated with this host template. The order of the IDs determine the inheritance priority order.

name
string

Host template name

alias
string

Host template alias

snmp_community
string or null

Community of the SNMP agent

snmp_version
string or null
Enum: 1 "2c" 3

Version of the SNMP agent.

The value can be 1, 2c or 3

timezone_id
integer or null

Timezone ID

severity_id
integer or null

Severity ID

check_command_id
integer or null

Check command ID. Must be of type 'Check'.

check_command_args
Array of strings

Check command arguments

check_timeperiod_id
integer or null

Check command timeperiod ID

max_check_attempts
integer or null

Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state

normal_check_interval
integer or null

Define the number of 'time units' between regularly scheduled checks of the host.

With the default time unit of 60s, this number will mean multiples of 1 minute.

retry_check_interval
integer or null

Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected.

With the default time unit of 60s, this number will mean multiples of 1 minute.

Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate.

active_check_enabled
integer

Indicates whether the active checks is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
passive_check_enabled
integer

Indicates whether passive checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_enabled
integer

Specify whether notifications for this host are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_options
integer or null

Define the states of the host for which notifications should be sent out.

The value is the sum of all the values of the selected options.

  • 0 - NONE
  • 1 - DOWN
  • 2 - UNREACHABLE
  • 4 - RECOVERY
  • 8 - FLAPPING
  • 16 - DOWNTIME_SCHEDULED
  • NULL - (inheritance of its parent's value. If there is no parent, the values used will be: DOWN, UNREACHABLE, RECOVERY, FLAPPING and DOWNTIME_SCHEDULED)

example: A value equal to 5 corresponds to the selected options DOWN and RECOVERY

notification_interval
integer or null

Define the number of "time units" to wait before re-notifying a contact that this host is still down or unreachable.

With the default time unit of 60s, this number will mean multiples of 1 minute.

A value of 0 disables re-notifications of contacts about problems for this host - only one problem notification will be sent out.

notification_timeperiod_id
integer or null

Notification timeperiod ID

add_inherited_contact_group
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contact definition will not override the definitions on template levels, it will be appended instead.

add_inherited_contact
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead.

first_notification_delay
integer or null

Define the number of "time units" to wait before sending out the first problem notification when this host enters a non-UP state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

recovery_notification_delay
integer or null

Define the number of "time units" to wait before sending out the recovery notification when this host enters an UP state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

acknowledgement_timeout
integer or null

Specify a duration of acknowledgement for this host.

freshness_checked
integer

Indicates whether freshness is checked or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
freshness_threshold
integer or null

Specify the freshness threshold (in seconds) for this host.

flap_detection_enabled
integer

Indicates whether the flap detection is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
low_flap_threshold
integer or null

Specify the low state change threshold used in flap detection for this host

high_flap_threshold
integer or null

Specify the high state change threshold used in flap detection for this host

event_handler_enabled
integer

Indicates whether the event handler is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
event_handler_command_id
integer or null

Event handler command ID

event_handler_command_args
Array of strings

Event handler command arguments

note_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more information about the host.

note
string or null <= 65535 characters

Define an optional note.

action_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more actions to be performed on the host.

icon_id
integer or null

Define the image ID that should be associated with this host template

icon_alternative
string or null <= 200 characters

Define an optional string that is used as alternative description for the icon

comment
string or null

Host template comments

Responses

Request samples

Content type
application/json
{
  • "macros": [
    ],
  • "categories": [
    ],
  • "templates": [
    ],
  • "name": "generic-active-host",
  • "alias": "generic-active-host",
  • "snmp_community": "string",
  • "snmp_version": "2c",
  • "timezone_id": 1,
  • "severity_id": 1,
  • "check_command_id": 1,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": 1,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 0,
  • "passive_check_enabled": 0,
  • "notification_enabled": 0,
  • "notification_options": 5,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "add_inherited_contact_group": true,
  • "add_inherited_contact": true,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 0,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 0,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 0,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "note_url": "string",
  • "note": "string",
  • "action_url": "string",
  • "icon_id": 1,
  • "icon_alternative": "string",
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Media

Create a media

Create a media

Authorizations:
TokenCookie
Request Body schema: multipart/form-data
required
directory
required
string

Directory where the file will be created

data
required
string <binary>

File content

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "errors": [
    ]
}

Find all media configurations

Return all media configurations.

The available parameters to search / sort_by are:

  • id
  • filename
  • directory
Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Monitoring server

List all monitoring servers configurations

List all monitoring servers configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • is_localhost
  • address
  • is_activate
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Generate the configuration of the monitoring server

Generate and move the configuration files of the monitoring server

Authorizations:
TokenCookie
path Parameters
monitoring_server_id
required
integer <int64>
Example: 1

ID of the monitoring server (poller)

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Reload the configuration of the monitoring server

Reload the configuration files of the monitoring server

Authorizations:
TokenCookie
path Parameters
monitoring_server_id
required
integer <int64>
Example: 1

ID of the monitoring server (poller)

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Generate and reload the configuration of the monitoring server

Generate, move and reload the configuration files of the monitoring server

Authorizations:
TokenCookie
path Parameters
monitoring_server_id
required
integer <int64>
Example: 1

ID of the monitoring server (poller)

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Generate the configuration for all monitoring servers

Generate and move the configuration files for all monitoring servers.

The process will stop at the first error.

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Reload the configuration for all monitoring servers

Reload the configuration files for all monitoring servers.

The process will stop at the first error.

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Generate and reload the configuration for all monitoring servers

Generate, move and reload the configuration files for all monitoring servers.

The process will stop at the first error.

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all real time monitoring servers

List all monitoring servers configured and stored in real time.

The available parameters to search / sort_by are:

  • id
  • name
  • running
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Proxy

Display the default configuration of the Centreon proxy

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "url": "proxy.internal.company.org",
  • "port": 3128,
  • "user": "proxy-user",
  • "password": "proxy-pass"
}

Update the default configuration of the Centreon proxy

Authorizations:
TokenCookie
Request Body schema: application/json
required
url
required
string

URL of the proxy

port
required
integer [ 0 .. 65535 ]

Port of the proxy

user
required
string or null

Login used to connect to proxy

password
required
string or null

Password used to connect to proxy

Responses

Request samples

Content type
application/json
{
  • "url": "proxy.internal.company.org",
  • "port": 3128,
  • "user": "proxy-user",
  • "password": "proxy-pass"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Service

Delete a service

Delete a service configuration

Authorizations:
TokenCookie
path Parameters
service_id
required
integer >= 1
Example: 1

Service ID

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Partial update of a service

Partial update of a service configuration

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
path Parameters
service_id
required
integer >= 1
Example: 1

Service ID

Request Body schema: application/json
required
name
string

Service name.

host_id
integer

ID of the host linked to this service.

geo_coords
string or null

Geographic coordinates of the service

comment
string or null

Service comment.

service_template_id
integer or null >= 1

Template ID of the service template.

check_command_id
integer or null >= 1

Check command ID.

check_command_args
Array of strings
check_timeperiod_id
integer or null >= 1

Time period ID of the check command.

max_check_attempts
integer or null

Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state.

normal_check_interval
integer or null

Define the number of 'time units' between regularly scheduled checks of the service.

With the default time unit of 60s, this number will mean multiples of 1 minute.

retry_check_interval
integer or null

Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected.

With the default time unit of 60s, this number will mean multiples of 1 minute.

Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate.

active_check_enabled
integer

Indicates whether active checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
passive_check_enabled
integer

Indicates whether passive checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
volatility_enabled
integer

Indicates whether the service is "volatile" or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_enabled
integer

Specify whether notifications are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
is_contact_additive_inheritance
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead.

is_contact_group_additive_inheritance
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contact definition will not override the definitions on template levels, it will be appended instead.

notification_interval
integer or null

Define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable.

With the default time unit of 60s, this number will mean multiples of 1 minute.

A value of 0 disables re-notifications of contacts about problems for this service - only one problem notification will be sent out.

notification_timeperiod_id
integer or null >= 1

Notification timeperiod ID.

notification_type
integer

Define the states of the service for which notifications should be sent out.

The value is the sum of all the values of the selected options.

  • 0 - NONE
  • 1 - WARNING
  • 2 - UNKNOWN
  • 4 - CRITICAL
  • 8 - RECOVERY
  • 16 - FLAPPING
  • 32 - DOWNTIME_SCHEDULED
  • NULL - (inheritance of its parent's value. If there is no parent, the value will be assumed to be: WARNING|UNKNOWN|CRITICAL|RECOVERY|FLAPPING|DOWNTIME_SCHEDULED)

example: A value equal to 5 corresponds to the selected options WARNING and CRITICAL

first_notification_delay
integer or null

Define the number of "time units" to wait before sending out the first problem notification when this service enters a non-OK state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

recovery_notification_delay
integer or null

Define the number of "time units" to wait before sending out the recovery notification when this service enters an OK state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

acknowledgement_timeout
integer or null

Specify a duration of acknowledgement for this service.

freshness_checked
integer

Indicates whether freshness is checked or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
freshness_threshold
integer or null

Specify the freshness threshold (in seconds) for this service.

flap_detection_enabled
integer

Indicates whether the flap detection is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
low_flap_threshold
integer or null

Specify the low state change threshold used in flap detection for this service.

high_flap_threshold
integer or null

Specify the high state change threshold used in flap detection for this service.

event_handler_enabled
integer

Indicates whether the event handler is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
event_handler_command_id
integer or null >= 1

Event handler command ID.

event_handler_command_args
Array of strings
graph_template_id
integer or null >= 1

ID of the default graph template that will be used for this service.

note
string or null <= 65535 characters

Define an optional note.

note_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more information about the service.

action_url
string or null <= 65535 characters

Define an optional URL that can be used to specify actions to be performed on the service.

icon_id
integer or null >= 1

Define the image ID that should be associated with this service.

icon_alternative
string or null <= 200 characters

Define an optional string that is used as an alternative description for the icon.

severity_id
integer or null >= 1

Severity ID.

is_activated
boolean

Indicates whether the service is activated or not

service_categories
Array of integers
service_groups
Array of integers
Array of objects (macro)

Macros defined for the service (directly or through a template or command inheritance)

If multiple macros are defined with the same name, only the last one will be saved.

Responses

Request samples

Content type
application/json
{
  • "name": "generic-service",
  • "host_id": 1,
  • "geo_coords": "48.10,12.5",
  • "comment": "string",
  • "service_template_id": null,
  • "check_command_id": null,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": null,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 2,
  • "passive_check_enabled": 2,
  • "volatility_enabled": 2,
  • "notification_enabled": 2,
  • "is_contact_additive_inheritance": true,
  • "is_contact_group_additive_inheritance": true,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "notification_type": 5,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 2,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 2,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 2,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "graph_template_id": null,
  • "note": "string",
  • "note_url": "string",
  • "action_url": "string",
  • "icon_id": null,
  • "icon_alternative": "string",
  • "severity_id": 1,
  • "is_activated": true,
  • "service_categories": [
    ],
  • "service_groups": [
    ],
  • "macros": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Add a service

Add a service configuration

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
required
string

Service name.

host_id
required
integer

ID of the host linked to this service.

geo_coords
string or null

Geographic coordinates of the service

comment
string or null

Service comment.

service_template_id
integer or null >= 1

Template ID of the service template.

check_command_id
integer or null >= 1

Check command ID.

check_command_args
Array of strings
check_timeperiod_id
integer or null >= 1

Time period ID of the check command.

max_check_attempts
integer or null

Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state.

normal_check_interval
integer or null

Define the number of 'time units' between regularly scheduled checks of the service.

With the default time unit of 60s, this number will mean multiples of 1 minute.

retry_check_interval
integer or null

Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected.

With the default time unit of 60s, this number will mean multiples of 1 minute.

Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate.

active_check_enabled
integer

Indicates whether active checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
passive_check_enabled
integer

Indicates whether passive checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
volatility_enabled
integer

Indicates whether the service is "volatile" or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_enabled
integer

Specify whether notifications are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
is_contact_additive_inheritance
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead.

is_contact_group_additive_inheritance
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contact definition will not override the definitions on template levels, it will be appended instead.

notification_interval
integer or null

Define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable.

With the default time unit of 60s, this number will mean multiples of 1 minute.

A value of 0 disables re-notifications of contacts about problems for this service - only one problem notification will be sent out.

notification_timeperiod_id
integer or null >= 1

Notification timeperiod ID.

notification_type
integer

Define the states of the service for which notifications should be sent out.

The value is the sum of all the values of the selected options.

  • 0 - NONE
  • 1 - WARNING
  • 2 - UNKNOWN
  • 4 - CRITICAL
  • 8 - RECOVERY
  • 16 - FLAPPING
  • 32 - DOWNTIME_SCHEDULED
  • NULL - (inheritance of its parent's value. If there is no parent, the value will be assumed to be: WARNING|UNKNOWN|CRITICAL|RECOVERY|FLAPPING|DOWNTIME_SCHEDULED)

example: A value equal to 5 corresponds to the selected options WARNING and CRITICAL

first_notification_delay
integer or null

Define the number of "time units" to wait before sending out the first problem notification when this service enters a non-OK state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

recovery_notification_delay
integer or null

Define the number of "time units" to wait before sending out the recovery notification when this service enters an OK state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

acknowledgement_timeout
integer or null

Specify a duration of acknowledgement for this service.

freshness_checked
integer

Indicates whether freshness is checked or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
freshness_threshold
integer or null

Specify the freshness threshold (in seconds) for this service.

flap_detection_enabled
integer

Indicates whether the flap detection is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
low_flap_threshold
integer or null

Specify the low state change threshold used in flap detection for this service.

high_flap_threshold
integer or null

Specify the high state change threshold used in flap detection for this service.

event_handler_enabled
integer

Indicates whether the event handler is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
event_handler_command_id
integer or null >= 1

Event handler command ID.

event_handler_command_args
Array of strings
graph_template_id
integer or null >= 1

ID of the default graph template that will be used for this service.

note
string or null <= 65535 characters

Define an optional note.

note_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more information about the service.

action_url
string or null <= 65535 characters

Define an optional URL that can be used to specify actions to be performed on the service.

icon_id
integer or null >= 1

Define the image ID that should be associated with this service.

icon_alternative
string or null <= 200 characters

Define an optional string that is used as an alternative description for the icon.

severity_id
integer or null >= 1

Severity ID.

is_activated
boolean

Indicates whether the service is activated or not

service_categories
Array of integers
service_groups
Array of integers
Array of objects (macro)

Macros defined for the service (directly or through a template or command inheritance)

If multiple macros are defined with the same name, only the last one will be saved.

Responses

Request samples

Content type
application/json
{
  • "name": "generic-service",
  • "host_id": 1,
  • "geo_coords": "48.10,12.5",
  • "comment": "string",
  • "service_template_id": null,
  • "check_command_id": null,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": null,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 2,
  • "passive_check_enabled": 2,
  • "volatility_enabled": 2,
  • "notification_enabled": 2,
  • "is_contact_additive_inheritance": true,
  • "is_contact_group_additive_inheritance": true,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "notification_type": 5,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 2,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 2,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 2,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "graph_template_id": null,
  • "note": "string",
  • "note_url": "string",
  • "action_url": "string",
  • "icon_id": null,
  • "icon_alternative": "string",
  • "severity_id": 1,
  • "is_activated": true,
  • "service_categories": [
    ],
  • "service_groups": [
    ],
  • "macros": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "generic-service",
  • "host_id": 1,
  • "geo_coords": "48.10,12.5",
  • "comment": "string",
  • "service_template_id": null,
  • "check_command_id": null,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": null,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 2,
  • "passive_check_enabled": 2,
  • "volatility_enabled": 2,
  • "notification_enabled": 2,
  • "is_contact_additive_inheritance": true,
  • "is_contact_group_additive_inheritance": true,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "notification_type": 5,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 2,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 2,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 2,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "graph_template_id": null,
  • "note": "string",
  • "note_url": "string",
  • "action_url": "string",
  • "icon_id": null,
  • "icon_alternative": "string",
  • "severity_id": 1,
  • "is_activated": true,
  • "categories": [
    ],
  • "groups": [
    ],
  • "macros": [
    ]
}

Find all services

Return all service configurations.

The available parameters to search by are:

  • name
  • host.id
  • host.name
  • category.id
  • category.name
  • severity.id
  • severity.name
  • group.id
  • group.name
  • hostgroup.id
  • hostgroup.name
  • hostcategory.id
  • hostcategory.name

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List all services

List all the services in real-time monitoring.

The available parameters to search / sort_by are:

  • host.id
  • host.name
  • host.alias
  • host.address
  • host.state
  • host_group.id
  • service.display_name
  • service.description
  • service.is_acknowledged
  • service.output
  • service.state
  • service_group.id
  • poller.id
  • service.downtime
  • service.criticality
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List services related to a host

List all services related to a host in real-time monitoring.

The available parameters to search / sort_by are:

  • service.id
  • service.description
  • service.display_name
  • service_group.id
  • service.is_acknowledged
  • service.state
Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Get a service

Return a single service with full details.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Responses

Response samples

Content type
application/json
{
  • "id": 5,
  • "description": "Ping",
  • "display_name": "Ping",
  • "state": 0,
  • "check_attempt": 1,
  • "icon_image": "",
  • "icon_image_alt": "",
  • "last_check": "2019-08-24T14:15:22Z",
  • "last_state_change": "2019-08-24T14:15:22Z",
  • "max_check_attempts": 3,
  • "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
  • "state_type": 1,
  • "criticality": 10,
  • "status": {
    },
  • "duration": "2h 3m",
  • "check_command": "base_centreon_ping",
  • "check_interval": 5,
  • "check_period": "24x7",
  • "check_type": 0,
  • "command_line": "/usr/lib64/nagios/plugins/check_icmp -H 127.0.0.1 -n 5 -w 200,20% -c 400,50%",
  • "execution_time": 0.179335,
  • "is_acknowledged": false,
  • "is_active_check": true,
  • "is_checked": true,
  • "last_hard_state_change": "2019-08-24T14:15:22Z",
  • "last_notification": "2019-08-24T14:15:22Z",
  • "last_time_critical": "2019-08-24T14:15:22Z",
  • "last_time_ok": "2019-08-24T14:15:22Z",
  • "last_time_unknown": "2019-08-24T14:15:22Z",
  • "last_time_warning": "2019-08-24T14:15:22Z",
  • "last_update": "2019-08-24T14:15:22Z",
  • "latency": 0.031,
  • "next_check": "2019-08-24T14:15:22Z",
  • "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
  • "scheduled_downtime_depth": 0,
  • "downtimes": [
    ],
  • "acknowledgement": {
    },
  • "flapping": false,
  • "notify": true
}

Service group

List all service groups

Return all service group configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • is_activated
  • host.id
  • host.name
  • hostgroup.id
  • hostgroup.name
  • hostcategory.id
  • hostcategory.name
  • servicecategory.id
  • servicecategory.name
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a service group

Add a new service group configuration.

Mandatory body properties are:

  • name
  • alias

Since Centreon web 23.04

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
string <= 200 characters

Service group name

alias
string or null <= 200 characters

Service group alias

geo_coords
string or null <= 32 characters

Geographical coordinates use by Centreon Map module to position element on map

comment
string or null <= 65535 characters

Comments on this service group

is_activated
boolean

Indicates whether the service group is activated or not

Responses

Request samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "geo_coords": "48.51,2.20",
  • "comment": "string",
  • "is_activated": true
}

Response samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "geo_coords": "48.51,2.20",
  • "comment": "string",
  • "is_activated": true,
  • "id": 1
}

Delete a host group

internal

Since Centreon web 23.04

Delete service group.

Authorizations:
TokenCookie
path Parameters
servicegroup_id
required
integer <int64>
Example: 5

ID of the service group

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Get service groups by host id and service id

Return a list of service groups for host-service pair.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Responses

Response samples

Content type
application/json
{
  • "id": 13,
  • "name": "MySG"
}

List all service groups

List all the service groups in real-time monitoring.

The available parameters to search / sort_by are:

  • id
  • name
  • host.id
  • host.name
  • host.alias
  • host.address
  • host.display_name
  • host.state
  • poller.id
  • service.display_name
  • host_group.id
Authorizations:
TokenCookie
query Parameters
show_service
boolean
Default: false
Example: show_service=true

Allows to display services belonging to items

show_host
boolean
Default: false
Example: show_host=true

Allows to display hosts belonging to items

search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Service category

List service categories

List of service category configurations

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • is_activated
  • host.id
  • host.name
  • hostgroup.id
  • hostgroup.name
  • hostcategory.id
  • hostcategory.name
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Create a service category

Create a service category

This endpoint does NOT update the ACL rights with the new service category

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
string

Service category name

alias
string

Service category alias

is_activated
boolean

is active or not (enabled/disabled)

Responses

Request samples

Content type
application/json
{
  • "name": "service-category",
  • "alias": "service-category",
  • "is_activated": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List all real-time service categories

List of all service categories in real-time context

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Severity

List all service severities from the realtime

List all the service severities in real-time monitoring.

The available parameters to search / sort_by are:

  • name
  • level
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List all host severities from real-time data

List all the host severities in real-time monitoring.

The available parameters to search / sort_by are:

  • name
  • level
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Time period

Get all time periods

Get list of all time periods

The available parameters to search / sort_by are:

  • id
  • name
  • alias
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Create a new time period

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
string

Name of the time period

alias
string

Alias of the time period

Array of objects (Configuration.TimePeriod.days)
templates
Array of integers

IDs of the time periods used as a template

Array of objects (Configuration.TimePeriod.ExtraTimePeriod)

List of exceptions to the standard schedule

Responses

Request samples

Content type
application/json
{
  • "name": "24x7",
  • "alias": "Always",
  • "days": [
    ],
  • "templates": [
    ],
  • "exceptions": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete a time period

Authorizations:
TokenCookie
path Parameters
id
required
integer <int64>
Example: 1

ID of the time period to be deleted

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Get a time period

Authorizations:
TokenCookie
path Parameters
id
required
integer <int64>
Example: 1

Time period ID

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "24x7",
  • "alias": "Always",
  • "days": [
    ],
  • "templates": [
    ],
  • "exceptions": [
    ]
}

Update a time period

Authorizations:
TokenCookie
path Parameters
id
required
integer <int64>
Example: 1

ID of the time period to be updated

Request Body schema: application/json
required
name
string

Name of the time period

alias
string

Alias of the time period

Array of objects (Configuration.TimePeriod.days)
templates
Array of integers

IDs of the time periods used as a template

Array of objects (Configuration.TimePeriod.ExtraTimePeriod)

List of exceptions to the standard schedule

Responses

Request samples

Content type
application/json
{
  • "name": "24x7",
  • "alias": "Always",
  • "days": [
    ],
  • "templates": [
    ],
  • "exceptions": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Topology

Register to platform topology

Register a server to the platform topology

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
required
string

Name of the server to register in the topology

hostname
string

Platform's 'physical' name

type
required
string
Enum: "central" "poller" "remote" "map" "mbi"

Type of the server from available Server types :

  • 'Central'
  • 'Poller'
  • 'Remote'
  • 'MAP'
  • 'MBI'
address
required
string

Address of the server. IPv4, IPv6 or DNS

parent_address
string

It should not be added to register a Central or other platforms in specific cases: Eg : To register a remote server as top level platform on its own platform. Mandatory parameter for all other types, to be able to link a platform to its parent Example : - To link a poller to a Central - To link a remote server to a Central - To link a poller to a remote server

Responses

Request samples

Content type
application/json
{
  • "name": "myPoller",
  • "hostname": "my.poller.physical.hostname",
  • "type": "poller",
  • "address": "1.1.1.2",
  • "parent_address": "1.1.1.1"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Get a platform topology

Get a platform topology in Json Graph Format

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "graph": {
    }
}

Delete a Platform

Delete a platform from the topology

Authorizations:
TokenCookie
path Parameters
poller_id
required
integer <int64>
Example: 5

ID of the poller

Responses

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Broker

Add a broker output

Add a broker output configuration

Authorizations:
TokenCookie
path Parameters
broker_id
required
integer <int64>
Example: 5

ID of the broker configuration

Request Body schema: application/json
required
name
required
string

output name

type
integer

Output type ID

Must be one of the following:

  • 3 - IPv4 (ipv4)
  • 10 - IPv6 (ipv6)
  • 11 - File (file)
  • 13 - RRD file generator (rrd)
  • 14 - Perfdata Generator (Centreon Storage) - DEPRECATED (storage)
  • 16 - Broker SQL database - DEPRECATED (sql)
  • 28 - Database configuration reader (db_cfg_reader)
  • 29 - Database configuration writer (db_cfg_writer)
  • 30 - Storage - Graphite (graphite)
  • 31 - Storage - InfluxDB (influxdb)
  • 33 - Stream connector (lua)
  • 34 - Unified SQL (unified_sql)
  • 35 - BBDO Server (bbdo_server)
  • 36 - BBDO Client (bbdo_client)
parameters
required
object

Output parameters specific to the output type.

For multiselect fields the property name is a combination of the group field name and the sub field name as "{fieldName}_{subfieldName}" (ex: "filters_category")

All fields must be provided, but can be null/empty if they are optional.

Responses

Request samples

Content type
application/json
{
  • "name": "central-broker-master-unified-sql",
  • "type": "33",
  • "parameters": "{\n \"path\": \"some/test/path\",\n \"filters.category\": [\"storage\", \"neb\"],\n \"lua_parameter\": [\n {\n \"type\": \"string\",\n \"name\": \"my-lua-param-1\",\n \"value\": \"azerty\"\n },\n {\n \"type\": \"string\",\n \"name\": \"my-lua-param-2\",\n \"value\": \"qwerty\"\n }\n ]\n}\n"
}

Response samples

Content type
application/json
{
  • "brokerId": 1,
  • "name": "central-broker-master-unified-sql",
  • "type": {
    },
  • "parameters": "{\n \"path\": \"some/test/path\",\n \"filters.category\": [\"storage\", \"neb\"],\n \"lua_parameter\": [\n {\n \"type\": \"string\",\n \"name\": \"my-lua-param-1\",\n \"value\": \"azerty\"\n },\n {\n \"type\": \"string\",\n \"name\": \"my-lua-param-2\",\n \"value\": \"qwerty\"\n }\n ]\n}\n"
}

Update a broker stream connector output file

Create a configuration file with provided JSON content and update the output configuration accordingly

Authorizations:
TokenCookie
path Parameters
broker_id
required
integer <int64>
Example: 5

ID of the broker configuration

output_id
required
integer <int64>
Example: 5

ID of the broker configuration output

Request Body schema: application/json
required
file_content
required
string

Content of the file to be created. Must be a valid JSON encoded string.

Responses

Request samples

Content type
application/json
{
  • "file_content": "{\"test\": \"hello world\"}"
}

Response samples

Content type
application/json
{
  • "path": "/some/path/my-new-file.json"
}

Graph Template

Find all graph templates

Return all graph template configurations.

The available parameters to search / sort_by are:

  • id
  • name
Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Connector

Find all connectors

Return all connector configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • command.id
  • command.name
Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Service template

Find all service template

Return all service template configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • is_locked

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a service template

Add a service template configuration.

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
required
string

Service template name.

alias
required
string

Service template alias.

comment
string or null

Service template comment.

service_template_id
integer or null >= 1

Template ID of the service template.

check_command_id
integer or null >= 1

Check command ID.

check_command_args
Array of strings
check_timeperiod_id
integer or null >= 1

Time period ID of the check command.

max_check_attempts
integer or null

Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state.

normal_normal_check_interval
integer or null

Define the number of 'time units' between regularly scheduled checks of the service.

With the default time unit of 60s, this number will mean multiples of 1 minute.

retry_check_interval
integer or null

Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected.

With the default time unit of 60s, this number will mean multiples of 1 minute.

Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate.

active_check_enabled
integer

Indicates whether active checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
passive_check_enabled
integer

Indicates whether passive checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
volatility_enabled
integer

Indicates whether the service is "volatile" or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_enabled
integer

Specify whether notifications are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
is_contact_additive_inheritance
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead.

is_contact_group_additive_inheritance
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contact definition will not override the definitions on template levels, it will be appended instead.

notification_interval
integer or null

Define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable.

With the default time unit of 60s, this number will mean multiples of 1 minute.

A value of 0 disables re-notifications of contacts about problems for this service - only one problem notification will be sent out.

notification_timeperiod_id
integer or null >= 1

Notification timeperiod ID.

notification_type
integer

Define the states of the service for which notifications should be sent out.

The value is the sum of all the values of the selected options.

  • 0 - NONE
  • 1 - WARNING
  • 2 - UNKNOWN
  • 4 - CRITICAL
  • 8 - RECOVERY
  • 16 - FLAPPING
  • 32 - DOWNTIME_SCHEDULED
  • NULL - (inheritance of its parent's value. If there is no parent, the value will be assumed to be: WARNING|UNKNOWN|CRITICAL|RECOVERY|FLAPPING|DOWNTIME_SCHEDULED)

example: A value equal to 5 corresponds to the selected options WARNING and CRITICAL

first_notification_delay
integer or null

Define the number of "time units" to wait before sending out the first problem notification when this service enters a non-OK state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

recovery_notification_delay
integer or null

Define the number of "time units" to wait before sending out the recovery notification when this service enters an OK state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

acknowledgement_timeout
integer or null

Specify a duration of acknowledgement for this service template.

freshness_checked
integer

Indicates whether freshness is checked or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
freshness_threshold
integer or null

Specify the freshness threshold (in seconds) for this service.

flap_detection_enabled
integer

Indicates whether the flap detection is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
low_flap_threshold
integer or null

Specify the low state change threshold used in flap detection for this service.

high_flap_threshold
integer or null

Specify the high state change threshold used in flap detection for this service.

event_handler_enabled
integer

Indicates whether the event handler is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
event_handler_command_id
integer or null >= 1

Event handler command ID.

event_handler_command_args
Array of strings
graph_template_id
integer or null >= 1

ID of the default graph template that will be used for this service.

note
string or null <= 65535 characters

Define an optional note.

note_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more information about the service.

action_url
string or null <= 65535 characters

Define an optional URL that can be used to specify actions to be performed on the service.

icon_id
integer or null >= 1

Define the image ID that should be associated with this service template.

icon_alternative
string or null <= 200 characters

Define an optional string that is used as an alternative description for the icon.

severity_id
integer or null >= 1

Severity ID.

host_templates
Array of integers
service_categories
Array of integers
Array of objects
Array of objects (macro)

Macros defined for the service (directly or through a template or command inheritance)

If multiple macros are defined with the same name, only the last one will be saved.

Responses

Request samples

Content type
application/json
{
  • "name": "generic-service",
  • "alias": "generic-service",
  • "comment": "string",
  • "service_template_id": null,
  • "check_command_id": null,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": null,
  • "max_check_attempts": 0,
  • "normal_normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 2,
  • "passive_check_enabled": 2,
  • "volatility_enabled": 2,
  • "notification_enabled": 2,
  • "is_contact_additive_inheritance": true,
  • "is_contact_group_additive_inheritance": true,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "notification_type": 5,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 2,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 2,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 2,
  • "event_handler_command_id": 1,
  • "event_handler_command_args": [
    ],
  • "graph_template_id": null,
  • "note": "string",
  • "note_url": "string",
  • "action_url": "string",
  • "icon_id": null,
  • "icon_alternative": "string",
  • "severity_id": 1,
  • "host_templates": [
    ],
  • "service_categories": [
    ],
  • "service_groups": [
    ],
  • "macros": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete a service template

Delete a service template configuration

Authorizations:
TokenCookie
path Parameters
service_template_id
required
integer >= 1
Example: 1

Service template ID

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Partial update of a service template

Partial update of a service template configuration

This endpoint has a specific behaviour on Cloud environments. Please check the dedicated Cloud API documentation.

Authorizations:
TokenCookie
path Parameters
service_template_id
required
integer >= 1
Example: 1

Service template ID

Request Body schema: application/json
required
name
string

Service template name.

alias
string

Service template alias.

comment
string or null

Service template comment.

service_template_id
integer or null >= 1

Template ID of the service template.

check_command_id
integer or null >= 1

Check command ID.

check_command_args
Array of strings
check_timeperiod_id
integer >= 1

Time period ID of the check command.

max_check_attempts
integer

Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state.

normal_check_interval
integer

Define the number of 'time units' between regularly scheduled checks of the service.

With the default time unit of 60s, this number will mean multiples of 1 minute.

retry_check_interval
integer

Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected.

With the default time unit of 60s, this number will mean multiples of 1 minute.

Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate.

active_check_enabled
integer

Indicates whether active checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
passive_check_enabled
integer

Indicates whether passive checks are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
volatility_enabled
integer

Indicates whether the service is "volatile" or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
notification_enabled
integer

Specify whether notifications are enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
is_contact_additive_inheritance
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contactgroup definition will not override the definitions on template levels, it will be appended instead.

is_contact_group_additive_inheritance
boolean

Only used when notification inheritance for hosts and services is set to vertical inheritance only.

When enabled, the contact definition will not override the definitions on template levels, it will be appended instead.

notification_interval
integer or null

Define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable.

With the default time unit of 60s, this number will mean multiples of 1 minute.

A value of 0 disables re-notifications of contacts about problems for this service - only one problem notification will be sent out.

notification_timeperiod_id
integer >= 1

Notification timeperiod ID.

notification_type
integer

Define the states of the service for which notifications should be sent out.

The value is the sum of all the values of the selected options.

  • 0 - NONE
  • 1 - WARNING
  • 2 - UNKNOWN
  • 4 - CRITICAL
  • 8 - RECOVERY
  • 16 - FLAPPING
  • 32 - DOWNTIME_SCHEDULED
  • NULL - (inheritance of its parent's value. If there is no parent, the value will be assumed to be: WARNING|UNKNOWN|CRITICAL|RECOVERY|FLAPPING|DOWNTIME_SCHEDULED)

example: A value equal to 5 corresponds to the selected options WARNING and CRITICAL

first_notification_delay
integer or null

Define the number of "time units" to wait before sending out the first problem notification when this service enters a non-OK state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

recovery_notification_delay
integer or null

Define the number of "time units" to wait before sending out the recovery notification when this service enters an OK state.

With the default time unit of 60s, this number will mean multiples of 1 minute.

acknowledgement_timeout
integer

Specify a duration of acknowledgement for this service template.

freshness_checked
integer

Indicates whether freshness is checked or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
freshness_threshold
integer

Specify the freshness threshold (in seconds) for this service.

flap_detection_enabled
integer

Indicates whether the flap detection is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
low_flap_threshold
integer

Specify the low state change threshold used in flap detection for this service.

high_flap_threshold
integer

Specify the high state change threshold used in flap detection for this service.

event_handler_enabled
integer

Indicates whether the event handler is enabled or not

  • 0 - STATUS_DISABLED
  • 1 - STATUS_ENABLED
  • 2 - STATUS_DEFAULT (inheritance of its parent's value. If there is no parent, the values used will be that of Centreon Engine)
event_handler_command_id
integer or null >= 1

Event handler command ID.

event_handler_command_args
Array of strings
graph_template_id
integer or null >= 1

ID of the default graph template that will be used for this service.

note
string or null <= 65535 characters

Define an optional note.

note_url
string or null <= 65535 characters

Define an optional URL that can be used to provide more information about the service.

action_url
string or null <= 65535 characters

Define an optional URL that can be used to specify actions to be performed on the service.

icon_id
integer or null >= 1

Define the image ID that should be associated with this service template.

icon_alternative
string or null <= 200 characters

Define an optional string that is used as an alternative description for the icon.

severity_id
integer or null >= 1

Severity ID.

host_templates
Array of integers
service_categories
Array of integers
Array of objects (macro)

Macros defined for the service (directly or through a template or command inheritance)

If multiple macros are defined with the same name, only the last one will be saved.

Array of objects

Responses

Request samples

Content type
application/json
{
  • "name": "generic-service",
  • "alias": "generic-service",
  • "comment": "string",
  • "service_template_id": null,
  • "check_command_id": null,
  • "check_command_args": [
    ],
  • "check_timeperiod_id": 1,
  • "max_check_attempts": 0,
  • "normal_check_interval": 0,
  • "retry_check_interval": 0,
  • "active_check_enabled": 2,
  • "passive_check_enabled": 2,
  • "volatility_enabled": 2,
  • "notification_enabled": 2,
  • "is_contact_additive_inheritance": true,
  • "is_contact_group_additive_inheritance": true,
  • "notification_interval": 0,
  • "notification_timeperiod_id": 1,
  • "notification_type": 5,
  • "first_notification_delay": 0,
  • "recovery_notification_delay": 0,
  • "acknowledgement_timeout": 0,
  • "freshness_checked": 2,
  • "freshness_threshold": 0,
  • "flap_detection_enabled": 2,
  • "low_flap_threshold": 0,
  • "high_flap_threshold": 0,
  • "event_handler_enabled": 2,
  • "event_handler_command_id": null,
  • "event_handler_command_args": [
    ],
  • "graph_template_id": null,
  • "note": "string",
  • "note_url": "string",
  • "action_url": "string",
  • "icon_id": null,
  • "icon_alternative": "string",
  • "severity_id": 1,
  • "host_templates": [
    ],
  • "service_categories": [
    ],
  • "macros": [
    ],
  • "service_groups": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Service severity

List all service severities

List of all service severity configurations

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • level
  • is_activated
Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Create a service severity

Create a service severity

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
required
string

Service severity name

alias
required
string

Service severity alias

level
required
integer

Service severity priority

icon_id
required
integer

Define the image ID associated with this severity

is_activated
boolean

Indicates whether this service severity is enabled or not

Responses

Request samples

Content type
application/json
{
  • "name": "service-severity",
  • "alias": "service-severity",
  • "level": 2,
  • "icon_id": 1,
  • "is_activated": true
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "service-severity",
  • "alias": "service-severity",
  • "level": 2,
  • "icon_id": 1,
  • "is_activated": true
}

Delete a service severity

Delete a service severity configuration

Authorizations:
TokenCookie
path Parameters
service_severity_id
required
integer >= 1
Example: 1

Service severity ID

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Update a service severity

Update a service severity configuration

Authorizations:
TokenCookie
path Parameters
service_severity_id
required
integer >= 1
Example: 1

Service severity ID

Request Body schema: application/json
required
name
required
string

Service severity name

alias
required
string

Service severity alias

level
required
integer

Service severity priority

icon_id
required
integer

Define the image ID associated with this severity

is_activated
boolean

Indicates whether this service severity is enabled or not

Responses

Request samples

Content type
application/json
{
  • "name": "service-severity",
  • "alias": "service-severity",
  • "level": 2,
  • "icon_id": 1,
  • "is_activated": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Icons

List all icons

List all icons from centreon configuration.

The available parameters to search / sort_by are:

  • id
  • name
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Notification Policy

Get notification policy of a host

Return the notified contacts and contact groups of a host.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Responses

Response samples

Content type
application/json
{
  • "contacts": [
    ]
}

Get notification policy of a service

Return the notified contacts and contact groups of a service.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Responses

Response samples

Content type
application/json
{
  • "contacts": [
    ]
}

Get notification policy of a meta service

Return the notified contacts and contact groups of a meta service.

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Responses

Response samples

Content type
application/json
{
  • "contacts": [
    ]
}

User

List allowed actions

List allowed actions of the current user.

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "host": {
    },
  • "service": {
    }
}

Get configured users

Get list of configured users

The available parameters to search / sort_by are:

  • id
  • alias
  • name
  • email
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List user parameters

List configured parameters for the current user

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Administrator",
  • "alias": "admin",
  • "email": "admin@localhost",
  • "timezone": "Europe/Paris",
  • "locale": "en_US",
  • "is_admin": true,
  • "use_deprecated_pages": false,
  • "theme": "light",
  • "user_interface_density": "extended",
  • "default_page": "/main.php?p=60901",
  • "dashboard": {
    }
}

Update a user

Update a user

The available parameters to be updated are :

  • theme
  • user_interface_density
Authorizations:
TokenCookie
Request Body schema: application/json
required
theme
string
Enum: "light" "dark"

Theme

user_interface_density
string
Enum: "compact" "extended"

User interface view mode

Responses

Request samples

Content type
application/json
{
  • "theme": "light",
  • "user_interface_density": "extended"
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List contact templates

List configured contact templates

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List contact groups

List configured contact groups

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List user filters by page

internal

Since Centreon web 20.04.6

List user filters saved for a given page.

Authorizations:
TokenCookie
path Parameters
page_name
required
string
Example: events-view

name of the page. Currently only 'events-view' is allowed.

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Detailed user filter

internal

Since Centreon web 20.04.6

Get detailed information of a user filter for a given page.

Authorizations:
TokenCookie
path Parameters
page_name
required
string
Example: events-view

name of the page. Currently only 'events-view' is allowed.

filter_id
required
integer <int64>
Example: 1

id of the filter

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Dashboard

List all dashboards

Return all dashboard configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • created_by
  • created_at
  • updated_at

Since Centreon web 23.10

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a dashboard

Add a new dashboard configuration.

Mandatory body properties are:

  • name

Since Centreon web 23.10

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
required
string <= 200 characters

Dashboard name

description
string or null <= 65535 characters

Description about this dashboard

Array of objects
object

Responses

Request samples

Content type
application/json
{
  • "name": "my dashboard",
  • "description": "my description",
  • "panels": [
    ],
  • "refresh": {
    }
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my dashboard",
  • "description": "my description",
  • "created_by": {
    },
  • "updated_by": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "own_role": "viewer",
  • "panels": [
    ],
  • "refresh": {
    }
}

Get a dashboard

Return one dashboard configuration.

Since Centreon web 23.10

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my dashboard",
  • "description": "my description",
  • "created_by": {
    },
  • "updated_by": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "own_role": "viewer",
  • "refresh": {
    },
  • "panels": [
    ]
}

Partial update of a dashboard

Since Centreon web 23.10

Partial update dashboard.

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

Request Body schema: application/json
required
name
string <= 200 characters

Dashboard name

description
string or null <= 65535 characters

Description about this dashboard

Array of objects
object

Responses

Request samples

Content type
application/json
{
  • "name": "my dashboard",
  • "description": "my description",
  • "panels": [
    ],
  • "refresh": {
    }
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete a dashboard

Delete one dashboard configuration.

Since Centreon web 23.10

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Update all the contact and contact groups shares of a dashboard

Update all the contact and contact groups shares of a dashboard.

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

Request Body schema: application/json
required
required
Array of objects
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "contacts": [
    ],
  • "contact_groups": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete the contact access right of a dashboard

Delete the contact access right of a dashboard.

Since Centreon web 23.10

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

contact_id
required
integer <int64>
Example: 5

ID of the contact

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List contact access rights of a dashboard

Return all contact access rights of a dashboard.

The available parameters to search / sort_by are:

  • id
  • name
  • email

Since Centreon web 23.10

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a contact group access right of a dashboard

Add a new contact access right for a dashboard.

Mandatory body properties are:

  • id
  • role

Since Centreon web 23.10

Authorizations:
TokenCookie
Request Body schema: application/json
required
id
required
integer

Contact ID

role
required
string
Enum: "viewer" "editor"

The role of the contact for this dashboard.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "role": "viewer"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "John Doe",
  • "email": "john.doe@centreon.com",
  • "role": "viewer"
}

Update the contact access right of a dashboard

Since Centreon web 23.10

Update the contact access right of a dashboard.

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

contact_id
required
integer <int64>
Example: 5

ID of the contact

Request Body schema: application/json
required
role
string
Enum: "viewer" "editor"

The role of the contact for this dashboard.

Responses

Request samples

Content type
application/json
{
  • "role": "viewer"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete the contact access right of a dashboard

Delete the contact access right of a dashboard.

Since Centreon web 23.10

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

contact_id
required
integer <int64>
Example: 5

ID of the contact

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List contact group access rights of a dashboard

Return all contact access rights of a dashboard.

The available parameters to search / sort_by are:

  • id
  • name

Since Centreon web 23.10

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a contact group access right of a dashboard

Add a new contact access right for a dashboard.

Mandatory body properties are:

  • id
  • role

Since Centreon web 23.10

Authorizations:
TokenCookie
Request Body schema: application/json
required
id
required
integer

Contact group ID

role
required
string
Enum: "viewer" "editor"

The role of the contact group for this dashboard.

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "role": "viewer"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "John Doe",
  • "role": "viewer"
}

Update the contact group access right of a dashboard

Since Centreon web 23.10

Update the contact access right of a dashboard.

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

contact_group_id
required
integer <int64>
Example: 5

ID of the contact group

Request Body schema: application/json
required
role
string
Enum: "viewer" "editor"

The role of the contact group for this dashboard.

Responses

Request samples

Content type
application/json
{
  • "role": "viewer"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Delete the contact group access right of a dashboard

Delete the contact access right of a dashboard.

Since Centreon web 23.10

Authorizations:
TokenCookie
path Parameters
dashboard_id
required
integer <int64>
Example: 5

ID of the dashboard

contact_group_id
required
integer <int64>
Example: 5

ID of the contact group

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all contacts for the sharing modal of a dashboard

Return all contacts for the sharing modal of a dashboard.

The available parameters to search / sort_by are:

  • id
  • name

Since Centreon web 23.10

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List all contact groups for the sharing modal of a dashboard

Return all contact groups for the sharing modal of a dashboard.

The available parameters to search / sort_by are:

  • id
  • name

Since Centreon web 23.10

Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List the Top/Bottom resources for given metric

List the Top/Bottom resources for given metric

Authorizations:
TokenCookie
query Parameters
metric_name
required
string
Example: metric_name=rta

Name of the metric

Responses

Response samples

Content type
application/json
null

Metrics

List metrics

Get list of all metrics

The available parameters to search / sort_by are: AND

  • hostgroup.id
  • hostcategory.id
  • host.id
  • servicegroup.id
  • servicecategory.id
  • service.name
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List metrics

Get data for given metrics

The available parameters to search / sort_by are: AND

  • hostgroup.id
  • hostcategory.id
  • host.id
  • servicegroup.id
  • servicecategory.id
  • service.name
Authorizations:
TokenCookie
query Parameters
start
required
string <date-time>
Example: start=2020-02-18T00:00:00

Start date of metrics (default date is 24 hours in the past)

end
required
string <date-time>
Example: end=2020-02-19T00:00:00

End date of metrics (default date is current date)

metric_names
required
string^\[\w+(,\w+)*\]$
Example: metric_names=[rta,pl]

List of metric names

Responses

Response samples

Content type
application/json
{
  • "base": 1000,
  • "metrics": [
    ],
  • "times": [
    ]
}

List all metrics of a service

List all of the metrics of a services with their threshold and current value

Authorizations:
TokenCookie
path Parameters
host_id
required
integer >= 1
Example: 1

Host ID

service_id
required
integer >= 1
Example: 1

Service ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get service metrics

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

start
required
string <date-time>
Example: 2020-02-18T00:00:00

Start date of metrics (default date is 24 hours in the past)

end
required
string <date-time>
Example: 2020-02-19T00:00:00

End date of metrics (default date is current date)

Responses

Response samples

Content type
application/json
{
  • "global": {
    },
  • "metrics": [
    ],
  • "times": [
    ]
}

Get service status data

Get status data from a service between given interval

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

start
required
string <date-time>
Example: 2020-02-18T00:00:00

Start date of metrics (default date is 24 hours in the past)

end
required
string <date-time>
Example: 2020-02-19T00:00:00

End date of metrics (default date is current date)

Responses

Response samples

Content type
application/json
{
  • "critical": [
    ],
  • "warning": [
    ],
  • "ok": [
    ],
  • "unknown": [
    ]
}

Get service performance data

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
start
string <date-time>
Example: start=2020-02-18T00:00:00

Start date of metrics (default date is 24 hours in the past)

end
string <date-time>
Example: end=2020-02-19T00:00:00

End date of metrics (default date is current date)

Responses

Response samples

Content type
application/json
{
  • "base": 1024,
  • "metrics": [
    ],
  • "times": [
    ]
}

Download performance data as csv file

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
start_date
required
string <date-time>
Example: start_date=2022-01-01T00:00:22Z

Start date of metrics (date format should be in ISO 8601)

end
required
string <date-time>
Example: end=2023-01-01T00:00:00Z

End date of metrics (date format should be in ISO 8601)

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Internal Server Error"
}

Get service status data

Get status data from a service between given interval

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
start
string <date-time>
Example: start=2020-02-18T00:00:00

Start date of metrics (default date is 24 hours in the past)

end
string <date-time>
Example: end=2020-02-19T00:00:00

End date of metrics (default date is current date)

Responses

Response samples

Content type
application/json
{
  • "critical": [
    ],
  • "warning": [
    ],
  • "ok": [
    ],
  • "unknown": [
    ]
}

Resource

List all resources by their parents

List all the resources in real-time monitoring by their parents : parent -> resources.

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • fqdn
  • type
  • status_code
  • status
  • action_url
  • notes_label
  • notes_url
  • parent_name
  • parent_status
  • in_downtime
  • acknowledged
  • last_status_change
  • tries
  • last_check
  • information
  • monitoring_server_name
  • status_types

Only for searching:


  • h.name
  • h.alias
  • h.address
  • h.fqdn
  • s.description
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

types
string^\["[^"]+"(,"[^"]+")*\]$
Example: types=["host"]

Filter the resources by type

states
string^\["[^"]+"(,"[^"]+")*\]$
Example: states=["in_downtime", "acknowledged"]

Filter the resources by state

statuses
string^\["[^"]+"(,"[^"]+")*\]$
Example: statuses=["OK", "UP", "PENDING"]

Filter the resources by status

hostgroup_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: hostgroup_names=["ESX-Paris", "ESX-London"]

Filter the resources by host group names

servicegroup_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: servicegroup_names=["Memory-Services", "Ping-Services"]

Filter the resources by service group names

service_category_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: service_category_names=["Ping", "CPUs"]

Filter the resources by service category names

host_category_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: host_category_names=["Linux", "Windows"]

Filter the resources by host category names

host_severity_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: host_severity_names=["Linux", "Windows"]

Filter the resources by host severity names

service_severity_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: service_severity_names=["Ping", "CPUs"]

Filter the resources by service severity names

host_severity_levels
string^\[\d+(,\d+)*\]$
Example: host_severity_levels=[50, 75]

Filter the resources by host severity levels

service_severity_levels
string^\[\d+(,\d+)*\]$
Example: service_severity_levels=[50, 75]

Filter the resources by service severity levels

monitoring_server_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: monitoring_server_names=["Central", "Remote-Server-Paris", "Poller-Lyon"]

Filter the resources by monitoring server names

status_types
string^\["[^"]+"(,"[^"]+")*\]$
Example: status_types=["soft"]

Filter the resources by status types

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List all resources including hosts and services

List all the resources in real-time monitoring : hosts and services.

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • fqdn
  • type
  • status_code
  • status
  • action_url
  • notes_label
  • notes_url
  • parent_name
  • parent_status
  • in_downtime
  • acknowledged
  • last_status_change
  • tries
  • last_check
  • information
  • monitoring_server_name
  • status_types

Only for searching:


  • h.name
  • h.alias
  • h.address
  • h.fqdn
  • s.description
Authorizations:
TokenCookie
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

types
string^\["[^"]+"(,"[^"]+")*\]$
Example: types=["host"]

Filter the resources by type

states
string^\["[^"]+"(,"[^"]+")*\]$
Example: states=["in_downtime", "acknowledged"]

Filter the resources by state

statuses
string^\["[^"]+"(,"[^"]+")*\]$
Example: statuses=["OK", "UP", "PENDING"]

Filter the resources by status

hostgroup_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: hostgroup_names=["ESX-Paris", "ESX-London"]

Filter the resources by host group names

servicegroup_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: servicegroup_names=["Memory-Services", "Ping-Services"]

Filter the resources by service group names

service_category_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: service_category_names=["Ping", "CPUs"]

Filter the resources by service category names

host_category_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: host_category_names=["Linux", "Windows"]

Filter the resources by host category names

host_severity_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: host_severity_names=["Linux", "Windows"]

Filter the resources by host severity names

service_severity_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: service_severity_names=["Ping", "CPUs"]

Filter the resources by service severity names

host_severity_levels
string^\[\d+(,\d+)*\]$
Example: host_severity_levels=[50, 75]

Filter the resources by host severity levels

service_severity_levels
string^\[\d+(,\d+)*\]$
Example: service_severity_levels=[50, 75]

Filter the resources by service severity levels

monitoring_server_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: monitoring_server_names=["Central", "Remote-Server-Paris", "Poller-Lyon"]

Filter the resources by monitoring server names

status_types
string^\["[^"]+"(,"[^"]+")*\]$
Example: status_types=["soft"]

Filter the resources by status types

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Get a Host resource type detail

Return the full detail of a resource typed Host.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Responses

Response samples

Content type
application/json
null

Get a Service resource type detail

Return the full detail of a resource typed Service.

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Responses

Response samples

Content type
application/json
null

Count hosts by status

Count hosts by their status (UP/DOWN/UNREACHABLE/PENDING)

The available parameters to search / sort_by are:

  • name
Authorizations:
TokenCookie
query Parameters
hostgroup_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: hostgroup_names=["ESX-Paris", "ESX-London"]

Filter the resources by host group names

host_category_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: host_category_names=["Linux", "Windows"]

Filter the resources by host category names

Responses

Response samples

Content type
application/json
{
  • "up": {
    },
  • "down": {
    },
  • "unreachable": {
    },
  • "pending": {
    },
  • "total": null
}

Count hosts by status

Count hosts by their status (UP/DOWN/UNREACHABLE/PENDING)

The available parameters to search / sort_by are:

  • name
Authorizations:
TokenCookie
query Parameters
hostgroup_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: hostgroup_names=["ESX-Paris", "ESX-London"]

Filter the resources by host group names

host_category_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: host_category_names=["Linux", "Windows"]

Filter the resources by host category names

servicegroup_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: servicegroup_names=["Memory-Services", "Ping-Services"]

Filter the resources by service group names

service_category_names
string^\["[^"]+"(,"[^"]+")*\]$
Example: service_category_names=["Ping", "CPUs"]

Filter the resources by service category names

Responses

Response samples

Content type
application/json
{
  • "critical": {
    },
  • "unknown": {
    },
  • "ok": {
    },
  • "down": {
    },
  • "pending": {
    },
  • "total": null
}

Access Control

List access groups

List access groups available for a user

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

User filters

Add user filter

internal

Since Centreon web 20.04.6

Add user filter for a given page.

Authorizations:
TokenCookie
path Parameters
page_name
required
string
Example: events-view

name of the page. Currently only 'events-view' is allowed.

Request Body schema: application/json
required
name
string

filter name

criterias
Array of objects

list of filter criterias

Responses

Request samples

Content type
application/json
{
  • "name": "my filter 1",
  • "criterias": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Update user filter

internal

Since Centreon web 20.04.6

Update user filter for a given page.

Authorizations:
TokenCookie
path Parameters
page_name
required
string
Example: events-view

name of the page. Currently only 'events-view' is allowed.

filter_id
required
integer <int64>
Example: 1

id of the filter

Request Body schema: application/json
required
id
integer

filter id

name
required
string

filter name

criterias
required
Array of objects

list of filter criterias

order
integer

filter order

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Patch user filter

internal

Since Centreon web 20.04.6

Patch user filter order for a given page.

Authorizations:
TokenCookie
path Parameters
page_name
required
string
Example: events-view

name of the page. Currently only 'events-view' is allowed.

filter_id
required
integer <int64>
Example: 1

id of the filter

Request Body schema: application/json
required
order
required
integer

filter order

Responses

Request samples

Content type
application/json
{
  • "order": 1
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Delete user filter

internal

Since Centreon web 20.04.6

Delete user filter for a given page.

Authorizations:
TokenCookie
path Parameters
page_name
required
string
Example: events-view

name of the page. Currently only 'events-view' is allowed.

filter_id
required
integer <int64>
Example: 1

id of the filter

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Check

Check multiple hosts

Authorizations:
TokenCookie
Request Body schema: application/json
required
Array
is_forced
boolean

Indicates whether the check is forced (do not take into account the check timeperiod)

resource_id
integer <int64>

ID of the resource

parent_resource_id
integer or null <int64>

ID of the parent resource (eg: host id)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Check multiple services

Authorizations:
TokenCookie
Request Body schema: application/json
required
Array
is_forced
boolean

Indicates whether the check is forced (do not take into account the check timeperiod)

resource_id
integer <int64>

ID of the resource

parent_resource_id
integer or null <int64>

ID of the parent resource (eg: host id)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Check host

Schedule immediate check on chosen host

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Request Body schema: application/json
required
is_forced
boolean

Indicates whether the check is forced (do not take into account the check timeperiod)

Responses

Request samples

Content type
application/json
{
  • "is_forced": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Check service

Schedule immediate check on chosen service

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Request Body schema: application/json
required
is_forced
boolean

Indicates whether the check is forced (do not take into account the check timeperiod)

Responses

Request samples

Content type
application/json
{
  • "is_forced": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Check metaservice

Schedule immediate check on chosen metaservice

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Request Body schema: application/json
required
is_forced
boolean

Indicates whether the check is forced (do not take into account the check timeperiod)

Responses

Request samples

Content type
application/json
{
  • "is_forced": true
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Check resources

Schedule immediate check on chosen resources

Authorizations:
TokenCookie
Request Body schema: application/json
required
object
Array of objects

Responses

Request samples

Content type
application/json
{
  • "check": {
    },
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Submit

Submit a result to a single host

Submit a result (check status, output and perfdata) to a single host

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Request Body schema: application/json
required
status
required
integer
Enum: 0 1 2

Host status code that can be submitted

  • 0 - UP
  • 1 - DOWN
  • 2 - UNREACHABLE
output
string or null

Output result of the check sent

performance_data
string or null

Performance data result of the check sent

Responses

Request samples

Content type
application/json
{
  • "status": 1,
  • "output": "CRITICAL: Connection lost",
  • "performance_data": "'nbproc'=0;;1:1;0;"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Submit a result to a single service

Submit a result (check status, output and perfdata) to a single service

Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Request Body schema: application/json
required
status
required
string
Enum: 0 1 2 3

Service status code that can be submitted

  • 0 - OK
  • 1 - WARNING
  • 2 - CRITICAL
  • 3 - UNKNOWN
output
string or null

Output result of the check sent

performance_data
string or null

Performance data result of the check sent

Responses

Request samples

Content type
application/json
{
  • "status": 2,
  • "output": "CRITICAL: Memory exceeded ",
  • "performance_data": "'used'=453849088B;;;0;1927262208"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Submit a result to a single metaservice

Submit a result (check status, output and perfdata) to a single metaservice

Authorizations:
TokenCookie
path Parameters
meta_id
required
integer <int64>
Example: 1

ID of the meta service

Request Body schema: application/json
required
status
required
string
Enum: 0 1 2 3

Service status code that can be submitted

  • 0 - OK
  • 1 - WARNING
  • 2 - CRITICAL
  • 3 - UNKNOWN
output
string or null

Output result of the check sent

performance_data
string or null

Performance data result of the check sent

Responses

Request samples

Content type
application/json
{
  • "status": 2,
  • "output": "CRITICAL: Memory exceeded ",
  • "performance_data": "'used'=453849088B;;;0;1927262208"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Submit result to resources

Submit a result (check status, output and perfdata) to resources

Authorizations:
TokenCookie
Request Body schema: application/json
required
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Comment

Add comment to resources

Add at least one comment to a single or to multiple resources

Authorizations:
TokenCookie
Request Body schema: application/json
required
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

Timeline

Get host timeline

List all events for a given host

The available parameters to search / sort_by are:

  • type
  • content
  • date
Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Get service timeline

List all events for a given service

The available parameters to search / sort_by are:

  • type
  • content
  • date
Authorizations:
TokenCookie
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per pages

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulted data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Platform

Update a platform information

Authorizations:
TokenCookie
Request Body schema: application/json
required
platformName
string

The name of the platform

isRemote
boolean

Platform is a remote server

address
string

The address of the platform

centralServerAddress
string

Central linked address

apiUsername
string

Api Username

apiCredentials
string

Api Password

apiScheme
string

Protocol

apiPort
integer

Port used by the API

apiPath
string

name of your API root folder

peerValidation
boolean

Usage of peer validation

object

Responses

Request samples

Content type
application/json
{
  • "platformName": "string",
  • "isRemote": true,
  • "address": "10.0.0.1",
  • "centralServerAddress": "192.168.0.1",
  • "apiUsername": "admin",
  • "apiCredentials": "centreon",
  • "apiScheme": "http",
  • "apiPort": "80",
  • "apiPath": "centreon",
  • "peerValidation": false,
  • "proxy": {
    }
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}

List feature flags

List feature flags

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "is_cloud_platform": true,
  • "feature_flags": {
    }
}

List versions of web, widgets and modules

List versions of web, widgets and modules

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "web": {
    },
  • "widgets": {
    },
  • "modules": {
    }
}

Fully update the platform

Update Centreon web component and installed modules / widgets

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "Internal Server Error"
}

Get centreon web versions

Get installation status and available versions of centreon web

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "is_installed": true,
  • "has_upgrade_available": true
}

Authentication token

Find all API authentication tokens

Return all API authentication tokens.

The available parameters to search / sort_by are:

  • token_name
  • user.id
  • user.name
  • creator.id
  • creator.name
  • creation_date
  • expiration_date
  • is_revoked
Authorizations:
TokenCookie
query Parameters
limit
integer >= 1
Default: 10
Example: limit=20

Number of items per page

page
integer >= 1
Default: 1
Example: page=4

Number of the requested page

search
string

Retrieve only data matching the defined search value. A simple search can be done like in the following example search={"host.name":"Central"} A complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in
  • $rg → regex

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
sort_by
string
Example: sort_by={"host.name":"ASC"}

Sort the resulting data by its properties

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an API authentication token

Add an API authentication token

Authorizations:
TokenCookie
Request Body schema: application/json
required
name
required
string

Token name

user_id
required
integer

User ID linked to the API authentication token

expiration_date
required
string <date-time>

Expiration date of the API authentication token

Responses

Request samples

Content type
application/json
{
  • "name": "my-api-token",
  • "user_id": 23,
  • "expiration_date": "2023-08-31T15:46:00+02:00"
}

Response samples

Content type
application/json
{
  • "name": "my-api-token",
  • "token": "xxxxxxx",
  • "user": {
    },
  • "creator": {
    },
  • "creation_date": "2023-08-31T15:46:00+02:00",
  • "expiration_date": "2024-08-31T00:00:00+00:00",
  • "is_revoked": false
}

Delete an API token

Delete an API token

Authorizations:
TokenCookie
path Parameters
token_name
required
string
Example: my-token-name

token name

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Delete an API token

Delete an API token

Authorizations:
TokenCookie
path Parameters
token_name
required
string
Example: my-token-name

token name

user_id
required
integer >= 1
Example: 1

User ID linked to the token

Responses

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Property 'name' not found"
}