## Comment utiliser l'API ? ### Authentification L'API GBFS ne nécessite aucune authentification. ### Comment appeler l'API ? Un simple http GET permet d'accéder à chacun des fichiers GBFS disponibles, exemple ci-dessous : ``` # {contract_name} : nom de la ville concernée par le contrat GET https://api.cyclocity.fr/contracts/{contract_name}/gbfs/gbfs.json # Exemple avec le fichier GBFS, pour le contrat de lyon GET https://api.cyclocity.fr/contracts/lyon/gbfs/station_status.json ``` ### Fichiers GBFS disponibles L'inventaire des fichiers de l'API GBFS est disponible ici (paramètre `{contract_name}` à adapter) : [https://api.cyclocity.fr/contracts/{contract\_name}/gbfs/gbfs.json](https://api.cyclocity.fr/contracts/{contract_name}/gbfs/gbfs.json). Le catalogue actuel, correspondant à la [norme 2.3 de l'API GBFS](https://github.com/MobilityData/gbfs/blob/v2.3/gbfs.md), couvre ces fichiers: - [gbfs.json](https://api.cyclocity.fr/contracts/contract_name/gbfs/gbfs.json) - [gbfs\_version.json](https://api.cyclocity.fr/contracts/contract_name/gbfs/gbfs_versions.json) - [station\_information.json](https://api.cyclocity.fr/contracts/contract_name/gbfs/station_information.json) - [station\_status.json](https://api.cyclocity.fr/contracts/contract_name/gbfs/station_status.json) - [system\_information.json](https://api.cyclocity.fr/contracts/contract_name/gbfs/system_information.json) - [vehicle\_types.json](https://api.cyclocity.fr/contracts/contract_name/gbfs/vehicle_types.json) ### Notes #### Contrats existants Ci-dessous se trouvent les valeurs possibles pour le paramètre `contract_name` : | contract_name | Nom du service | |---------------|--------------------| | amiens | Velam | | besancon | VéloCité | | bruxelles | Villo | | cergy | vél02 | | dublin | dublinbikes | | lillestrom | Bysykkel | | ljubljana | BicikeLJ | | lund | Lundahoj | | luxembourg | Veloh | | lyon | Vélov | | maribor | MBajk | | mulhouse | velocite | | namur | Li Bia Velo | | nancy | vélOstan'lib | | nantes | Naolib | | seville | Sevici | | toulouse | VélÔToulouse | | toyama | Cyclocity | | valence | Valenbisi | | vilnius | Cyclocity Vilnius | #### TTL - Time to live Le TTL suivant est défini pour chacune des ressources suivantes : | Resource | TTL (secondes) | |--------------------------|:--------------:| | gbfs.json | 3600 | | gbfs_versions.json | 3600 | | station_information.json | 300 | | station_status.json | 0 (temps réel) | | system_information.json | 3600 | | vehicule_types.json | 3600 |