17
Government API strategies OPENAPI MADRID EXPERIENCE 17th-18th October 2018 European Commission, Ispra Andrés Recio EMT MADRID (@MobilityLabsMad)

GovernmentAPI strategies - European Commission · 2018. 11. 28. · MOTIVATIONS. OPENAPI MADRID EXPERIENCE. EMT MADRID. Government API strategies. European Commission, Ispra. 17th-18th

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

  • Government API strategies

    OPENAPI MADRID EXPERIENCE

    17th-18th October 2018European Commission, Ispra Andrés Recio

    EMT MADRID (@MobilityLabsMad)

  • API HISTORY

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    Optitrans FP7(Proto-API)

    2010

    First EMT APPAPI deploy thinking on

    internal use only

    2012First API

    AgreementWhy not open our

    data?

    2013

    35.000.000 hits/month

    2015New security

    modelNew server

    infrastructure

    2016

    MobilityLabsmodel

    concept

    100.000.000 hits/month

    2018Api for

    Mobility and City Concept

    170.000.000 hits/month

    (60 hits/second)

  • MOTIVATIONS

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    As of 2012, EMT managers start a debate due to some issues that happen:

    • Official EMT Webpage seemed to be under attack (scraping)Some developers getting data in wrong way by offer transport information into their apps

    • The Democracy of the Data.Many independent developers claimed the right to open, free and public data.

    • The fear of change. On the other hand, EMT responsibles had to understand the advantage of offering data in a controllable way.

    • More APPS = More Knowledge of Transport = More users in buses. Above all WE ARE A COMPANY OF PUBLIC TRANSPORT, our business is not software development.

    • Oportunities in invest and cost.EMT going to develop Apps for Mobiles so … why not using APIs and why not offer the sameAPI in open?

  • RESULTS

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    The result of developing an API for our Apps was:

    • Important saving in the development of the Apps.• Available data always updated in the Apps• Ease of maintenance and content control.• Simplicity to extend the model to other solutions and third developers.• Zero maintenance cost extra in software, only the necessary for our own infrastructure.

    • Greater effort in security (There are always developers who put us to the test)• Increased investment in servers and databases (Some third-party solutions are not well

    optimized)

  • UNIQUE API USERS

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    More than 50 Apps connected

    0

    200

    400

    600

    800

    1000

    1200

    1400

    1600

    1800

    2010

    _11

    2012

    _01

    2012

    _08

    2013

    _08

    2014

    _01

    2014

    _08

    2015

    _01

    2015

    _06

    2015

    _11

    2016

    _04

    2016

    _09

    2017

    _02

    2017

    _07

    2017

    _12

    2018

    _05

    2018

    _10

  • SOME METRICS

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    22%

    29%

    49%

    USES OF API

    EMTMADRID APPS

    NON EMTMADRID APPS

    ON BOARD BUSMULTIMEDIA

    REALTIME vs GENERAL DATA

    ESTIMATIONS OF ARRIVAL BUS OTHER WEBMETHODS

  • USER REGISTER PROCESS

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    1.- ACCESS TO PORTAL

    2.- FILLREGISTER FORM

    CONFIRM VIA EMAIL

    READY TO USE THE API AND

    PORTAL PRIVATE AREA

  • FEATURES OF MOBILITYLABS API SYSTEMS

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    ENABLED for data producers. Developers can get, load and share their own data.

    SECURITY MODEL: oAuth2 (900 seconds alive, auto-extensible)

    STANDARDIZATION: Structures on JSON, Geo data in GEO-JSON

    Classic API RESTFUL for classic applications developers (https://openapi.emtmadrid.es/)

    Reactive websocket connector for IoT developers (wss://rbmobility.emtmadrid.es)

    Geographical WMS services for data Journalist (https://mynavega.emtmadrid.es)

    Queues for data producers (amqp.emtmadrid.es)

    https://openapi.emtmadrid.es/https://mynavega.emtmadrid.es/https://amqp.emtmadrid.es/

  • Classic API REST STRUCTURE

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    PUBLIC SIDE

    INTERNAL & EXTERNAL DATA

    RESOURCES (SQL & NO-SQL BBDD)

    Real Time & DATA PARKINGS

    Real Time & DATA EMT BUS

    Real Time & DATA PUBLIC BIKE

    GIS RESOURCES

    ACCESS CONTROL & SECURITY

    INTERNAL APICLUSTER INTERNET

    INFORMATION SERVER

    PUBLIC APIDOCKER STACK

    MACHINESFIREWALL

    PRIVATE SIDECLIENTS

    https://openapi.emtmadrid.es/v1/

  • USING DISCOVERING DATA METHODS

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    Categories

    Subcategory1

    Subcategory2

    Collection 1

    Link data 1

    Link data N

    CollectionN

    SubcategoryN

    Security / Permissions

    https://openapi.emtmadrid.es/v1/

    mobilitylabs/discover/categories

    mobilitylabs/discover/collections//

    mobilitylabs/collection/reactive///

    mobilitylabs/collection/static///

    user/login

    mobilitylabs/collection/webservice///

  • EXAMPLE FOR USING TRANSPORT & CITY CATEGORIES

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    https://openapi.emtmadrid.es/v1/

    user/login/ transport/

    busemtmad/

    lines//

    route//

    timetable/

    stops//

    arrives//

    citymad/

    streets///

    parking/

  • REACTIVE API SERVER

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    OBSERVING DATA IN REAL TIME USING WEBSOCKETS

    DEVELOPERS CAN USE A GEOMAP FOR SUPPORTING THEIR DEVELOPEMENTS (https://rbmobility.emtmadrid.es/)

    Rbmobility.emtmadrid.esExternal Data

    Resources

    CLIENT SIDE (Real TimeObserver) DDP

    Security

    (wss://rbmobility.emtmadrid.es/)

  • QUEUE SERVER

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    Client Producer

    SECURITY

    (amqp.emtmadrid.es)

    PRODUCERS CAN LOAD INFORMATION INTO THE SYSTEM (OPENDATA MADE BY USERS)

    External Data Resources

  • MAPS FOR DATA JOURNALIST

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    (https://mynavega.emtmadrid.es)

    MEDIA PUBLICATIONS CAN CREATE

    CUSTOMIZED MAPS USING WMS SERVER API

    https://mynavega.emtmadrid.es/

  • MORE REFERENCES

    17th-18th October 2018European Commission, Ispra Andrés Recio

    EMT MADRID (@MobilityLabsMad)

    Government API strategies 17th-18th October 2018European Commission, Ispra

    Portal Data Information: https://mobilitylabs.emtmadrid.es

    Documents, helps and source code examples: https://gitlab.com/mobilitylabsmadrid

    https://mobilitylabs.emtmadrid.es/https://gitlab.com/mobilitylabsmadrid

  • CHALLENGES and Open Discussions

    OPENAPI MADRID EXPERIENCE EMT MADRID

    Government API strategies 17th-18th October 2018European Commission, Ispra

    Need to Improve Metrics and control API activity. We are thinking about registering the activity, i.e. with Elastic Search & Kibana.

    How to maintain the Level of Service in the new challenge of Mobility as a Service (MaaS) that starts in EMT.

    Increase Services = Increase Challenges: integratepayments, tokens, user identities, mobility analysis, customerservice, monitoring, etc.

  • THANKS

    17th-18th October 2018European Commission, Ispra Andrés Recio

    EMT MADRID (@MobilityLabsMad)

    Government API strategies 17th-18th October 2018European Commission, Ispra

    Slide Number 2Slide Number 3Slide Number 4Slide Number 5Slide Number 6Slide Number 7Slide Number 8Slide Number 9Slide Number 10Slide Number 11Slide Number 12Slide Number 13Slide Number 14Slide Number 15Slide Number 16Slide Number 17