Zun

The "run" URL violate the OpenStack API guide

Bug #1650820 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Released
Medium
prameswar

Bug Description

This is the "run" API:

  POST /v1/containers/run

This violates the OpenStack API design guide: http://specs.openstack.org/openstack/api-wg/guidelines/uri.html#general-advice-on-uri-design . In particular, the guide said:

  It is often the case that an API will have URIs that represent collections for resources and individual members of that collection in a hierarchy.

Per my understanding, it means the following:
* /v1/containers represent collections of resources
* /v1/containers/<ID or NAME> represent individual members of that collection

However, the URL /v1/containers/run might be interpreted as an individual member with name "run". This is not an effective URL design. According to the guide, it suggested to change it as following

  POST /v1/containers?run=true

prameswar (prameswar)
Changed in zun:
assignee: nobody → prameswar (prameswar)
hongbin (hongbin034)
Changed in zun:
status: New → Triaged
importance: Undecided → Medium
Changed in zun:
status: Triaged → In Progress
hongbin (hongbin034)
Changed in zun:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun (master)

Reviewed: https://review.openstack.org/415014
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=ec216e57d66db2f4c37baf89cdb36ddae235fee6
Submitter: Jenkins
Branch: master

commit ec216e57d66db2f4c37baf89cdb36ddae235fee6
Author: prameswar <email address hidden>
Date: Mon Dec 26 21:24:53 2016 +0530

    zun run URL changed to /v1/containers?run=true

    The "run" URL violating the OpenStack API guide.
    This is the "run" API:

      POST /v1/containers/run

    In particular, the guide said:
    It is often the case that an API will have URIs that represent collections
    for resources and individual members of that collection in a hierarchy.
    Per my understanding, it means the following:
    * /v1/containers represent collections of resources
    * /v1/containers/<ID or NAME> represent individual members of that collection
    However, the URL /v1/containers/run might be interpreted as an individual member
    with name "run". This is not an effective URL design. According to the guide, it
    suggested to change it as following

     POST /v1/containers?run=true

    Closes-Bug: #1650820

    Change-Id: I058a947afd4d4635fa8cc2f73ed2ff1fa25db13d

Changed in zun:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.