Overview

This project is part of the EU H2020 SynchroniCity project and it is based on the FIWARE Business API Ecosystem.

The SynchroniCity IoT Data Marketplace is a joint component made up of the FIWARE Business Framework and a set of APIs (and its reference implementations) provided by the TMForum. This component allows the monetization of different kind of assets (both digital and physical) during the whole service life cycle, from offering creation to its charging, accounting and revenue settlement and sharing. The SynchroniCity IoT Data Marketplace exposes its complete functionality through TMForum standard APIs; concretely, it includes the catalog management, ordering management, inventory management, usage management, billing, customer, and party APIs.

The SynchroniCity IoT Data Marketplace is not a single software repository, but it is composed of different projects which work coordinately to provide the complete functionality.

Concretely, the SynchroniCity IoT Data Marketplace is made of the following components:

  • Reference implementations of TM Forum APIs: Reference implementation of the catalog management, ordering management, inventory management, usage management, billing, customer, and party APIs.
  • Business Ecosystem Charging Backend: Is the component in charge of processing the different pricing models, the accounting information, and the revenue sharing reports. With this information, the Business Ecosystem Charging Backend is able to calculate amounts to be charged, charge customers, and pay sellers.
  • Business Ecosystem RSS: Is in charge of distributing the revenues originated by the usage of a given data source among the involved stakeholders. In particular, it focuses on distributing part of the revenue generated by a data source between the SynchroniCity IoT Data Marketplace instance provider and the Data Provider(s) responsible for the data source.
  • Business Ecosystem Logic Proxy: Acts as the endpoint for accessing the SynchroniCity IoT Data Marketplace. On the one hand, it orchestrates the APIs validating user requests, including authentication, authorization, and the content of the request from a business logic point of view. On the other hand, it serves a web portal that can be used to interact with the system.

Index

Installation and Administration Guide
The guide for maintainers that explains how to install it.
User Guide
The guide for users that explains how to use it.

Installation and Administration Guide

Introduction

This installation and administration guide covers the SynchroniCity IoT Data Marketplace based on the Business API Ecosystem version 6.4.0, corresponding to FIWARE release 6. Any feedback on this document is highly welcomed, including bugs, typos or things you think should be included but aren’t. Please send them by creating an issue at GitHub Issues

Installation

