Way to determine Foreman version via REST API?

Is there a way to determine Foreman version via REST API? We need to
validate version of foreman from our code, the existence or add of a REST
API call that can return the version of foreman installed would wonderful
to achieve this need. Maybe return that information as part of the
existing status REST API call if that is not already done?

Thanks Ohad. Very nice.

··· On Wednesday, April 1, 2015 at 6:35:30 AM UTC-7, Schorschi Decker wrote: > > Is there a way to determine Foreman version via REST API? We need to > validate version of foreman from our code, the existence or add of a REST > API call that can return the version of foreman installed would wonderful > to achieve this need. Maybe return that information as part of the > existing status REST API call if that is not already done? >

> Is there a way to determine Foreman version via REST API? We need to
> validate version of foreman from our code, the existence or add of a REST
> API call that can return the version of foreman installed would wonderful
> to achieve this need. Maybe return that information as part of the
> existing status REST API call if that is not already done?
>

there are two ways to extract it:

  1. GET /api/v2/status
  2. every API call respond with two headers, for example:

curl https://foreman/api/v2 -u admin:changeme -k -I -s |grep Foreman
Foreman_version: 1.9.0-develop
Foreman_api_version: 2

Ohad

··· On Wed, Apr 1, 2015 at 4:35 PM, Schorschi Decker wrote:


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.