...
For example:
Code Block |
---|
POST /referential<referential_slugslug>/partners { "slug": "test", "connectorTypes": [ "gtfs-rt-trip-updates-broadcaster" ], "settings": { "local_credential": "secret", "remote_objectid_kind": "internal" } } |
Then the user can perform GTFS requests:
Code Block |
---|
GET /referential<referential_slugslug>/gtfs-rt GET /referential<referential_slugslug>/gtfs-rt/trip-updates GET /referential<referential_slugslug>/gtfs-rt/vehicle-positions |
Endpoints
The user can select the expected GTFS-RT entities by using one of the GTFS-RT endpoints:
Global endpoint /referential<referential_slugslug>/gtfs-rt
This endpoint provides all entities. If no GTFS-RT broadcaster is defined (gtfs-rt-trip-updates-broadcaster
, gtfs-rt-vehicle-positions-broadcaster
, etc), this endpoint returns a 501 status code.
Trip Update endpoint /referential<referential_slugslug>/gtfs-rt/trip-updates
This endpoint provides only Trip Update entities. If the gtfs-rt-trip-updates-broadcaster
is not defined into the associated Partner, this endpoint returns a 501 status code.
Vehicle Position endpoint /referential<referential_slugslug>/gtfs-rt/vehicle-positions
This endpoint provides only Trip Update entities. If the gtfs-rt-vehicle-positions-broadcaster
is not defined into the associated Partner, this endpoint returns a 501 status code.
...
The user can specify a credential in the GTFS-RT request by using an HTTP header Authorization
with this syntax : for secret
token, Authorization: Token token=secret
Code Block |
---|
GET /referential<referential_slugslug>/gtfs-rt Authorization: Token token=secret |
...
Code Block |
---|
GET /bibus/gtfs-rt
Authorization: Token token=secret |
...
Code Block |
---|
GET /bibus/gtfs-rt |
will be associated to the Partner C.
...
Code Block |
---|
GET /bibus/gtfs-rt
Authorization: Token token=dummy |
...