Feature Plan - Ara Partner GraphQL API

To provide solutions for more rich process in the real-time data collection, Ara SaaS will provide a GraphQL API to allow a Partner to update a specific part of the realtime data model.

Allow a Partner to modify the data model

The user can add the GraphQL connector to a Partner. By default, the Partner won’t be able to modify the data model.

Via the dedicated setting, the user can open permissions on specific attributes:

1 graphql.mutable_attributes = "vehicle.occupancyStatus,vehicle.occupacyRate"

By using one of the tokens associated to this Partner, the specified attributs can be modified by mutation GraphQL requests.

Update the data model

By performing GraphQL requests with the required token, on the GraphQL endpoint of the associated referential (for example: https://ara.enroute.mobi/test/graphql), an external software can complete the Ara realtime data model.

For example, to update the current occupancyStatus / occupacyRate of a Vehicle:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 mutation { updateVehicle(code: "24389", input: { occupancyStatus: "seatsAvailable", occupacyRate: 0.65 }) { code occupancyStatus occupancyRate } } mutation { updateVehicle(code: "24389", input: { occupancyStatus: "seatsAvailable"}) { code } } mutation { updateVehicle(code: "24389", input: { occupacyRate: 0.65 }) { code } }

Multiple mutations can be performed into a single request by using the GraphQL multiple queries mechanism.

The model updates are taken into account instantly. The next requests will broadcast the new values.

Each GraphQL request is historized like other Ara API exchanges. The user can follow the Partner activity by this way.