The "run" URL violate the OpenStack API guide
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://
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?
Changed in zun: | |
assignee: | nobody → prameswar (prameswar) |
Changed in zun: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in zun: | |
status: | Triaged → In Progress |
Changed in zun: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → In Progress |
Reviewed: https:/ /review. openstack. org/415014 /git.openstack. org/cgit/ openstack/ zun/commit/ ?id=ec216e57d66 db2f4c37baf89cd b36ddae235fee6
Committed: https:/
Submitter: Jenkins
Branch: master
commit ec216e57d66db2f 4c37baf89cdb36d dae235fee6
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: I058a947afd4d46 35fa8cc2f73ed2f f1fa25db13d