/rest/lines

The rest API /lines endpoint belongs to Agency referential routes.

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 /rest/lines
JRequest syntax

GET https://{agency_name}.api.cit.io/rest/lines

Response

A JSON-formatted object containing a list of lines.

Response code

Response content

200

Json object

400

bad query message

failed query message

500

Back-end error response

Fields

Name

Description

id

Identifier of the line

name

Name of the line

short_name

Short name of the line

colour

The HEX code of the colour used for visualization of the line

vehicle_type

Type of vehicle of the line. More common values are TRAM, METRO, BUS or BOAT.

line_type

Name of the group of lines the line belongs to.

JSON object
[
{
"colour": str,
"id": int,
"short_name": str,
"name": str,
"vehicle_type": str,
"line_type": str,
},
...
]

Samples

Demonstrator

https://irigo_demonstrateur.api.cit.io/rest/lines

Sample request
https://test_network.api.cit.io/rest/lines

Sample response content
[
{
"colour": "#ff0000",
"id": 0,
"short_name": "A",
"name": "Nouveau tram A",
"vehicle_type": "TRAM",
"line_type": "Ligne Metropole",
},
{
"colour": "#00ff00",
"id": 1,
"short_name": "11",
"name": "Bus 11",
"vehicle_type": "BUS",
"line_type": "Centre-ville",
},
{
"colour": "#0000ff",
"id": 2,
"short_name": "12",
"name": "Bus 12",
"vehicle_type": "BUS",
"line_type": "Centre-ville",
}
]

Avez-vous trouvé ce que vous cherchiez ?

/kpis/ticketing/{filter_level}[/{filter_level_id}]/{aggregation_level}

/rest/service_date

Contact