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

Endpoints to manage acknowledgements

List all acknowledgements

List all acknowledgements (host and service).

Minimum API version: 21.10

The available parameters to search / sort_by are:

  • id
  • author_id
  • comment
  • entry_time
  • deletion_time
  • host_id
  • service_id
  • service.display_name
  • is_notify_contacts
  • is_persistent_comment
  • is_sticky
  • poller_id
  • state
  • type
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

Remove/cancel acknowledgements on multiple resources (hosts and/or services) at once.

Minimum API version: 21.10

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 by its ID.

Minimum API version: 21.10

Returns either a host or service acknowledgement depending on the resource type.

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

List all host acknowledgements.

Minimum API version: 21.10

The available parameters to search / sort_by are:

  • id
  • author_id
  • comment
  • entry_time
  • deletion_time
  • host_id
  • is_notify_contacts
  • is_persistent_comment
  • is_sticky
  • poller_id
  • state
  • type
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

Add an acknowledgement on multiple hosts at once.

Minimum API version: 21.10

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

List all service acknowledgements.

Minimum API version: 21.10

The available parameters to search / sort_by are:

  • id
  • author_id
  • comment
  • entry_time
  • deletion_time
  • host_id
  • service_id
  • service.display_name
  • is_notify_contacts
  • is_persistent_comment
  • is_sticky
  • poller_id
  • state
  • type
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

Add an acknowledgement on multiple services at once.

Minimum API version: 21.10

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

List all acknowledgements for a specific host.

Minimum API version: 21.10

The available parameters to search / sort_by are:

  • id
  • author_id
  • comment
  • entry_time
  • deletion_time
  • host_id
  • is_notify_contacts
  • is_persistent_comment
  • is_sticky
  • poller_id
  • state
  • type
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

Add an acknowledgement on a specific host.

Minimum API version: 21.10

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

Remove/cancel the current acknowledgement on a host.

Minimum API version: 21.10

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

List all acknowledgements for a specific service.

Minimum API version: 21.10

The available parameters to search / sort_by are:

  • id
  • author_id
  • comment
  • entry_time
  • deletion_time
  • host_id
  • service_id
  • service.display_name
  • is_notify_contacts
  • is_persistent_comment
  • is_sticky
  • poller_id
  • state
  • type
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

Add an acknowledgement on a specific service.

Minimum API version: 21.10

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

Remove/cancel the current acknowledgement on a service.

Minimum API version: 21.10

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

List all acknowledgements for a specific metaservice.

Minimum API version: 21.10

The available parameters to search / sort_by are:

  • id
  • author_id
  • comment
  • entry_time
  • deletion_time
  • host_id
  • service_id
  • service.display_name
  • is_notify_contacts
  • is_persistent_comment
  • is_sticky
  • poller_id
  • state
  • type
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

Add an acknowledgement on a specific metaservice.

Minimum API version: 21.10

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

Remove/cancel the current acknowledgement on a metaservice.

Minimum API version: 21.10

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

Add acknowledgements on multiple resources (hosts and/or services) at once.

Minimum API version: 21.10

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

Endpoints to manage administration tasks

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",
  • "requested_authn_context": false,
  • "requested_authn_context_comparison": "minimum",
  • "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
requested_authn_context
required
boolean
Default: false

Specifies the authentication context requirements of authentication statements returned in response to a request or query. The default is false.

requested_authn_context_comparison
string
Default: "exact"
Enum: "minimum" "exact" "better" "maximum"

Specifies the comparison method used to evaluate the requested context classes or statements, one of "exact", "minimum", "maximum", or "better". The default is "exact".

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",
  • "requested_authn_context": false,
  • "requested_authn_context_comparison": "minimum",
  • "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
}

Update or create vault configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
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
{
  • "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"
}

Delete vault configuration

Authorizations:
TokenCookie

Responses

Response samples

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

Get vault configuration details

Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "address": "127.0.0.1",
  • "port": 8200,
  • "root_path": "centreon"
}

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

Resource 'Command' operations.

Retrieves the collection of Command resources.

Retrieves the collection of Command resources.

Authorizations:
TokenCookie
query Parameters
name
Array of strings

Filter commands by name (partial or exact match)

type
Array of strings
Items Enum: "Check" "Notification" "Miscellaneous" "Discovery"

Filter commands by type. Multiple values can be provided using type[]=Check&type[]=Notification

is_activated
boolean

Filter commands by activation status

is_from_monitoring_connector
boolean

Filter commands by whether they are from a monitoring connector

page
integer
Default: 1

The collection page number

itemsPerPage
integer [ 0 .. 30 ]
Default: 30

The number of items per page

Responses

Response samples

Content type
{
  • "totalItems": 0,
  • "search": {
    },
  • "view": {
    },
  • "member": [
    ]
}

Creates a Command resource.

