Conventions for REST URIs

Acronym
conventions-for-rest-uris
Belongs to
SIG
Responsible
Tobi
History
(v1)   2021-10-08 - created initially
(v2)   2021-10-22 - Add convention draft
(v3)   2021-11-09 - No further comments -> agreed

Why is there need for such a decision?

All REST APIs in this applications should have a similar structure.

Additional sources for better understanding the background

Viable Options

n/a, see resolution

Alternatives not seriously considered

n/a, see resolution

How is this decision evaluated?

No evaluation needed.

Resolution details

Structure the API around resources of our business entities

No Verbs

Use plural nouns for collectional resources

Keep the URIs flat and unnested

However keep in mind, that it might be necessary to use nested URIs when a subresource is only accessable via its parent.

Normalize the URIs (No trailing slash, no double-slash)

Use kebab-case to improve readability

Don’t use matrix parameters, use query parameters

Use multiple query parameters (also known as explode)

Reasons for the resolution