Hi API working group,

I am from the Zun team and I wanted to consult with you about the API design. 
Our team was discussing what is the best API design for exposing different 
container operations [1]. There are two proposed options:

1. Expose multiple URLs for individual container operation. For example:
* POST /containers/<ID>/start:            Start a container
* POST /containers/<ID>/stop:            Stop a container
* POST /containers/<ID>/reboot:        Reboot a container
* POST /containers/<ID>/pause:        Pause a container
....

2. Expose a single URL for all operations. For example:
* POST /containers/<ID>/action
{'start': {...}}
* POST /containers/<ID>/action
{'stop': {...}}
* POST /containers/<ID>/action
{'reboot': {...}}
* POST /containers/<ID>/action
{'pause': {...}}
....

After a quick search, it looks option #1 was chosen by Ironic, and option #2 
was chosen by Nova, Cinder, Senlin, etc. Some services use a mix of these two 
styles. I would like to know if there is a guidance from API working group in 
this regards. Does API working group flavor one style over the other? Thanks in 
advance.

Best regards,
Hongbin

[1] https://etherpad.openstack.org/p/zun-core-api
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to