chaostoolkit-attic / chaoshub-archive

[ARCHIVED] ChaosHub - Your Chaos Engineering Control Plane
https://chaoshub.org/
GNU Affero General Public License v3.0
15 stars 3 forks source link

Experiment should be Experiments (plural) in restful url #9

Open russmiles opened 6 years ago

russmiles commented 6 years ago

At the moment a url to access a specific experiment is expressed something like:

http://localhost:8080/russellmiles/Personal/experiment/mtqwjw5r3uer6idgqpr14hf7c

To be more restful, it might be better to indicate that this is the collection of experiments in the workspace Personal? So the url entry for experiment should be experiments?

http://localhost:8080/russellmiles/Personal/experiments/mtqwjw5r3uer6idgqpr14hf7c
russmiles commented 6 years ago

Similarly, execution should be executions?

http://localhost:8080/api/russellmiles/Personal/experiment/mtqwjw5r3uer6idgqpr14hf7c/execution
Lawouach commented 6 years ago

Interesting question.

I made the conscious choice of using singular because there is no real standard here. Some say we need plural, others say the opposite (because plural isn't always as intuitive as adding a mere 's' suffix).

Honestly, I'm neutral on this, if it helps the UX, I'm okay but we'll need to remain consitant :)

russmiles commented 6 years ago

I've always used the approach of experiments/ as addressing all experiments as a resource, then experiments/1 as addressing experiment if an identifier of 1