Creates a Command resource.

Authorizations:
TokenCookie
Request Body schema:
required

The new Command resource

name
string [ 1 .. 255 ] characters ^(.*(^[^~!$%^&*"|'<>?,()=]+$).*)$

The command name

type
string
Enum: "Check" "Notification" "Miscellaneous" "Discovery"

The type of command (1: notification, 2: check, 3: Miscellaneous, 4: Discovery)

command_line
string [ 1 .. 65535 ] characters

The command line used to execute the command

is_shell_enabled
boolean

Indicates whether the command can be executed through a shell

connector
string or null <iri-reference>
comment
string or null

Additional information about the command

Responses

Request samples

Content type
{
  • "name": "check_http",
  • "type": "Check",
  • "command_line": "$USER1$/check_http -H $ARG1$ -w $ARG2$ -c $ARG3$",
  • "is_shell_enabled": true,
  • "connector": "https://example.com/",
  • "comment": "This command is used to check the HTTP service"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "name": "check_http",
  • "type": "Check",
  • "command_line": "$USER1$/check_http -H $ARG1$ -w $ARG2$ -c $ARG3$",
  • "is_shell_enabled": true,
  • "connector": "https://example.com/",
  • "comment": "This command is used to check the HTTP service"
}

Retrieves a Command resource.

Retrieves a Command resource.

Authorizations:
TokenCookie
path Parameters
id
required
string

Command identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": 0,
  • "name": "check_http",
  • "type": "Check",
  • "command_line": "$USER1$/check_http -H $ARG1$ -w $ARG2$ -c $ARG3$",
  • "is_shell_enabled": true,
  • "is_activated": true,
  • "is_from_monitoring_connector": true,
  • "connector": {
    },
  • "comment": "This command is used to check the HTTP service"
}

Removes the Command resource.

Removes the Command resource.

Authorizations:
TokenCookie
path Parameters
id
required
string

Command identifier

Responses

Updates the Command resource.

Updates the Command resource.

Authorizations:
TokenCookie
path Parameters
id
required
string

Command identifier

Request Body schema: application/merge-patch+json
required

The updated Command resource

id
integer
name
string [ 1 .. 255 ] characters ^(.*(^[^~!$%^&*"|'<>?,()=]+$).*)$

The command name

type
string
Enum: "Check" "Notification" "Miscellaneous" "Discovery"

The type of command (1: notification, 2: check, 3: Miscellaneous, 4: Discovery)

command_line
string [ 1 .. 65535 ] characters

The command line used to execute the command

is_shell_enabled
boolean

Indicates whether the command can be executed through a shell

is_activated
boolean

Indicates whether the command is activated or not

is_from_monitoring_connector
boolean

Indicates whether the command comes from a monitoring connector

object

Connectors are run in background and execute specific commands without the need to execute a binary, thus enhancing performance

comment
string or null

Additional information about the command

Responses

Request samples

Content type
application/merge-patch+json
{
  • "id": 0,
  • "name": "check_http",
  • "type": "Check",
  • "command_line": "$USER1$/check_http -H $ARG1$ -w $ARG2$ -c $ARG3$",
  • "is_shell_enabled": true,
  • "is_activated": true,
  • "is_from_monitoring_connector": true,
  • "connector": {
    },
  • "comment": "This command is used to check the HTTP service"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": 0,
  • "name": "check_http",
  • "type": "Check",
  • "command_line": "$USER1$/check_http -H $ARG1$ -w $ARG2$ -c $ARG3$",
  • "is_shell_enabled": true,
  • "is_activated": true,
  • "is_from_monitoring_connector": true,
  • "connector": {
    },
  • "comment": "This command is used to check the HTTP service"
}

Duplicate a Command resource

Duplicate a Command resource

Authorizations:
TokenCookie
Request Body schema:
required

The new Command resource

ids
required
Array of integers

Responses

Request samples

Content type
{
  • "ids": [
    ]
}

Response samples

Content type
application/ld+json
{
  • "@context": "/centreon/api/latest/contexts/Command",
  • "@id": "/centreon/api/latest/.well-known/genid/b69ebebaa3bb3de34dd8",
  • "@type": "Collection",
  • "totalItems": 2,
  • "member": [
    ]
}

Contact group

Endpoints to manage contact groups

List contact groups

Return all contact groups.

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • type
  • comments
  • 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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": {
    }
}

Downtime

Endpoints to manage downtimes

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
  • service.id
  • service.display_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
  • 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 a 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 a 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
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 metaservice.

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
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

Endpoints to manage 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
{
  • "message": "Logs found",
  • "token": "string",
  • "data": [
    ]
}

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

Endpoints to manage hosts

Get a host

Get an existing host. 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

Responses

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_version": "2c",
  • "snmp_community": "public",
  • "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": [
    ]
}

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": 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": [
    ]
}

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": 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": [
    ]
}

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_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": {
    }
}

