I upgraded from 1.8 series to 1.9.2 yesterday. With 1.8 I was able to
get environments informations with the API by doing a GET with
environment name, for example with curl:
curl -k -u user:secret -H "Accept: version=2,application/json" -H
"Content-Type: application/json" https://foreman.mydomain/api/environments/production
Since the upgrade, I am only able to query environment with id:
curl -k -u user:secret -H "Content-Type: application/json" https://foreman.mydomain/api/environments/production
return "message": "Resource environment not found by id 'production'"
I think I might I found a bug, what do you think ?
Yes, I think so, probably from #11037. Please do file it in Redmine
(Foreman) and for now
you'll probably need to use IDs or manually revert the patch from that
ticket.
···
On 30/09/15 09:05, Elodie Benoit-Bertoncello wrote:
> Hi,
>
> I upgraded from 1.8 series to 1.9.2 yesterday. With 1.8 I was able to
> get environments informations with the API by doing a GET with
> environment name, for example with curl:
> curl -k -u user:secret -H "Accept: version=2,application/json" -H
> "Content-Type: application/json"
> https://foreman.mydomain/api/environments/production
>
> Since the upgrade, I am only able to query environment with id:
> curl -k -u user:secret -H "Content-Type: application/json"
> https://foreman.mydomain/api/environments/production
> return "message": "Resource environment not found by id 'production'"
>
> I think I might I found a bug, what do you think ?
Thank you Dominic, I created #12004 and I will try to revert the patch.
···
On 30/09/2015 10:22, Dominic Cleal wrote:
> On 30/09/15 09:05, Elodie Benoit-Bertoncello wrote:
>> Hi,
>>
>> I upgraded from 1.8 series to 1.9.2 yesterday. With 1.8 I was able to
>> get environments informations with the API by doing a GET with
>> environment name, for example with curl:
>> curl -k -u user:secret -H "Accept: version=2,application/json" -H
>> "Content-Type: application/json"
>> https://foreman.mydomain/api/environments/production
>>
>> Since the upgrade, I am only able to query environment with id:
>> curl -k -u user:secret -H "Content-Type: application/json"
>> https://foreman.mydomain/api/environments/production
>> return "message": "Resource environment not found by id 'production'"
>>
>> I think I might I found a bug, what do you think ?
> Yes, I think so, probably from #11037. Please do file it in Redmine
> (http://projects.theforeman.org/projects/foreman/issues/new) and for now
> you'll probably need to use IDs or manually revert the patch from that
> ticket.
>