Skip to main content
Needs Votes

Get a host/service macro via the v2 API

Related products:Infra Monitoring - API
  • September 17, 2025
  • 8 replies
  • 61 views

Get a host/service macro via the v2 API. That seems currently impossible.

8 replies

rchauvel
Centreonian
Forum|alt.badge.img+18
  • Centreonian
  • September 19, 2025
NewDiscussion ongoing

Forum|alt.badge.img+5
  • Centreonian
  • September 19, 2025
Discussion ongoingNeeds Votes

lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • June 18, 2026

The {protocol}://{server}:{port}/centreon/api/{version}/configuration/hosts/{host_id} endpoint allows to retrieve macros for an host.


Alexandre Belhomme
Forum|alt.badge.img+13

The {protocol}://{server}:{port}/centreon/api/{version}/configuration/hosts/{host_id} endpoint allows to retrieve macros for an host.

Hello, when looking at the REST API, there is only macros that can be PATCH or POST, but not GET
Centreon Web RestAPI 

The get is on the URI {protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id} and no macros seems to be returned (at least based on the documentation).

That’s what we already described in the link Stephane shared at Access service macro via the v2 API | Community.

Maybe we missed some information ?

Just to note regarding the version of the Idea, the 24.10 and 25.10 are currently in Phase2 of release, so I suppose that this update (if it is considered) will only be pushed to next 26.10 LTS


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • June 19, 2026

The {protocol}://{server}:{port}/centreon/api/{version}/configuration/hosts/{host_id} endpoint is available in last 25.10.x minor release. 


Alexandre Belhomme
Forum|alt.badge.img+13

The {protocol}://{server}:{port}/centreon/api/{version}/configuration/hosts/{host_id} endpoint is available in last 25.10.x minor release. 

Do you have the link from the documentation ? Maybe this is an undocumented (yet) endpoint.

I’m sorry i feel dumb but i can’t find it


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • June 19, 2026

Unfortunately documentation is not up to date :’(

The endpoint options are the same as for /monitoring/hosts/{host_id}, juste replace monitoring by configuration.


Alexandre Belhomme
Forum|alt.badge.img+13

Ok, that makes sense then. I’ll update the original post with a reference to your response.
I suppose that the idea can be rejected as the data is available, just a question of updated documentation.

 

As a summary.

There is an APIV2 endpoint at {protocol}://{server}:port}/centreon/api/{version}/configuration/hosts/{host_id} that can be used with GET verb with the similar parameters as /monitoring/hosts/{host_id}

 

This endpoint will return in response the host data, including the macros list.
 

As the time of post, this endpoint is not documented.