Count hosts by status

Count hosts by their status (UP/DOWN/UNREACHABLE/PENDING)

The available parameters to search / sort_by are:

  • name
  • status
  • service.name
  • service.id
  • host_category.name
  • host_category.id
  • host_group.name
  • host_group.id
  • service_group.name
  • service_group.id
  • service_category.name
  • service_category.id
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "up": {
    },
  • "down": {
    },
  • "unreachable": {
    },
  • "pending": {
    },
  • "total": 0
}

Host category

Endpoints to manage host categories

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"
}

List all real-time host categories

List of all host categories in real-time context

The available parameters to search / sort_by are:

  • id
  • name
  • host_group.id
  • host_group.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": {
    }
}

Host group

Endpoints to manage host groups

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

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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 host group

Add a new host group configuration.

Mandatory body properties are:

  • name

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

icon_id
integer or null

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

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 host group

hosts
Array of integers or null

Hosts linked to this host group

Responses

Request samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "icon_id": 1,
  • "geo_coords": "48.51,2.20",
  • "comment": "string",
  • "hosts": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "icon": {
    },
  • "geo_coords": "48.51,2.20",
  • "comment": "string",
  • "hosts": [
    ]
}

Get a host group

Get an existing 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 >= 1
Example: 1

Host group ID

Responses

Response samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "icon": {
    },
  • "geo_coords": "string",
  • "comment": "string",
  • "is_activated": true,
  • "hosts": [
    ]
}

Delete a host group

Delete host group.

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

Host group ID

Responses

Response samples

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

Update a host group

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 >= 1
Example: 1

Host group ID

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

Host group name

alias
string or null <= 200 characters

Host group alias

icon_id
integer or null

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

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 host group

hosts
Array of integers or null

Hosts linked to this host group

Responses

Request samples

Content type
application/json
{
  • "name": "MySQL-Servers",
  • "alias": "All MySQL Servers",
  • "icon_id": 1,
  • "geo_coords": "48.51,2.20",
  • "comment": "string",
  • "hosts": [
    ]
}

Response samples

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

Delete multiple host groups

Delete multiple host groups from configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
ids
required
Array of integers

List of host group IDs to delete

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
[]

enable/disable multiple host groups

enable/disable multiple host groups from configuration

Authorizations:
TokenCookie
query Parameters
action
required
string
Enum: "_enable" "_disable"

Action to enable or disable host group

Request Body schema: application/json
required
ids
required
Array of integers

List of host group IDs to enable/disable

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
[]

enable/disable multiple host groups

enable/disable multiple host groups from configuration

Authorizations:
TokenCookie
query Parameters
action
required
string
Enum: "_enable" "_disable"

Action to enable or disable host group

Request Body schema: application/json
required
ids
required
Array of integers

List of host group IDs to enable/disable

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
[]

Duplicate multiple host groups

Duplicate multiple host groups from configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
ids
required
Array of integers

List of host group IDs to duplicate

nb_duplicates
required
integer

Number of duplicates to create

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ],
  • "nb_duplicates": 3
}

Response samples

Content type
application/json
[]

List all host groups by host id

List all the host groups in real-time monitoring for a specific host.

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_category.id
  • host_category.name
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": {
    }
}

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_category.id
  • host_category.name
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

Endpoints to manage meta services

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

List all acknowledgements for a specific metaservice.

Minimum API version: 21.10

The available parameters to search / sort_by are:

  • id
  • author_id
  • comment
  • entry_time
  • deletion_time
  • host_id
  • service_id
  • service.display_name
  • is_notify_contacts
  • is_persistent_comment
  • is_sticky
  • poller_id
  • state
  • type
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

Add an acknowledgement on a specific metaservice.

Minimum API version: 21.10

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

Remove/cancel the current acknowledgement on a metaservice.

Minimum API version: 21.10

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"
}

List all downtimes of a metaservice

List all downtimes of a metaservice.

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
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"
}

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
path Parameters
host_severity_id
required
integer <int64>
Example: 1

ID of existing host severity configuration

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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_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

Request samples

Content type
multipart/form-data
Content-Type: multipart/form-data; boundary=abcde12345

--abcde12345
Content-Disposition: form-data; name="directory"

dashboard
--abcde12345
Content-Disposition: form-data; name="data"; filename="img.png"
Content-Type: image/png

[file content (in binary string) goes there]
--abcde12345--

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
  • name
  • 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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": {
    }
}

Find all image folders

Return all image folders (created on file system and synchronized in database).

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • comment
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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": {
    }
}

Update the media content on the file system

Updates on the file system the contents of the file linked to the provided media ID

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

Media ID

Request Body schema: multipart/form-data
required
data
required
string <binary>

File content

Responses

Request samples

