Skip to content
Snippets Groups Projects
organizations.md 1.9 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Organizations service
    
    
    This service provides a list of organizations with different information about it (such as description, logo..etc).  
    
    In our application, one organization is usually a provider of data, used in the Portal Open Data. It can be a public actor or a private one.
    
    Each record of the catalog includes the following information:
    
    * `id`: a technical unique identifier acting as primary key in the underlying database
    * `uuid`: a business unique identifier
    * `name`: the name of the credited initiative
    * `description`: a short description of the credited initiative, in particular of the role the latter plays in this project
    * `links`: a collection of URLs related to the organization, modeled as a One-To-Many relationship
    * `logo`: the URL of the organization's logo
    * `published`: a boolean flag, indicating whether the record is published or not (draft)
    * `elasticSearchName`: name of the organization in elasticsearc, it can be found in the metadata of a dataset under `responsibleParty[0].organisationName`.
    
    
    This service has no dependency on other components.
    
    
    The service provides two endpoints,
    
    1. `/organizations`;
    
    allowing one to perform CRUD operations on credits and links in a RESTful manner. Moreover, an healtcheck endpoint is provided,
    
    2. `/health`,
    
    returning a `200` HTTP code if the API is healthy, `503` otherwise. For the service to be healthy, the underlying database must be up.
    
    
    ![organizations-service](../../assets/organizations-service.png)
    
    The service is implemented using the [NestJS](https://nestjs.com/) framework. We refer the reader to the [NestJS-based micro-services](../../miscellaneous/nestjs-micro-services.md) page for further details concerning NestJS and the features it provides.
    
    Data persistence is achieved by using [PostgreSQL](https://www.postgresql.org/) and [TypeORM](https://github.com/typeorm/typeorm).