Tenix Open Data Platform API - GraphQL Documentation
Historical data API
API Endpoints
# Tenix Open Data Platform API:
https://openapi.platform.tenix.eu/graphql
Queries
journey
Response
Returns a JourneyQueries!
Example
Query
query Journey {
journey {
searchJourneySummaries {
totalCount
items {
...JourneySummaryFragment
}
}
}
}
Response
{
"data": {
"journey": {
"searchJourneySummaries": JourneySummaryPage
}
}
}
organization
Response
Returns an OrganizationQueries!
Example
Query
query Organization {
organization {
getOrganization {
companies {
...CompanyFragment
}
}
}
}
Response
{
"data": {
"organization": {"getOrganization": Organization}
}
}
schedule
Response
Returns a ScheduleQueries!
Example
Query
query Schedule {
schedule {
searchAssignedJourneys {
depotId
blockId
day
registeredAt
vehicleNumber
distance
line
startPoint {
...JourneyPointFragment
}
endPoint {
...JourneyPointFragment
}
points {
...JourneyPointFragment
}
type
}
}
}
Response
{
"data": {
"schedule": {
"searchAssignedJourneys": [AssignedJourney]
}
}
}
vehicle
Response
Returns a VehicleQueries!
Example
Query
query Vehicle {
vehicle {
searchVehicles {
id
companyId
internalNumber
divisionId
fuelType
bmsId
vin
model
make
vehicleType
devices {
...VehicleDeviceFragment
}
batteryKwh
consumptionPerKm
deleted
svv
}
}
}
Response
{"data": {"vehicle": {"searchVehicles": [Vehicle]}}}
Mutations
schedule
Response
Returns a ScheduleMutations!
Example
Query
mutation Schedule {
schedule {
assignJourneys
removeAssignedJourney
}
}
Response
{"data": {"schedule": {"assignJourneys": true, "removeAssignedJourney": true}}}
vehicle
Response
Returns a VehicleMutations!
Example
Query
mutation Vehicle {
vehicle {
createVehicle {
message
id
}
updateVehicle {
message
id
}
}
}
Response
{
"data": {
"vehicle": {
"createVehicle": VehicleResult,
"updateVehicle": VehicleResult
}
}
}
Types
AssignJourneysInput
Fields
Input Field | Description |
---|---|
companyId - String!
|
|
depotId - String!
|
|
blockId - String!
|
|
day - Date!
|
|
journeys - [JourneyInput!]!
|
Example
{
"companyId": "abc123",
"depotId": "xyz789",
"blockId": "abc123",
"day": "2007-12-03",
"journeys": [JourneyInput]
}
AssignedJourney
Fields
Field Name | Description |
---|---|
depotId - String!
|
|
blockId - String!
|
|
day - DateTime!
|
|
registeredAt - DateTime!
|
|
vehicleNumber - String!
|
|
distance - Int!
|
|
line - String
|
|
startPoint - JourneyPoint!
|
|
endPoint - JourneyPoint!
|
|
points - [JourneyPoint!]!
|
|
type - JourneyType!
|
Example
{
"depotId": "abc123",
"blockId": "xyz789",
"day": "2007-12-03T10:15:30Z",
"registeredAt": "2007-12-03T10:15:30Z",
"vehicleNumber": "xyz789",
"distance": 123,
"line": "abc123",
"startPoint": JourneyPoint,
"endPoint": JourneyPoint,
"points": [JourneyPoint],
"type": "SERVICE"
}
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
CacheControlScope
Values
Enum Value | Description |
---|---|
|
|
|
Example
"PUBLIC"
Company
Fields
Field Name | Description |
---|---|
id - String!
|
|
name - String!
|
|
active - Boolean!
|
|
divisions - [Division!]!
|
|
depots - [Depot!]!
|
Example
{
"id": "abc123",
"name": "abc123",
"active": true,
"divisions": [Division],
"depots": [Depot]
}
CreateVehicleInput
Fields
Input Field | Description |
---|---|
companyId - String!
|
|
vehicleMetadata - VehicleMetadata!
|
Example
{
"companyId": "abc123",
"vehicleMetadata": VehicleMetadata
}
Date
Example
"2007-12-03"
DateTime
Example
"2007-12-03T10:15:30Z"
Depot
Division
Driver
EcoDriveSummary
ElectricDetails
Fields
Field Name | Description |
---|---|
drivingTime - Int
|
|
distanceCan - Float
|
|
distanceGps - Float
|
|
odometer - Float
|
|
consumption - EnergyConsumption
|
Example
{
"drivingTime": 987,
"distanceCan": 987.65,
"distanceGps": 987.65,
"odometer": 987.65,
"consumption": EnergyConsumption
}
EnergyConsumption
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65
FuelConsumption
FuelDetails
FuelType
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
Example
"ELECTRIC"
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
987
JSON
Example
{}
JourneyInput
Fields
Input Field | Description |
---|---|
vehicleNumber - String!
|
|
distance - Int!
|
|
line - String
|
|
startPoint - JourneyPointInput!
|
|
endPoint - JourneyPointInput!
|
Example
{
"vehicleNumber": "abc123",
"distance": 123,
"line": "abc123",
"startPoint": JourneyPointInput,
"endPoint": JourneyPointInput
}
JourneyPoint
JourneyPointInput
JourneyQueries
Fields
Field Name | Description |
---|---|
searchJourneySummaries - JourneySummaryPage!
|
|
Arguments |
Example
{"searchJourneySummaries": JourneySummaryPage}
JourneySort
Fields
Input Field | Description |
---|---|
column - JourneySortColumns!
|
|
order - Order!
|
Example
{"column": "ID", "order": "ASCENDING"}
JourneySortColumns
Values
Enum Value | Description |
---|---|
|
Example
"ID"
JourneySummary
Description
A JourneySummary represents a single instance of driving activity performed by a Driver in a specific Vehicle within a Division.
Fields
Field Name | Description |
---|---|
id - String!
|
|
divisionId - String
|
|
start - JourneySummaryPoint!
|
|
end - JourneySummaryPoint!
|
|
ecoDrive - EcoDriveSummary
|
|
details - JourneySummaryDetails!
|
|
vehicleInternalNumber - String!
|
|
driver - Driver
|
|
restriction - JourneySummaryRestriction
|
Example
{
"id": "abc123",
"divisionId": "abc123",
"start": JourneySummaryPoint,
"end": JourneySummaryPoint,
"ecoDrive": EcoDriveSummary,
"details": FuelDetails,
"vehicleInternalNumber": "xyz789",
"driver": Driver,
"restriction": "NONE"
}
JourneySummaryDetails
Types
Union Types |
---|
Example
FuelDetails
JourneySummaryPage
Fields
Field Name | Description |
---|---|
totalCount - Int!
|
|
items - [JourneySummary!]!
|
Example
{"totalCount": 987, "items": [JourneySummary]}
JourneySummaryPoint
JourneySummaryRestriction
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"NONE"
JourneyType
Values
Enum Value | Description |
---|---|
|
|
|
|
|
Example
"SERVICE"
Order
Values
Enum Value | Description |
---|---|
|
|
|
Example
"ASCENDING"
Organization
Fields
Field Name | Description |
---|---|
companies - [Company!]!
|
Example
{"companies": [Company]}
OrganizationQueries
Fields
Field Name | Description |
---|---|
getOrganization - Organization!
|
Example
{"getOrganization": Organization}
Pagination
RemoveAssignedJourneyInput
Example
{
"companyId": "abc123",
"depotId": "xyz789",
"blockId": "xyz789",
"day": "2007-12-03",
"line": "abc123",
"vehicleNumber": "abc123",
"startPointTime": "2007-12-03T10:15:30Z",
"endPointTime": "2007-12-03T10:15:30Z"
}
ScheduleMutations
Fields
Field Name | Description |
---|---|
assignJourneys - Boolean
|
|
Arguments
|
|
removeAssignedJourney - Boolean
|
|
Arguments
|
Example
{"assignJourneys": true, "removeAssignedJourney": true}
ScheduleQueries
Fields
Field Name | Description |
---|---|
searchAssignedJourneys - [AssignedJourney!]!
|
|
Arguments
|
Example
{"searchAssignedJourneys": [AssignedJourney]}
SearchAssignedJourneysFilter
SearchJourneySummariesFilter
SearchVehiclesFilter
Example
{
"companyId": "abc123",
"internalNumber": "xyz789",
"divisionId": "xyz789",
"fuelType": "ELECTRIC",
"vin": "abc123",
"bmsId": "xyz789",
"deleted": false
}
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
UpdateVehicleInput
Fields
Input Field | Description |
---|---|
companyId - String!
|
|
vehicleId - String!
|
|
vehicleMetadata - VehicleMetadata!
|
Example
{
"companyId": "xyz789",
"vehicleId": "xyz789",
"vehicleMetadata": VehicleMetadata
}
Vehicle
Fields
Field Name | Description |
---|---|
id - String
|
|
companyId - String
|
|
internalNumber - String
|
|
divisionId - String
|
|
fuelType - FuelType
|
|
bmsId - String
|
|
vin - String
|
|
model - String
|
|
make - String
|
|
vehicleType - String
|
|
devices - [VehicleDevice!]
|
|
batteryKwh - Float
|
|
consumptionPerKm - Float
|
|
deleted - Boolean
|
|
svv - JSON
|
Example
{
"id": "xyz789",
"companyId": "xyz789",
"internalNumber": "xyz789",
"divisionId": "xyz789",
"fuelType": "ELECTRIC",
"bmsId": "abc123",
"vin": "xyz789",
"model": "xyz789",
"make": "abc123",
"vehicleType": "xyz789",
"devices": [VehicleDevice],
"batteryKwh": 987.65,
"consumptionPerKm": 123.45,
"deleted": false,
"svv": {}
}
VehicleDevice
VehicleMetadata
Example
{
"internalNumber": "abc123",
"fuelType": "ELECTRIC",
"divisionId": "xyz789",
"bmsId": "abc123",
"vin": "xyz789",
"model": "abc123",
"make": "abc123",
"batteryKwh": 987.65,
"consumptionPerKm": 123.45,
"registrationNumber": "xyz789",
"vehicleType": "abc123",
"deleted": true
}
VehicleMutations
Fields
Field Name | Description |
---|---|
createVehicle - VehicleResult!
|
|
Arguments
|
|
updateVehicle - VehicleResult!
|
|
Arguments
|
Example
{
"createVehicle": VehicleResult,
"updateVehicle": VehicleResult
}
VehicleQueries
Fields
Field Name | Description |
---|---|
searchVehicles - [Vehicle!]!
|
|
Arguments
|
Example
{"searchVehicles": [Vehicle]}