Content type
multipart/form-data
Content-Type: multipart/form-data; boundary=abcde12345

--abcde12345
Content-Disposition: form-data; name="data"; filename="img.png"
Content-Type: image/png

[file content (in binary string) goes there]
--abcde12345--

Response samples

Content type
application/json
{
  • "id": 1,
  • "filename": "centreon_logo.jpg",
  • "directory": "logos",
  • "md5": "f7d5fc06a33946703054046c7174bbf4"
}

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

Add services to a host based on associated host template

Add services to a host based on associated host template

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

Host ID

Responses

Response samples

Content type
application/json
{
  • "services": [
    ]
}

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

IDs of service categories linked to this service.

service_groups
Array of integers

IDs of service groups linked to this service.

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

IDs of service categories linked to this service.

service_groups
Array of integers

IDs of service groups linked to this service.

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": {
    }
}

Delete multiple services

Delete multiple services from configuration

Authorizations:
TokenCookie
Request Body schema: application/json
required
ids
required
Array of integers

List of service IDs to delete

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
[]

Count services by status

Count services by their status (OK/WARNING/CRITICAL/UNKNOWN/PENDING)

The available parameters to search / sort_by are:

  • name
  • status
  • host.name
  • host.id
  • host_category.name
  • host_category.id
  • host_group.name
  • host_group.id
  • service_group.name
  • service_group.id
  • service_category.name
  • service_category.id
Authorizations:
TokenCookie

Responses

Response samples

Content type
application/json
{
  • "critical": {
    },
  • "unknown": {
    },
  • "ok": {
    },
  • "down": {
    },
  • "pending": {
    },
  • "total": 0
}

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 all services unique names

List all the services in real-time monitoring.

The available parameters to search / sort_by are:

  • name
  • host.id
  • host.name
  • host_group.id
  • host_group.name
  • host_category.id
  • host_category.name
  • service_group.id
  • service_group.name
  • service_category.id
  • service_category.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": {
    }
}

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
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 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 service 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.id
  • service.name
  • service.display_name
  • host_group.id
  • host_group.name
  • host_category.id
  • host_category.name
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

Endpoints to manage service categories

List all service categories

Return all 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
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": {
    }
}

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 service categories

List of all service categories in real-time context

The available parameters to search / sort_by are:

  • id
  • name
  • host.id
  • host.name
  • host_group.id
  • host_group.name
  • host_category.id
  • host_category.name
  • service_group.id
  • service_group.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": {
    }
}

Severity

Endpoints to manage severities

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

Endpoints to manage time periods

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

Time period name.

alias
string

Time period alias.

Array of objects (Day)
templates
Array of integers
Array of objects (ExtraTimePeriod)

Responses

Request samples

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

Response samples

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

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

Endpoints to manage topologies

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"
}

GlobalMacroResource

ListPlugins

ServiceCategory

StandardMacroResource

ConnectorResource

Connector

Resource 'Connector' operations.

Retrieves the collection of Connector resources.

Retrieves the collection of Connector resources.

Authorizations:
TokenCookie
query Parameters
id[lk]
Array of integers

Filter by id using "like" operator

id[eq]
Array of integers

Filter by id using "equals" operator

name[lk]
Array of strings

Filter by name using "like" operator

name[eq]
Array of strings

Filter by name using "equals" operator

page
integer
Default: 1

The collection page number

itemsPerPage
integer [ 0 .. 30 ]
Default: 30

The number of items per page

Responses

Response samples

Content type
{
  • "totalItems": 0,
  • "search": {
    },
  • "view": {
    },
  • "member": [
    ]
}

Retrieves a Connector resource.

Retrieves a Connector resource.

Authorizations:
TokenCookie
path Parameters
id
required
string

Connector identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": 0,
  • "name": "Perl Connector",
  • "command_line": "centreon_connector_ssh --log-file=/var/log/centreon-engine/connector-ssh.log",
  • "description": "Connector using SSH to connect to remote hosts",
  • "is_activated": true
}

Plugin

Resource 'Plugin' operations.

Retrieves a Plugin resource.

Retrieves a Plugin resource.

Authorizations:
TokenCookie
path Parameters
plugin_name
required
string

Plugin identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "name": "negate",
  • "command_line": "/usr/lib64/nagios/plugins/negate",
  • "description": "This is the help description of the plugin."
}

Agent Configuration

Resource 'Agent Configuration' operations.

Add a poller/agent configuration

Add a poller/agent configuration

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

Configuration name.

type
required
string
Enum: "telegraf" "centreon-agent"

Type of agent configuration.

connection_mode
string
Default: "secure"
Enum: "secure" "no-tls" "insecure"

Connection mode for the configuration.

poller_ids
required
Array of integers

Poller ID(s) associated with the configuration.

required
Configuration for `centreon-agent` (object) or Configuration for `telegraf` (object)

