/kpis/tc/overcrowding/

The KPI API /tc/overcrowding endpoint returns numbers of overcrowded courses aggregated by requested referential level and for requested referential element.

A session_id cookie is required to request CITiO APIs. To learn more about Authentification, use the documentation here.

Request

Base URL

https://{agency_name}.api.cit.io

Method

GET /kpis/tc/overcrowding/{filter_level}/{filter_level_id}/{aggregation_level}

API routes

  • /kpis/tc/overcrowding/agency/line?
  • /kpis/tc/overcrowding/line/route?
  • /kpis/tc/overcrowding/line/{line id}/route?

Request syntax

# for a specified filter level id
https://{agency_name}.api.cit.io/kpis/tc/overcrowding/{filter_level}/{filter_level_id}/{aggregation_level}?included_date_perimeters={date_perimeters}

# for all filter levels
https://{agency_name}.api.cit.io/kpis/tc/overcrowding/{filter_level}/{aggregation_level}?included_date_perimeters={date_perimeters

Request Filter Level

When requesting KPIs, we must chose a filter level, that corresponds to a part of the network, defined in the Referential. We can then chose to filter on a specific element of that referential, by using its id, or to get the data for all of the elements.

Available filter levels for the Overcrowding KPI are

  • agency
  • line

Request Aggregation Level

When requesting KPIs, we must chose an aggregation level, that corresponds to a part of the network defined in the Referential. The data is aggregated by each element of that aggregation level.

Available aggregation levels for the Overcrowding KPI are

  • for the whole agency, line
  • filtered by line, route

Request Parameters

All following parameters are used to filter the data returned by the API. At the exception of aggregated_by_time and aggregated_by_day, that respectively prevent the API to aggregate the response by day and by time.

Parameter

Value

Default

Comment

included_date_perimeters

Mandatory

Date Perimeters format

excluded_date_perimeters

Optional

Date Perimeters format

aggregated_by_{day/time}

Optional

true/false

false

can not both be true

Sample query

https://irigo_demonstrateur.api.cit.io/kpis/tc/overcrowding/agency/76/line?aggregated_by_time=true&included_date_perimeters=2021-02-01_2021-02-28_1111111&vehicle_type_id=all

Response structure

[{
service_date, // except if aggregated_by_time=true
time, // except if aggregated_by_day=true
filter_level_id: int, // only if no filter_level_id in the request
aggregation_level_id: int,

overcrowded_ticketing_courses: int,
overcrowded_counting_cells_courses: int,
sanitary_overcrowded_ticketing_courses: int,
sanitary_overcrowded_counting_cells_courses: int,
total_ticketing_courses: int,
total_counting_cells_courses: int,
sanitary_total_ticketing_courses: int,
sanitary_total_counting_cells_courses: int,
},]

Avez-vous trouvé ce que vous cherchiez ?

Date Perimeters format

/api/login - Login

Contact