U

Use case 4

Output tray

This use case is deprecated.

Thanks to use case 4, DGT has a tool to be able to publish at any kilometer point on any of the national highways information it deems appropriate (warn them of possible dangers, publication of low-emission zones, activation of low-emission protocols, give recommendations at any point, section or area of ​​the road network, etc.).

This documentation shows how integrating companies can access and consume this information together with the information published in use case 1 (v16 signals) and use case 2 (works and incidents).

NAP - DATEXII

Through the operation GET to the endpoint /v1/nap it is possible to obtain all the events that are published in the National Access Point of Spain that DGT is responsible for. The returned data set follows the DATEXII standard.

<?xml version="1.0" encoding="UTF-8"?>
<d2LogicalModel modelBaseVersion="1.0" xsi:schemaLocation="http://datex2.eu/schema/1_0/1_0 http://datex2.eu/schema/1_0/1_0/DATEXIISchema_1_0_1_0.xsd" xmlns="http://datex2.eu/schema/1_0/1_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <exchange>
        <supplierIdentification>
            <country>es</country>
            <nationalIdentifier>dgt</nationalIdentifier>
        </supplierIdentification>
    </exchange>
    <payloadPublication xsi:type="_0:SituationPublication" lang="es" xmlns:_0="http://datex2.eu/schema/1_0/1_0">
    .....................
    .....................
    </payloadPublication>
</d2LogicalModel>

The data usage guide is available at DATEXII User Guide. The DATEXII libraries with the Spanish extensions are available for download at parse libraries for DATEXII.

SRT - DATEXII

Through the operation GET to the endpoint /bandejasalida/v1/srtievents it is possible to obtain all the events that are published in the Outbox that are not published in the * National Access Point * of Spain, which is responsible for DGT. The returned data set follows the DATEXII standard. Currently those events are those related to Stopped Car (V-16) and Roadside Assistance Vehicles

Prerequisites for connection (only for non DATEXII data)

  • For security reasons, the connections will be cloud-to-cloud. The request will be made from the cloud of the integrating company and never from the devices directly.

  • DGT 3.0 will provide a certificate and add the public IP of the server from where the requests will be made to a white list.

  • Once the above is obtained, a client will be configured in any type of language or platform that is capable of making REST API requests (such as Postman).

API REST

The REST API is hosted in the following domain:

https://pre.cmobility30.es

Some points to keep in mind:

  • The certificates, during the integration testing period, will be self-signed, so SSL verification must be disabled.

  • The versioning of the API is built into the URL itself. It is not necessary to add any parameters in the headers.

Get token

For the validation of the user, a token must be obtained and attached in the body of the requests.

General · (cmobility30.es)

Master tables

The API makes available to users a series of endpoints with the data that make up the main event:

The format will be:

{
    "errorCode": 0,
    "errorDesc": "OK",
    "data": [
        {
            "id": 1,
            "name": "Punto"
        }
    ]
}

Obtain PMVs (information of use cases 1, 2 and 4)

In this endpoint you will obtain all the information published regarding use cases 1 (V16 signals), use case 2 (works and incidents) and use case 4 (publication by DGT Virtual Variable Message Panels) that are active at each moment.

https://pre.cmobility30.es/bandejadesalida/v1/events

Response example GET operation:

{
    "errorCode": 0,
    "errorDesc": "OK",
    "data": [
        {
            "pmvGeomWkt": null,
            "pmvId": 120148781,
            "pmvMsg": "General",
            "pmvImg": "P50O",
            "pmvType": 1,
            "pmvProv": 37,
            "pmvRoad": "N-630a",
            "pmvPk": 322.0,
            "pmvPkIni": 0.0,
            "pmvPkFin": 0.0,
            "pmvDirection": 1,
            "pmvCategory": 0,
            "pmvMode": null,
            "pmvProvFin": 0,
            "pmvRoadFin": null,
            "pmvEvent": 0,
            "gid": "GUID_Suc_3009137_3009137"
        }
    ]
}