Configuration parameters, varies depending on the type.

Responses

Request samples

Content type
application/json
{
  • "name": "my-cfg-name",
  • "type": "centreon-agent",
  • "connection_mode": "secure",
  • "poller_ids": [
    ],
  • "configuration": {
    }
}

Response samples

Content type
application/json
{
  • "id": 4,
  • "name": "my-cfg-name",
  • "type": "centreon-agent",
  • "connection_mode": "secure",
  • "pollers": [
    ],
  • "configuration": {
    }
}

Get all poller/agent configurations

Get all poller/agent configurations

Authorizations:
TokenCookie

Responses

Response samples

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

Delete a poller/agent configuration

Delete a poller/agent configuration

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

Poller/agent configuration ID

Responses

Response samples

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

Update a poller/agent configuration

Update a poller/agent configuration

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

Poller/agent configuration ID

Request Body schema: application/json
required
name
required
string

Configuration name.

connection_mode
string
Default: "secure"
Enum: "secure" "no-tls" "insecure"

Connection mode for the configuration.

Supported values:

  • secure
  • no-tls
  • insecure
poller_ids
Array of integers

List of poller IDs associated with this configuration.

required
Configuration for `centreon-agent` (object) or Configuration for `telegraf` (object)

Configuration parameters, varies depending on the type.

Responses

Request samples

Content type
application/json
{
  • "name": "my-cfg-name",
  • "connection_mode": "secure",
  • "poller_ids": [
    ],
  • "configuration": {
    }
}

Response samples

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

Get a poller/agent configuration

Get a poller/agent configuration

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

Poller/agent configuration ID

Responses

Response samples

Content type
application/json
{
  • "id": 4,
  • "name": "my-cfg-name",
  • "type": "telegraf",
  • "connection_mode": "no-tls",
  • "pollers": [
    ],
  • "configuration": {
    }
}

Delete a poller/agent configuration's link to a poller

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

Poller/agent configuration ID

poller_id
required
integer >= 1
Example: 1

Poller ID

Responses

Response samples

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

Retrieves a InstallationCommandResource resource.

Retrieves a InstallationCommandResource resource.

Authorizations:
TokenCookie
path Parameters
pollerId
required
string

InstallationCommandResource identifier

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "windows_installation_command": "curl -fsSL https://raw.githubusercontent.com/centreon/centreon-collect/refs/tags/[PF_VERSION]-latest/agent/installer/install_cma.ps1 -o install_cma.ps1 ; .\\install_cma.ps1 -endpoint \"[DNS]:[PORT]\" -fingerprint \"[certificate_sha]\" -commonname \"[certificate_cn]\"",
  • "linux_installation_command": "curl -fsSL https://raw.githubusercontent.com/centreon/centreon-collect/refs/tags/[PF_VERSION]-latest/agent/installer/scripts_linux/install_cma.sh -o install_cma.sh && sudo chmod +x install_cma.sh && sudo ./install_cma.sh -e \"[poller IP/DNS]:[PORT]\" -f \"[centreon_storage.instances.cma_certificate_sha]\" -N \"[centreon_storage.cma_certificate_cn]\""
}

Global Macro

Resource 'Global Macro' operations.

Retrieves the collection of GlobalMacro resources.

Retrieves the collection of GlobalMacro resources.

Authorizations:
TokenCookie
query Parameters
name[lk]
Array of strings

Filter by name using "like" operator

name[eq]
Array of strings

Filter by name using "equals" operator

page
integer
Default: 1

The collection page number

itemsPerPage
integer [ 0 .. 30 ]
Default: 30

The number of items per page

Responses

Response samples

Content type
{
  • "totalItems": 0,
  • "search": {
    },
  • "view": {
    },
  • "member": [
    ]
}

Plugins

Resource 'Plugins' operations.

Retrieves the collection of Plugins resources.

Retrieves the collection of Plugins resources.

Authorizations:
TokenCookie
query Parameters
page
integer
Default: 1

The collection page number

itemsPerPage
integer [ 0 .. 30 ]
Default: 30

The number of items per page

Responses

Response samples

Content type
{
  • "totalItems": 0,
  • "search": {
    },
  • "view": {
    },
  • "member": [
    ]
}

Service Category

Resource 'Service Category' operations.

Creates a ServiceCategory resource.

Creates a ServiceCategory resource.

Authorizations:
TokenCookie
Request Body schema:
required

The new ServiceCategory resource

name
string [ 1 .. 255 ] characters
alias
string [ 1 .. 255 ] characters
id
integer or null
is_activated
boolean

Responses

Request samples

Content type
{
  • "name": "string",
  • "alias": "string",
  • "id": 0,
  • "is_activated": true
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "name": "string",
  • "alias": "string",
  • "id": 0,
  • "is_activated": true
}

Standard Macro

