Have an existing flat table with just 2 columns, with one columns data repeating itself. Example Below (sample data for demonstration purposes)
Table: OPEC_MEMBER_COUNTRY (represents countries that belong under OPEC)
Data:
opec_id | member_country |
---|---|
OPEC | USA |
OPEC | Oman |
OPEC | Canada |
OPEC | Mexico |
Need to write a REST API to get[all countries of OPEC]/add/delete member countries. Considering different design options for API model/Object model (and best "resources" && URI) that gives clarity for users (to support operations around member countries).
Different options that could come up with
- URI - /opec/member_countries (with "Country" as API model class with single String name property)
- URI - /opec-member-countries (with entity itself used as model class - unclear on id relevant)
- URI - /org/OPEC/member-countries
Looking for advice/suggestions for modelling/resource identifications (although aware that REST architectural principles are completely independent of the technology that is used to persist information).