The SynchroniCity IoT Data Marketplace can be deployed with Docker. For all the components that made up the SynchroniCity IoT Data Marketplace (based on the Business API Ecosystem it has been provided a Docker image that can be used jointly with docker-compose in order to deploy and configure the ecosystem.

Requirements

The SynchroniCity IoT Data Marketplace is not a single software, but a set of modules that work together for proving business capabilities. In this regard, this section contains the basic dependencies of the different components that made up the SynchroniCity IoT Data Marketplace.

Note

The SynchroniCity IoT Data Marketplace requires instances of MySQL and MongoDB running. In this regard, you have three possibilities:

  • You can have your own instances deployed in your machine
  • You can manually run docker containers before executing the SynchroniCity IoT Data Marketplace
  • You can use docker-compose to automatically deploy both components
OAuth2 Authentication requirements

The SynchroniCity IoT Data Marketplace authenticates with the [FIWARE identity manager](http://fiware-idm.readthedocs.io/en/latest/). It is needed to register an application in this portal in order to acquire the OAuth2 credentials.

There you have to use the following info for registering the app:

  • Name: The name you want for your instance
  • URL: Host and port where you plan to run the instance. [http]|https://host:port/
  • Callback URL: URL to be called in the OAuth process. [http]|https://host:port/auth/fiware/callback

You must also create a new role called ‘seller’ and assign this role to the user authorized to be seller (data provider) in the marketplace.

Deploying the SynchroniCity IoT Data Marketplace

As stated, it is possible to deploy the SynchroniCity IoT Data Marketplace using the Docker images available for each of its modules with docker-compose. In particular, the following images have to be deployed:

For deploying the SynchroniCity IoT Data Marketplace the first step is creating a docker-compose.yml file with the following contents (or use the one provided in this GitHub repo):

version: '3'
services:
    mongo:
        image: mongo:3.2
        restart: always
        ports:
            - 27017:27017
        networks:
            main:
        volumes:
            - ./mongo-data:/data/db

    mysql:
        image: mysql:latest
        restart: always
        ports:
            - 3333:3306
        volumes:
            - ./mysql-data:/var/lib/mysql
        networks:
            main:
        environment:
            - MYSQL_ROOT_PASSWORD=my-secret-pw
            - MYSQL_DATABASE=RSS

    charging:
        image: angelocapossele/charging-backend-synchronicity:v6.4.0
        restart: always
        links:
            - mongo
        depends_on:
            - mongo
            - apis
            - rss
        ports:
            - 8006:8006
        networks:
            main:
                aliases:
                    - charging.docker
        volumes:
            - ./charging-bills:/business-ecosystem-charging-backend/src/media/bills
            - ./charging-assets:/business-ecosystem-charging-backend/src/media/assets
            - ./charging-plugins:/business-ecosystem-charging-backend/src/plugins
            - ./charging-settings:/business-ecosystem-charging-backend/src/user_settings
        environment:
        - PAYPAL_CLIENT_ID=client_id_here
        - PAYPAL_CLIENT_SECRET=client_secret_here

    proxy:
        image: angelocapossele/logic-proxy-synchronicity:v6.4.0
        restart: always
        links:
            - mongo
        depends_on:
            - mongo
            - apis
        ports:
            - 8004:8004
        networks:
            main:
                aliases:
                    - proxy.docker
        volumes:
            - ./proxy-conf:/business-ecosystem-logic-proxy/etc
            - ./proxy-indexes:/business-ecosystem-logic-proxy/indexes
            - ./proxy-themes:/business-ecosystem-logic-proxy/themes
            - ./proxy-static:/business-ecosystem-logic-proxy/static
        environment:
            - NODE_ENV=development

    apis:
        image: angelocapossele/bae-apis-synchronicity:v6.4.0
        restart: always
        ports:
            - 4848:4848
            - 8080:8080
        links:
            - mysql
        depends_on:
            - mysql
        networks:
            main:
                aliases:
                    - apis.docker
        volumes:
            - ./apis-conf:/etc/default/tmf/
        environment:
            - MYSQL_ROOT_PASSWORD=my-secret-pw
            - MYSQL_HOST=mysql

    rss:
        image: conwetlab/biz-ecosystem-rss:v6.4.0
        restart: always
        ports:
            - 9999:8080
            - 4444:4848
            - 1111:8181
        links:
            - mysql
        depends_on:
            - mysql
        networks:
            main:
                aliases:
                    - rss.docker
        volumes:
            - ./rss-conf:/etc/default/rss

networks:
    main:
        external: true

Configuration

The next step is providing all the configuration files required by the different components using the configured volumes. It is possible to find valid configuration files (as well as the docker-compose.yml) in this GitHub repo.

As you can see, the different modules include environment variables and volumes. In particular:

Charging

The charging-backend-synchronicity needs the following environment variables:

  • PAYPAL_CLIENT_ID: the client id of your application PayPal credentials used for charging users (a Sandbox account can be used for testing).
  • PAYPAL_CLIENT_SECRET: the client secret of your application PayPal credentials used for charging users (a Sandbox account can be used for testing).

Additionally, the charging-backend-synchronicity image contains 4 volumes. In particular:

  • /business-ecosystem-charging-backend/src/media/bills: This directory contains the PDF invoices generated by the Business Ecosystem Charging Backend
  • /business-ecosystem-charging-backend/src/media/assets: This directory contains the different digital assets uploaded by sellers to the Business Ecosystem Charging Backend
  • /business-ecosystem-charging-backend/src/plugins: This directory is used for providing asset plugins (see section Installing the Orion Query Plugin)
  • /business-ecosystem-charging-backend/src/user_settings: This directory must include the settings.py and services_settings.py files with the software configuration.

More specifically, the services_settings.py includes:

  • KEYSTONE_PROTOCOL: http or https
  • KEYSTONE_HOST: host where is running the IDM (e.g., ‘idm.docker’)
  • KEYROCK_PORT: port number where the Keyrock instance is listening (e.g., ‘8000’)
  • KEYSTONE_PORT: port number where the Keystone instance is listening (e.g., ‘5000’)
  • KEYSTONE_USER: admin username of the IDM (e.g., ‘idm’)
  • KEYSTONE_PWD: admin password of the IDM (e.g., ‘idm’)
  • ADMIN_DOMAIN: admin domain on the IDM (e.g., ‘Default’)
  • APP_CLIENT_ID: Client ID of the Orion context broker registered on the IDM
  • APP_CLIENT_SECRET: Client Secret of the Orion Context Broker registered on the IDM
Logic Proxy

The logic-proxy-synchronicity image contains 4 volumes. In particular:

  • /business-ecosystem-logic-proxy/etc: This directory must include the config.js file with the software configuration
  • /business-ecosystem-logic-proxy/indexes: This directory contains the indexes used by the SynchroniCity IoT Data Marketplace for searching
  • /business-ecosystem-logic-proxy/themes: This directory contains the themes that can be used to customize the web portal
  • /business-ecosystem-logic-proxy/static: This directory includes the static files ready to be rendered including the selected theme and js files

Finally, the logic-proxy-synchronicity uses the environment variable NODE_ENV to determine if the software is being used in development or in production mode.

Note

The config.js file must include an extra setting not provided by default called config.extPort that must include the port where the proxy is going to run in the host machine

Once you have created the files, run the following command

$ docker-compose up

Then, the SynchroniCity IoT Data Marketplace should be up and running in http://YOUR_HOST:PORT/ replacing YOUR_HOST by the host of your machine and PORT by the port provided in the Business Ecosystem Logic Proxy configuration

Once the different containers are running, you can stop them using

$ docker-compose stop

And start them again using

$ docker-compose start

Additionally, you can terminate the different containers by executing

$ docker-compose down
Installing the Orion Query Plugin

The SynchroniCity IoT Data Marketplace is intended to support the monetization of different kind of data sources. The different kind of data sources that may be wanted to be monetized will be heterogeneous and potentially very different between them.

Additionally, for each type of data source different validations and activation mechanisms will be required. For example, if the data source is an NGSI entity, it will be required to validate that the provider is the owner of that entity. Moreover, when a customer acquires the access to that entity, it will be required to notify the Identity Management component that a new user has access to it.

The huge differences between the different types of data sources that can be monetized in the SynchroniCity IoT Data Marketplace makes impossible to include its validations and characteristics as part of the core software. For this reason, it has been created a plugin based solution, where all the characteristics of a data source type are implemented in a plugin that can be loaded in the SynchroniCity IoT Data Marketplace.

As you may know, the SynchroniCity IoT Data Marketplace is able to sell NGSI compliant data sources. To support this functionality, it must be installed the Orion Query plugin (also included in this GitHub repo) as follows

  1. Copy the plugin file into the host directory of the volume /business-ecosystem-charging-backend/src/plugins

  2. Enter the running container

    $ docker exec -i -t your-container /bin/bash
    
  3. Go to the installation directory

    $ cd /apis/business-ecosystem-charging-backend/src
    
  4. Load the plugin

    $ ./manage.py loadplugin ./plugins/Orion.zip
    
  5. Restart Apache

    $ service apache2 restart
    

Note

For specific details on how to create a plugin and its internal structure, have a look at the Business API Ecosystem Programmer Guide

Sanity Check Procedures

The Sanity Check Procedures are the steps that a System Administrator will take to verify that an installation is ready to be tested. This is therefore a preliminary set of tests to ensure that obvious or basic malfunctioning is fixed before proceeding to unit tests, integration tests and user validation.

End to End Testing

Please note that the following information is required before starting with the process: * The host and port where the Proxy is running * A valid IdM user with the Seller role

To Check if the SynchroniCity IoT Data Marketplace is running, follow the next steps:

  1. Open a browser and enter to the SynchroniCity IoT Data Marketplace
  2. Click on the Sign In Button
_images/sanity1.png
  1. Provide your credentials in the IdM page
_images/sanity2.png
  1. Go to the Revenue Sharing section
_images/sanity3.png
  1. Ensure that the default RS Model has been created
_images/sanity4.png
  1. Go to My Stock section and click on New for creating a new catalog
_images/sanity6.png
  1. Provide a name and a description and click on Next. Then click on Create
_images/sanity7.png _images/sanity8.png _images/sanity9.png
  1. Click on Launched, and then click on Update
_images/sanity11.png
  1. Go to Home, and ensure the new catalog appears
_images/sanity13.png
List of Running Processes

We need to check that Java for the Glassfish server (APIs and RSS), python (Charging Backend) and Node (Proxy) are running, as well as MongoDB and MySQL databases. If we execute the following command:

ps -ewF | grep 'java\|mongodb\|mysql\|python\|node' | grep -v grep

It should show something similar to the following:

mongodb   1014     1  0 3458593 49996 0 sep08 ?        00:22:30 /usr/bin/mongod --config /etc/mongodb.conf
mysql     1055     1  0 598728 64884  2 sep08 ?        00:02:21 /usr/sbin/mysqld
francis+ 15932 27745  0 65187 39668   0 14:53 pts/24   00:00:08 python ./manage.py runserver 0.0.0.0:8006
francis+ 15939 15932  1 83472 38968   0 14:53 pts/24   00:00:21 /home/user/business-ecosystem-charging-backend/src/virtenv/bin/python ./manage.py runserver 0.0.0.0:8006
francis+ 16036 15949  0 330473 163556 0 14:54 pts/25   00:00:08 node server.js
root      1572     1  0 1142607 1314076 3 sep08 ?      00:37:40 /usr/lib/jvm/java-8-oracle/bin/java -cp /opt/biz-ecosystem/glassfish ...
Network interfaces Up & Open

To check the ports in use and listening, execute the command:

$ sudo netstat -nltp

The expected results must be something similar to the following:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:8006          0.0.0.0:*               LISTEN      15939/python
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      1014/mongod
tcp        0      0 127.0.0.1:28017         0.0.0.0:*               LISTEN      1014/mongod
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1055/mysqld
tcp6       0      0 :::80                   :::*                    LISTEN      16036/node
tcp6       0      0 :::8686                 :::*                    LISTEN      1572/java
tcp6       0      0 :::4848                 :::*                    LISTEN      1572/java
tcp6       0      0 :::8080                 :::*                    LISTEN      1572/java
tcp6       0      0 :::8181                 :::*                    LISTEN      1572/java
Databases

The last step in the sanity check, once we have identified the processes and ports, is to check that MySQL and MongoDB databases are up and accepting queries. We can check that MySQL is working, with the following command:

$ mysql -u <user> -p<password>

You should see something similar to:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 174
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

For MongoDB, execute the following command:

$ mongo <database> -u <user> -p <password>

You should see something similar to:

MongoDB shell version: 2.4.9
connecting to: <database>
>

Diagnosis Procedures

The Diagnosis Procedures are the first steps that a System Administrator will take to locate the source of an error in a GE. Once the nature of the error is identified with these tests, the system admin will very often have to resort to more concrete and specific testing to pinpoint the exact point of error and a possible solution. Such specific testing is out of the scope of this section.

Resource Availability

Memory use depends on the number of concurrent users as well as the free memory available and the hard disk. The SynchroniCity IoT Data Marketplace requires a minimum of 1024 MB of available RAM memory, but 2048 MB of free memory are recomended. Moreover, the SynchroniCity IoT Data Marketplace requires at least 15 GB of hard disk space.

Remote Service Access

N/A

Resource Consumption

Resource consumption strongly depends on the load, especially on the number of concurrent users logged in.

  • Glassfish main memory consumption should be between 500 MB and 2048 MB
  • MongoDB main memory consumption should be between 30 MB and 500 MB
  • Pyhton main memory consumption should be between 30 MB and 200 MB
  • Node main memory consumption should be between 30 MB and 200 MB
  • MySQL main memory consumption should be between 30 MB and 500 MB
I/O Flows

The only expected I/O flow is of type HTTP, on port defined in the Logic Proxy configuration file

User Guide

Introduction

This user guide covers the SynchroniCity IoT Data Marketplace based on the Business API Ecosystem version 6.4.0, corresponding to FIWARE release 6. Any feedback on this document is highly welcomed, including bugs, typos or things you think should be included but aren’t. Please send them by creating an issue at GitHub Issues

This user guide contains a description of the different tasks that can be performed in the SynchroniCity IoT Data Marketplace using its web interface. This section is organized so that actions related to a particular user role are grouped together.

Profile Configuration

All the users of the system can configure their profile, so they can configure their personal information as well as their billing addresses and contact mediums.

To configure the user profile, the first step is opening the user Settings located in the user menu.

_images/profile1.png

In the displayed view, it can be seen that some information related to the account is already included (Username, Email, Access token). This information is the one provided by the IdM after the login process.

The profile to be updated depends on whether the user is acting on behalf an organization or himself. In both cases, to update the profile, fill in the required information and click on Update.

For users, personal information is provided.

_images/profile2.png

Note

Only the First name and Last name fields are mandatory

Once you have created your profile, you can include contact mediums by going to the Contact mediums section. In the Contact Medium section, there are two different tabs. On the one hand, the Billing addresses tab, where you can register the billing addresses you will be able to use when creating orders and purchasing data.

To create a blling address, fill in the fields and click on Create

_images/profile4.png

Once created, you can edit the address by clicking on the Edit button of the specific address, and changing the wanted fields.

_images/profile5.png _images/profile6.png

On the other hand, if you have the Seller role you can create Business Addresses, which can be used by your customers in order to allow them to contact you. In the Business Addresses tab you can create, different kind of contact mediums, including emails, phones, and addresses. To create a contact medium, fill in the fields and click on Create

_images/profile8.png _images/profile9.png _images/profile10.png

You can Edit or Remove the contact medium by clicking on the corresponding button

_images/profile11.png

Admin

If the user of the SynchroniCity IoT Data Marketplace is an admin, he will be able to access the Administration section of the web portal. This section is located in the user menu.

_images/cat1.png
Manage Categories

Admin users are authorized to create the system categories that can be used by Sellers to categorize their catalogs, data sources, and offerings.

To create categories, go to the Administration section, and click on New

_images/cat2.png

Then, provide a name and an optional description for the category. Once the information has been included, click on Next, and then on Create

_images/cat3.png _images/cat4.png

Categories in the SynchroniCity IoT Data Marketplace can be nested, so you can choose a parent category if you want while creating.

_images/cat5.png

Existing categories can be updated. To edit a category click on the category name.

_images/cat6.png

Then edit the corresponding fields and click on Update.

_images/cat7.png

Seller

If the user of the SynchroniCity IoT Data Marketplace has the Seller role, he will be able to share and monetize his data sources by creating catalogs, data source specifications and offerings. All these objects are managed accessing My Stock section.

_images/catalog2.png
Manage Catalogs

The Catalogs section is the one that is open by default when the seller accesses My Stock section. This section contains the catalogs the seller has created. Additionally, it has been defined several mechanisms for searching and filtering the list of catalogs displayed. On the one hand, it is possible to search catalogs by keyword using the search input provided in the menu bar. On the other hand, it is possible to specify how catalog list should be sorted or filter the shown catalogs by status and the role you are playing. To do that, click on Filters, choose the required parameters, and click on Close.

_images/catalog9.png

To create a new catalog click on the New button. Then, provide a name and an optional description for the catalog. Once you have filled the fields, click on Next, and then on Create

_images/catalog4.png _images/catalog5.png

Sellers can also update their catalogs. To do that, click on the name of the catalog to open the update view.

_images/catalog6.png

Then, update the fields you want to modify and click on Update. In this view, it is possible to change the Status of the catalog. To start monetizing the catalog, and make it appear in the Home you have to change its status to Launched

_images/catalog7.png _images/catalog8.png
Manage Data Source Specifications

Data Source Specifications represent the data source being offered. To list your data source specifications go to My Stock section and click on Data source specifications.

_images/product2.png

In the same way as catalogs, data source specifications can be searched by keyword, sorted, or filtered by status and whether they are bundles or not. To filter or sort data source specifications, click on Filters, choose the appropriate properties, and click on Close

_images/product3.png

Additionally, it is possible to switch between the grid view and the tabular view using the provided buttons.

_images/product5.png

To create a new data source specification click on New. In the displayed view, provide the general information of the data source spec. including its name, version, and an optional description. In addition, you have to include the data source brand (Your brand), and an ID number which identifies the data source in your environment. Then, click on Next.

_images/product7.png

In the next step you you will be required to provide the asset.

For providing the asset, you have to choose between the available asset types, choose how to provide the asset between the available options, provide the asset, and include all the required information.

_images/product10.png

Note

Application ID has to be the same application ID of the Orion Context Broker instance registered on the IdM where your data source belongs. Fiware-Service is the header used to register your data source as an entity on the Orion Context Broker. If your user does not have a provider role for that specific Fiware-Service (e.g., TenantRZ1:provider) you will not be allowed to publish data source specification for that entity.

The next step in the creation of a data source spec. is including its characteristics. For including a new characteristic click on New Characteristic

_images/product12.png

In the form, include the name, the type (string or number) and an optional description. Then create the values of the characteristic by filling the Create a value input and clicking on +.

_images/product13.png

Once you have included all the characteristic info, save it clicking on Create

_images/product14.png

Once you have included all the required characteristics click on Next

_images/product15.png

In the next step you can include a picture for your data source spec. You have two options, providing an URL pointing to the picture or directly uploading it. Once provided click Next (Image credit for this example: oNline Web Fonts )

_images/product16.png

Once done click on Next and then on Create

_images/product19b.png

Sellers can update their data source. To do that click on the data source specification to be updated.

_images/product20.png

Update the required values and click on Update. Note that for start selling an offering that includes the data source specification you will be required to change its status to Launched

_images/product21.png _images/product22.png
Manage Data Offerings

Data Offerings are the entities that contain the license, pricing models and revenue sharing info used to monetize a data source specification. To list your data offerings, go to My Stock section and click on Offerings

_images/offering2.png

The existing data source offerings can be searched by keyword, sorted, or filtered by status and whether they are bundles or not. To filter or sort data offerings, click on Filters, choose the appropriate properties, and click on Close

_images/offering3.png

Additionally, it is possible to switch between the grid view and the tabular view by clicking on the specific button.

_images/offering5.png

To create a new offering click on New. In the displayed form, include the basic info of the offering. Including, its name, version, an optional description, and an optional set of places where the offering is available. Once the information has been provided click on Next

_images/offering7.png

In the next step, you can choose whether your offering is a bundle or not. In this case, offering bundles are logical containers that allow you to provide new pricing models when a set of offerings are acquired together. If you want to create a bundle you will be required to include at least two bundled offerings.

_images/offering9.png

In the next step you have to select the data source specification that is going to be monetized in the current offering. Once selected click on Next.

_images/offering10.png

Then, you have to select the catalog where you want to publish you offering and click on Next

_images/offering11.png

In the next step, you can optionally choose categories for you offering. Once done, click on Next

_images/offering12.png

In the next step, you can specify the terms and conditions that apply to your offering and that must be accepted by those customers who want to acquire it. Note that the terms and conditions are not mandatory.

_images/offering25.png

You have 3 options. You can select a standard open data license among the ones available

_images/offering26.png

Or you can customize your license by using the wizard menu

_images/offering27.png

Or you can describe your license by using the free-text form

_images/offering28.png

Once you have defined your license click on Next

The next step is the most important for the offering. In the displayed form you can create different price plans for you offering, which will be selectable by customers when acquiring the offering. If you do not include any price plan the offering in considered free.

To include a new price plan the first step is clicking on New Price Plan

_images/offering13.png

For creating the price plan, you have to provide a name, and an optional description. Then, you have to choose the type of price plan between the provided options.

The available types are: one time for payments that are made once when purchasing the offering, recurring for charges that are made periodically (e.g a monthly payment), and usage for charges that are calculated applying the pricing model to the actual usage made of the acquired service.

If you choose one time, you have to provide the price and the currency.

_images/offering14.png

Once you have created you pricing model click on Next

_images/offering17.png

In the last step of the process, you have to choose the revenue sharing model to be applied to you offering between the available ones. Once done, click on Next and then on Create.

_images/offering19.png _images/offering20.png

Sellers can also edit their offerings. To do that click on the offering to be updated. In the displayed form, change the fields you want to edit and click on Update. Note that for start selling you offering you have to update its status to Launched

_images/offering22.png _images/offering24.png

Customer

All of the users of the system have by default the Customer role. Customers are able to create orders for acquiring offerings.

List Available Offerings

All the available (Launched) offerings appear in the Home page of the SynchroniCity IoT Data Marketplace, so they can be seen by customers. Additionally, customers can select a specific catalog of offerings by clicking on it.

_images/search2.png _images/search3.png

Moreover, customers can filter the shown offerings by category using the categories dropdown and choosing the wanted one.

_images/search4.png

Customers can also filter bundle or single offerings using the Filters modal as well as choosing its sorting.

_images/search6.png

Customers can open the details of an offering by clicking on it. In the displayed view, it is shown the general info about the offering and its included data source, the characteristics of the data source, and the price plans of the offering.

_images/search8.png
Create Order

Customers can create orders for acquiring offerings. The different offerings to be included in an order are managed using the Shopping Cart.

To include an offering in the shopping cart there are two possibilities. You can click on the Add to Cart button located in the offering panel when searching, or you can click on the Add to Cart button located in the offering details view.

_images/order1.png _images/order2.png

If the offering has configurable characteristics, multiple price plans or terms and conditions, a modal will be displayed where you can select your preferred options

_images/order3.png _images/order4.png

Once you have included all the offerings you want to acquire to the shopping cart, you can create the order clicking on Shopping Cart, and then on Checkout

_images/order5.png

Then, you have to select one of your billing addresses.

Once you have provided all the required information you can start the order creation clicking on Checkout

_images/order7.png

If the offering has a price plan, you will be redirected to PayPal so you can pay for the offerings according to their pricing models

_images/order8.png
Manage Acquired Data Offerings

The data you have acquired are located in My Inventory, there you can list them, check their status, or retrieve the access token required to access them. In this view, it is possible to filter you data by its status. To do that click on Filters, select the related statuses, and click on Close

_images/inv2.png _images/inv3.png

It is also possible to switch between the grid and tabular views using the related buttons

_images/inv5.png

You can manage a specific acquired data source clicking on it. In the displayed view, you can see the general info of the acquired data source, and the characteristics and pricing you have selected.

_images/inv7.png _images/inv8.png

Additionally, you can generate an access token for the data source accessing to the Access tab. To generate a new access token insert your IdM password and press the Token button.

_images/inv9.png _images/inv10.png
Access Acquired Data Offerings

To access and consume the data you have acquired, you first need to locate on the characteristic of your data source, the url pointing to that data and the Fiware-Service, if available, related to that data.

_images/access1.png

You will also need to retrieve or generate a new token as shown in the prevoius section.

_images/access2.png

Once you have these information you can use them to create your request. In this example we are using these information, specifically the url, the X-Auth-Token, and the Fiware-Service to build a GET request by using Postman. Note that the Fiware-Service might be optional if not present in the characteristic of your data source.

_images/access3.png

To generate a new access token without accessing to the marketplace you can use the Refresh Token

_images/access4.png

You will also need to retrieve the appId related to the data source that you wish to access. You can find the appId on the characteristic of your data source

_images/access5.png

Once you have these information you can use them to generate a new access token by performing a POST request on this API

http://[marketplace_url]:[marketplace_port]/charging/api/token/refresh

with header Content-Type: application/json and body

{
"refresh_token": "ibFRhNqsiHi9huM3dG7KeNtXld5cRJ",
"appId": "53626045d3bd4f8c84487f77944fa586"
}
_images/access6.png