Bug 1416146 - cannot reference parent_service with href when creating new service via REST API
Summary: cannot reference parent_service with href when creating new service via REST API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.8.0
Assignee: Gregg Tanzillo
QA Contact: Martin Kourim
URL:
Whiteboard: api:rest:service
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-24 17:04 UTC by Martin Kourim
Modified: 2017-05-31 14:33 UTC (History)
5 users (show)

Fixed In Version: 5.8.0.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-31 14:33:28 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1367 normal SHIPPED_LIVE Moderate: CFME 5.8.0 security, bug, and enhancement update 2017-05-31 18:16:03 UTC

Description Martin Kourim 2017-01-24 17:04:23 UTC
Description of problem:
When creating new service via REST API the request fails when "parent_service" is "href" reference to existing service:
{
  "error": {
    "kind": "bad_request",
    "message": "Missing Service identifier id",
    "klass": "Api::BadRequestError"
  }
}

According to
http://manageiq.org/docs/reference/latest/api/reference/services#services
both "href" and "id" should be accepted.

Request is successful when "parent_service" is "id" reference to existing service.

Version-Release number of selected component (if applicable):
5.7.0.17

How reproducible:
100%

Steps to Reproduce:
1. create service
2. create service via REST API
POST /api/services
{
  "action" : "create",
  "resource" : {
    "name" : "test_service",
    "description" : "Test Service",
    "parent_service" : { "href" : "https://<address>/api/services/:id" }
  }
}

Comment 2 Jillian Tullo 2017-03-29 15:31:01 UTC
This was resolved via https://github.com/ManageIQ/manageiq/pull/14087

Comment 3 Martin Kourim 2017-04-03 14:52:20 UTC
Verified on 5.8.0.8-alpha1 that it's possible to reference parent service using "href".

Comment 5 errata-xmlrpc 2017-05-31 14:33:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1367


Note You need to log in before you can comment on or make changes to this bug.