Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3663

API Model/Object model (identifying resources) for an non-normalized flat table /entity

$
0
0

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_idmember_country
OPECUSA
OPECOman
OPECCanada
OPECMexico

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

  1. URI - /opec/member_countries (with "Country" as API model class with single String name property)
  2. URI - /opec-member-countries (with entity itself used as model class - unclear on id relevant)
  3. 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).


Viewing all articles
Browse latest Browse all 3663

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>