Resource 'Standard Macro' operations.

Retrieves the collection of StandardMacro resources.

Retrieves the collection of StandardMacro resources.

Authorizations:
TokenCookie
query Parameters
name[lk]
Array of strings

Filter by name using "like" operator

name[eq]
Array of strings

Filter by name using "equals" operator

page
integer
Default: 1

The collection page number

itemsPerPage
integer [ 0 .. 30 ]
Default: 30

The number of items per page

Responses

Response samples

Content type
{
  • "totalItems": 0,
  • "search": {
    },
  • "view": {
    },
  • "member": [
    ]
}

Poller

Resource 'Poller' operations.

Creates a Poller resource.

Creates a Poller resource.

Authorizations:
TokenCookie
Request Body schema:
required

The new Poller resource

name
string [ 1 .. 40 ] characters
poller_type
string
Enum: "vm" "docker"
address
string [ 1 .. 255 ] characters
poller_token_name
required
string [ 1 .. 255 ] characters
central_address
required
string [ 1 .. 255 ] characters

Responses

Request samples

Content type
{
  • "name": "string",
  • "poller_type": "vm",
  • "address": "string",
  • "poller_token_name": "string",
  • "central_address": "string"
}

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "name": "string",
  • "poller_type": "string",
  • "address": "string",
  • "central_address": "string",
  • "id": 0,
  • "uid": "string",
  • "installation_command": "curl -fsSL <central_url>/poller/install.sh | bash -s -- --poller_token <token> --uid <uid> --name <name> --type <vm|docker> --central_url <central_url> --appsecret <app_secret> --salt <salt>"
}

Retrieves a poller installation command

Retrieves a poller installation command

Authorizations:
TokenCookie
path Parameters
id
required
integer

Id of the poller for which to generate the installation command.

query Parameters
token-name
string

Name of the poller token to embed in the installation command. When omitted, the first valid poller token is used.

Responses

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "installation_command": "curl -fsSL <central_url>/poller/install.sh | bash -s -- --poller_token <token> --uid <uid> --name <name> --type <vm|docker> --central_url <central_url> --appsecret <app_secret> --salt <salt>"
}

Upgrade

Resource 'Upgrade' operations.

Creates a Upgrade resource.

Creates a Upgrade resource.

Authorizations:
TokenCookie
Request Body schema:
required

The new Upgrade resource

object (Upgrade)

Responses

Request samples

Content type
{ }

Response samples

Content type
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string"
}

Additional Connector Configuration

Add an Additional Connector Configuration (ACC)

Add an Additional Connector Configuration (ACC)

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

ACC name

description
string

A short ACC description

type
required
string

Type of ACC

Supported ACC types:

  • vmware_v6
pollers
required
Array of integers

Poller ID(s) associated with the ACC

parameters
required
object

Configuration parameters, varies depending on the ACC type.

Responses

Request samples

Content type
application/json
{
  • "name": "my-acc-name",
  • "description": "some description",
  • "type": "vmware_v6",
  • "pollers": [
    ],
  • "parameters": {
    }
}

Response samples

Content type
application/json
{
  • "id": 4,
  • "name": "my-acc-name",
  • "description": "some description",
  • "type": "vmware_v6",
  • "pollers": [
    ],
  • "parameters": {
    },
  • "created_by": {
    },
  • "created_at": "2019-08-24T14:15:22Z"
}

List Additional Connector Configurations (ACC)

Return all ACCs.

The available parameters to search / sort_by are:

  • name
  • type
  • poller.id
  • poller.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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": {
    }
}

Delete an Additional Connector Configuration (ACC)

Delete an Additional Connector Configuration (ACC)

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

Additional Connector Configuration ID

Responses

Response samples

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

Find an Additional Connector Configuration (ACC)

Find an Additional Connector Configuration (ACC)

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

Additional Connector Configuration ID

Responses

Response samples

Content type
application/json
{
  • "id": 4,
  • "name": "my-acc-name",
  • "description": "some description",
  • "type": "vmware_v6",
  • "pollers": [
    ],
  • "parameters": {
    },
  • "created_by": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_by": {
    },
  • "updated_at": "2019-08-24T14:15:22Z"
}

Update an Additional Connector Configuration (ACC)

Update an Additional Connector Configuration (ACC)

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

Additional Connector Configuration ID

Request Body schema: application/json
required
name
required
string

ACC name

description
string

A short ACC description

type
required
string

Type of ACC

Supported ACC types:

  • vmware_v6
pollers
required
Array of integers

Poller ID(s) associated with the ACC

parameters
required
object

Configuration parameters, varies depending on the ACC type. If password does not change, replace value by null. If adding a new vcenter, id must be null. When updating an existing vcenter, id must be provided.

Responses

Request samples

