Bug 1511376 - [RFE] Delete Datastores via ReST API
Summary: [RFE] Delete Datastores via ReST API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: MVP
: 5.10.0
Assignee: abellott
QA Contact: Martin Kourim
URL:
Whiteboard:
Depends On:
Blocks: 1555371 1597405
TreeView+ depends on / blocked
 
Reported: 2017-11-09 09:24 UTC by Sachin
Modified: 2020-12-14 10:49 UTC (History)
7 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:00:36 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 0 None None None 2019-02-07 23:00:47 UTC

Description Sachin 2017-11-09 09:24:58 UTC
Description of problem:

Can we have POST operation to manage datastore? for example to delete datastore via API

API endpoint: /api/data_stores/<ID>

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

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Dave Johnson 2017-11-09 09:44:22 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 4 CFME Bot 2018-03-05 11:25:43 UTC
New commit detected on ManageIQ/manageiq-api/master:
https://github.com/ManageIQ/manageiq-api/commit/4e59f2aa3b183be7fbc7c01781aea6926bd56d00

commit 4e59f2aa3b183be7fbc7c01781aea6926bd56d00
Author:     Alberto Bellotti <abellott>
AuthorDate: Fri Mar 2 07:55:07 2018 -0500
Commit:     Alberto Bellotti <abellott>
CommitDate: Fri Mar 2 07:55:07 2018 -0500

    Added support for deleting data_stores
    
      DELETE /api/data_stores/:id
      POST /api/data_stores/:id   - action "delete"
      POST /api/data_stores       - bulk action "delete"
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1511376

 app/controllers/api/data_stores_controller.rb | 16 +++++
 config/api.yml                                |  6 +-
 spec/requests/data_stores_spec.rb             | 94 +++++++++++++++++++++++++++
 3 files changed, 114 insertions(+), 2 deletions(-)
 create mode 100644 spec/requests/data_stores_spec.rb

Comment 5 Martin Kourim 2018-07-10 11:55:38 UTC
Verified on 5.10.0.3 that it's possible to delete datastores using REST API:

POST /api/data_stores
{
    "action": "delete",
    "resources": [
        { "href": "<addr>/api/data_stores/:id" }
    ]
}

and

POST /api/data_stores/:id
{
    "action": "delete"
}

Comment 6 errata-xmlrpc 2019-02-07 23:00:36 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-2019:0212


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