equinor / equinor/api-strategy

Resource naming cardinality

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
95
Forks
22
PR merge metrics
No merged PRs in 30d

Description

@Qif-Equinor and others have proposed to include guidelines on resource naming cardinality in the API Strategy. From Qiang's PR:

##### Resource naming

A resource name should clearly indicate the cardinality by using plural nouns for collections, and an instance id for a member of that collection. For example, to get info on well 1234:

```http
GET .../wells/1234
```

If a relation can only exist within another resource, then append the sub resources to the path. For example: since a well can have multiple well logs, the URL to get a ROHB log for 1234 would appear as follows:

```http
GET .../wells/1234/logs/rohb
```https://github.com/Qif-Equinor/api-strategy.git

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.