Content type
application/json
{
  • "name": "my-acc-name",
  • "description": "some description",
  • "type": "vmware_v6",
  • "pollers": [
    ],
  • "parameters": {
    }
}

Response samples

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

Broker

Add a Broker input/output

Add a Broker input/output configuration

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

ID of the broker configuration

tag
required
string
Enum: "inputs" "outputs"

The configuration tag

Request Body schema: application/json
required
name
required
string

input/output name

type
required
integer

Input/Output type ID

Must be one of the following for outputs:

  • 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)

Must be one of the following for inputs:

  • 3 - IPv4 (ipv4)
  • 10 - IPv6 (ipv6)
  • 11 - File (file)
  • 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": {
    }
}

Response samples

Content type
application/json
{
  • "brokerId": 1,
  • "name": "central-broker-master-unified-sql",
  • "type": {
    },
  • "parameters": {
    }
}

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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

IDs of host templates linked to this service template.

service_categories
Array of integers

IDs of service categories linked to this service template.

Array of objects

Service group / host template associations to be linked to this service template.

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
{
  • "id": 1,
  • "is_locked": true,
  • "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_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": [
    ],
  • "categories": [
    ],
  • "groups": [
    ],
  • "macros": [
    ]
}

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

IDs of host templates linked to this service template.

service_categories
Array of integers

IDs of service categories linked to this service template.

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

Service group / host template associations to be linked to this service template.

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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
  • is_admin
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,
  • "can_manage_api_tokens": true,
  • "use_deprecated_pages": false,
  • "use_deprecated_custom_views": 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 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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": {
    },
  • "thumbnail": {
    },
  • "is_favorite": true
}

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": {
    },
  • "is_favorite": true,
  • "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: multipart/form-data
required
name
string <= 200 characters

Dashboard name

description
string or null <= 65535 characters

Description about this dashboard

Array of objects
object
object
thumbnail_data
string <binary>

Responses

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"
}

Unset dashboard from current user favorites

Unset dashboard from current user favorites

Since Centreon Web 24.10

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

ID of the dashboard

Responses

Response samples

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

List all dashboards set as favorite for the current user

Return all dashboard configurations that were marked as favorite for the current user.

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": {
    }
}

Set dashboard as favorite for the current user

Set dashboard as favorite for the current user

Since Centreon Web 24.10

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

Responses

Request samples

Content type
application/json
{
  • "dashboard_id": 1
}

Response samples

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

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

Responses

Response samples

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

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"
}

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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
{
  • "name": "rta",
  • "unit": "%",
  • "sort": "top",
  • "limit": 0,
  • "resources": [
    ]
}

Metrics

List metrics

Get list of all metrics

The available parameters to search / sort_by are: AND

  • hostgroup.id (search operator allowed: $in)
  • hostcategory.id (search operator allowed: $in)
  • host.id (search operator allowed: $in)
  • servicegroup.id (search operator allowed: $in)
  • servicecategory.id (search operator allowed: $in)
  • service.name (search operator allowed: $in, $rg)
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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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%"}}
      ]
    }
  ]
}

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": [
    ]
}

Get service metric data

Retrieve the data for a specific metric of a service

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

Host ID

service_id
required
integer >= 1
Example: 1

Service ID

metricName
required
string
Example: cpu

Name of the metric to retrieve

Responses

Response samples

Content type
application/json
{
  • "metrics": [
    ]
}

Get meta service metric data

Retrieve the data for a specific metric of a meta service

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

ID of the meta service

metricName
required
string
Example: cpu

Name of the metric to retrieve

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "unit": "string",
  • "current_value": 0.1,
  • "warning_high_threshold": 0.1,
  • "warning_low_threshold": 0.1,
  • "critical_high_threshold": 0.1,
  • "critical_low_threshold": 0.1,
  • "min": 0.1,
  • "max": 0.1
}

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
  • in_flapping
  • 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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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": {
    }
}

Count all resources including hosts and services

Count all the resources in real-time monitoring : hosts and services.

The available parameters to search are:

  • id
  • name
  • alias
  • fqdn
  • type
  • status_code
  • status
  • action_url
  • notes_label
  • notes_url
  • parent_name
  • parent_status
  • in_downtime
  • in_flapping
  • 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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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%"}}
      ]
    }
  ]
}
all_pages
required
boolean

Export all pages or only the current page

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

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
{
  • "count": 0,
  • "is_approximate": true,
  • "meta": {
    }
}

Export all resources including hosts and services

Export all the resources in real-time monitoring : hosts and services.

Available formats are : csv.

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
  • in_flapping
  • 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
format
required
string
Value: "csv"

Format of the export (e.g., csv)

all_pages
required
boolean

Export all pages or only the current page

max_lines
integer [ 1 .. 10000 ]

Maximum number of lines to export (required if all_pages is true)

