Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Service Specification and APIs

Sumit Rawal answered on May 23, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • what is an api
  • api meaning
  • new apis
  • what is api
  • what is an api
  • Different Types of Service
  • APIS AND MICROSERVICES
  • what is API
  • What is API?
  • key characteristics of rest api
  • Do you use any non-web services API?
  • Create Data Service api calls
  • Adding new operations in the composite service API
  • Designing APIs with OAS
  • Modifying the API specification
  • Implementing new APIs
  • Extending the composite service API
  • Do you follow any standards to build a rest service?
  • API overview
  • API Design
  • Service specification#
  • web api meaning
  • web api meaning
  • web api meaning
  • web api meaning
  • web api meaning
  • web api meaning
  • how to represent a resource in api
  • key characteristics of api

  • Service Specification and APIs

    0

    Get introduced to the product's service and define its specification and API endpoints.

    We'll cover the following

    Service specification

    Data model

    Database

    The products table

    The names table

    HTTP API

    In this course, we will create a service using both pure and impure ways. Before we start developing the service, we need to define its specification and the APIs that it will expose.

    Let’s define the specification first.

    Service specification

    First of all, we need to specify the exact scope and API of the project(service) that we will be developing. We’ll design the service with a minimal API to keep things simple and easy to understand.

    The service shall provide HTTP API endpoints for:

    the creation of a product data type identified by a unique id;

    adding language translations for a product name by language code and a unique id;

    returning the existing translations for a product;

    returning a list of all existing products with their translations.

    HTTP endpoints provided by our service

    Data model

    We will keep the model very simple in order to avoid going overboard with the implementation.

    A language code shall be defined by the ISO 639-1.

    A translation shall contain a language code and a product name (non-empty string).

    A product shall contain a unique id (UUID version 4) and a list of translations.

    Our data model: a product and its list of name translations

    Our data model: a product and its list of name translations

    Database

    The data will be stored in a relational database (RDBMS). Therefore, we need to define the tables and relations within the database.

    The products table

    The table “products” must only contain the unique id, which is also the primary key.

    The "products" table

    The "products" table

    The names table

    The table “names” must contain a column for the product id, one for the language code, and one for the name. Its primary key is the combination of the product id and the language code. All columns must not be null.

    The "names" table

    The "names" table

    The relation to the products is realized by a foreign key constraint to the products table via the product id.

    HTTP API#  

    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on May 23 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.