columns
Array of strings
Items Enum: "resource" "status" "parent_resource" "duration" "last_check" "information" "tries" "severity" "notes_url" "action_url" "state" "alias" "parent_alias" "fqdn" "monitoring_server_name" "notification" "checks"

Columns to include in the export (ex columns[]=status&columns[]=resource) (ordered by the order of the columns in the request)

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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

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
{
  • "uuid": "h14",
  • "id": 14,
  • "name": "Centreon-Central",
  • "monitoring_server_name": "Central",
  • "type": "host",
  • "short_type": "h",
  • "fqdn": "localhost|127.0.0.1",
  • "alias": "central",
  • "status": {
    },
  • "in_downtime": true,
  • "acknowledged": false,
  • "flapping": false,
  • "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100",
  • "information": "OK - 127.0.0.1 rta 0.284ms lost 0%\n",
  • "command_line": "/usr/lib64/nagios/plugins/check_icmp -H 127.0.0.1 -n 5 -w 200,20% -c 400,50%",
  • "notification_number": 3,
  • "latency": 0.031,
  • "percent_state_change": 3.5,
  • "passive_checks": false,
  • "execution_time": 0.179335,
  • "active_checks": true,
  • "parent": {
    },
  • "icon": {
    },
  • "groups": {
    },
  • "categories": {
    },
  • "severity": {
    },
  • "acknowledgement": {
    },
  • "downtimes": [
    ],
  • "timezone": "Europe/Paris",
  • "duration": "2h 3m",
  • "next_check": "2019-08-24T14:15:22Z",
  • "last_check": "2019-08-24T14:15:22Z",
  • "last_time_with_no_issue": "2019-08-24T14:15:22Z",
  • "last_status_change": "2019-08-24T14:15:22Z",
  • "last_notification": "2019-08-24T14:15:22Z",
  • "tries": "(1/3) (S)",
  • "links": {
    }
}

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
{
  • "uuid": "h14",
  • "id": 14,
  • "name": "Ping",
  • "monitoring_server_name": "Central",
  • "type": "service",
  • "short_type": "s",
  • "status": {
    },
  • "in_downtime": true,
  • "acknowledged": false,
  • "flapping": false,
  • "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100",
  • "information": "OK - 127.0.0.1 rta 0.284ms lost 0%\n",
  • "command_line": "/usr/lib64/nagios/plugins/check_icmp -H 127.0.0.1 -n 5 -w 200,20% -c 400,50%",
  • "notification_number": 3,
  • "latency": 0.031,
  • "percent_state_change": 3.5,
  • "passive_checks": false,
  • "execution_time": 0.179335,
  • "active_checks": true,
  • "parent": {
    },
  • "icon": {
    },
  • "groups": {
    },
  • "categories": {
    },
  • "severity": {
    },
  • "acknowledgement": {
    },
  • "downtimes": [
    ],
  • "duration": "2h 3m",
  • "next_check": "2019-08-24T14:15:22Z",
  • "last_check": "2019-08-24T14:15:22Z",
  • "last_time_with_no_issue": "2019-08-24T14:15:22Z",
  • "last_status_change": "2019-08-24T14:15:22Z",
  • "last_notification": "2019-08-24T14:15:22Z",
  • "tries": "(1/3) (S)",
  • "links": {
    }
}

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": {
    }
}

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
  • type
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

$and requires all conditions to be true simultaneously for the same resource (intersection). $or requires at least one condition to be true (union).

Important: Using $and on the same field with incompatible values will always return > an empty result. For example, a host whose name is "host1" cannot simultaneously have > the name "host2". To search for resources matching either value, use $or instead. 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: Use $or to find hosts named "host1" OR "host2":

search={
  "$or":[
    {"host.name":{"$eq":"host1"}},
    {"host.name":{"$eq":"host2"}}
  ]
}

Use $and to combine conditions on different fields:

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
integer

User ID linked to the authentication token (mandatory for type API)

expiration_date
required
string or null <date-time>

Expiration date of the authentication token

type
required
string
Enum: "cma" "api" "poller"

Type of the token

Responses

Request samples

Content type
application/json
{
  • "name": "my-api-token",
  • "user_id": 23,
  • "expiration_date": "2023-08-31T15:46:00+02:00",
  • "type": "cma"
}

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,
  • "type": "cma"
}

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"
}

Get an API token

Get an API token (only if type is CMA or POLLER)

Authorizations:
TokenCookie
path Parameters
token_name
required
string
Example: my-token-name

token name

Responses

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,
  • "type": "cma"
}

Get an API token

Get an API token (only if type is CMA or POLLER)

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
{
  • "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,
  • "type": "cma"
}

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"
}

Partially update an API authentication token

Partially update an authentication 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

Request Body schema: application/json
required
is_revoked
boolean

Indicate if the token has been revoked

Responses

Request samples

Content type
application/json
{
  • "is_revoked": false
}

Response samples

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