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 {
searchScheduledJourneys {
depotId
blockId
day
distance
line
startPoint {
...JourneyPointFragment
}
endPoint {
...JourneyPointFragment
}
points {
...JourneyPointFragment
}
externalId
}
searchAssignedJourneys {
depotId
blockId
day
registeredAt
vehicleNumber
distance
line
startPoint {
...JourneyPointFragment
}
endPoint {
...JourneyPointFragment
}
points {
...JourneyPointFragment
}
type
externalId
}
findAssignedJourney {
depotId
blockId
day
registeredAt
vehicleNumber
distance
line
startPoint {
...JourneyPointFragment
}
endPoint {
...JourneyPointFragment
}
points {
...JourneyPointFragment
}
type
externalId
}
}
}
Response
{
"data": {
"schedule": {
"searchScheduledJourneys": [ScheduledJourney],
"searchAssignedJourneys": [AssignedJourney],
"findAssignedJourney": AssignedJourney
}
}
}
telemetry
Response
Returns a TelemetryQueries!
Example
Query
query Telemetry {
telemetry {
findDailyVehicleTelemetry {
vehicleId {
...VehicleIdFragment
}
date
odometerCan {
...FloatMetricFragment
}
odometerGps {
...FloatMetricFragment
}
totalFuelConsumed {
...FloatMetricFragment
}
engineTotalHours {
...IntMetricFragment
}
}
}
}
Response
{
"data": {
"telemetry": {
"findDailyVehicleTelemetry": [DailyVehicleTelemetry]
}
}
}
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 {
registerScheduledJourneys
removeScheduledJourneys {
removedJourneys
errors
}
assignVehicleJourneys
removeVehicleJourneys {
removedJourneys
errors
}
assignJourneys
reassignJourneys
removeAssignedJourney
}
}
Response
{
"data": {
"schedule": {
"registerScheduledJourneys": [
"abc123"
],
"removeScheduledJourneys": RemoveScheduledJourneysResult,
"assignVehicleJourneys": ["abc123"],
"removeVehicleJourneys": RemoveVehicleJourneysResult,
"assignJourneys": false,
"reassignJourneys": 123,
"removeAssignedJourney": false
}
}
}
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": "xyz789",
"depotId": "xyz789",
"blockId": "xyz789",
"day": "2007-12-03",
"journeys": [JourneyInput]
}
AssignVehicleJourneysInput
Example
{
"companyId": "abc123",
"depotId": "abc123",
"blockId": "xyz789",
"day": "2007-12-03",
"assignments": [VehicleAssignment],
"allowOverassignment": true,
"receivedAt": "2007-12-03T10:15:30Z"
}
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!
|
|
externalId - String
|
Example
{
"depotId": "abc123",
"blockId": "abc123",
"day": "2007-12-03T10:15:30Z",
"registeredAt": "2007-12-03T10:15:30Z",
"vehicleNumber": "abc123",
"distance": 123,
"line": "xyz789",
"startPoint": JourneyPoint,
"endPoint": JourneyPoint,
"points": [JourneyPoint],
"type": "SERVICE",
"externalId": "abc123"
}
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
}
DailyVehicleTelemetry
Fields
Field Name | Description |
---|---|
vehicleId - VehicleId!
|
|
date - Date!
|
|
odometerCan - FloatMetric
|
|
odometerGps - FloatMetric
|
|
totalFuelConsumed - FloatMetric
|
|
engineTotalHours - IntMetric
|
Example
{
"vehicleId": VehicleId,
"date": "2007-12-03",
"odometerCan": FloatMetric,
"odometerGps": FloatMetric,
"totalFuelConsumed": FloatMetric,
"engineTotalHours": IntMetric
}
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": 123,
"distanceCan": 987.65,
"distanceGps": 123.45,
"odometer": 123.45,
"consumption": EnergyConsumption
}
EnergyConsumption
FindAssignedJourneyFilter
FindDailyVehicleTelemetryFilter
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65
FloatMetric
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
123
IntMetric
JSON
Example
{}
JourneyInput
Fields
Input Field | Description |
---|---|
vehicleNumber - String!
|
|
distance - Int!
|
|
line - String
|
|
startPoint - JourneyPointInput!
|
|
endPoint - JourneyPointInput!
|
|
externalId - String
|
Example
{
"vehicleNumber": "abc123",
"distance": 987,
"line": "xyz789",
"startPoint": JourneyPointInput,
"endPoint": JourneyPointInput,
"externalId": "abc123"
}
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": "abc123",
"driver": Driver,
"restriction": "NONE"
}
JourneySummaryDetails
Types
Union Types |
---|
Example
FuelDetails
JourneySummaryPage
Fields
Field Name | Description |
---|---|
totalCount - Int!
|
|
items - [JourneySummary!]!
|
Example
{"totalCount": 123, "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
ReassignJourneysInput
Example
{
"companyId": "abc123",
"depotId": "abc123",
"blockId": "abc123",
"day": "2007-12-03",
"vehicleNumber": "xyz789",
"timeFrom": "2007-12-03T10:15:30Z",
"timeTo": "2007-12-03T10:15:30Z"
}
RegisterScheduledJourneysInput
Fields
Input Field | Description |
---|---|
companyId - String!
|
|
depotId - String!
|
|
blockId - String!
|
|
day - Date!
|
|
journeys - [ScheduledJourneyInput!]!
|
Example
{
"companyId": "abc123",
"depotId": "abc123",
"blockId": "xyz789",
"day": "2007-12-03",
"journeys": [ScheduledJourneyInput]
}
RemoveAssignedJourneyInput
Example
{
"companyId": "xyz789",
"depotId": "abc123",
"blockId": "abc123",
"day": "2007-12-03",
"line": "abc123",
"vehicleNumber": "abc123",
"startPointTime": "2007-12-03T10:15:30Z",
"endPointTime": "2007-12-03T10:15:30Z"
}
RemoveScheduledJourneysInput
RemoveScheduledJourneysResult
RemoveVehicleJourneysInput
Example
{
"companyId": "abc123",
"depotId": "xyz789",
"blockId": "xyz789",
"day": "2007-12-03",
"from": "2007-12-03T10:15:30Z",
"to": "2007-12-03T10:15:30Z",
"vehicleNumber": "xyz789"
}
RemoveVehicleJourneysResult
ScheduleMutations
Fields
Field Name | Description |
---|---|
registerScheduledJourneys - [String!]!
|
|
Arguments
|
|
removeScheduledJourneys - RemoveScheduledJourneysResult!
|
|
Arguments
|
|
assignVehicleJourneys - [String!]!
|
|
Arguments
|
|
removeVehicleJourneys - RemoveVehicleJourneysResult!
|
|
Arguments
|
|
assignJourneys - Boolean
|
|
Arguments
|
|
reassignJourneys - Int!
|
|
Arguments
|
|
removeAssignedJourney - Boolean
|
|
Arguments
|
Example
{
"registerScheduledJourneys": ["xyz789"],
"removeScheduledJourneys": RemoveScheduledJourneysResult,
"assignVehicleJourneys": ["abc123"],
"removeVehicleJourneys": RemoveVehicleJourneysResult,
"assignJourneys": false,
"reassignJourneys": 123,
"removeAssignedJourney": true
}
ScheduleQueries
Fields
Field Name | Description |
---|---|
searchScheduledJourneys - [ScheduledJourney!]!
|
|
Arguments
|
|
searchAssignedJourneys - [AssignedJourney!]!
|
|
Arguments
|
|
findAssignedJourney - AssignedJourney
|
|
Arguments
|
Example
{
"searchScheduledJourneys": [ScheduledJourney],
"searchAssignedJourneys": [AssignedJourney],
"findAssignedJourney": AssignedJourney
}
ScheduledJourney
Fields
Field Name | Description |
---|---|
depotId - String!
|
|
blockId - String!
|
|
day - DateTime!
|
|
distance - Int
|
|
line - String
|
|
startPoint - JourneyPoint!
|
|
endPoint - JourneyPoint!
|
|
points - [JourneyPoint!]
|
|
externalId - String
|
Example
{
"depotId": "abc123",
"blockId": "abc123",
"day": "2007-12-03T10:15:30Z",
"distance": 987,
"line": "abc123",
"startPoint": JourneyPoint,
"endPoint": JourneyPoint,
"points": [JourneyPoint],
"externalId": "abc123"
}
ScheduledJourneyInput
Fields
Input Field | Description |
---|---|
distance - Int!
|
|
line - String
|
|
startPoint - StopPointInput!
|
|
endPoint - StopPointInput!
|
|
externalId - String
|
Example
{
"distance": 987,
"line": "abc123",
"startPoint": StopPointInput,
"endPoint": StopPointInput,
"externalId": "abc123"
}
SearchAssignedJourneysFilter
SearchJourneySummariesFilter
SearchScheduledJourneysFilter
SearchVehiclesFilter
Example
{
"companyId": "xyz789",
"internalNumber": "xyz789",
"divisionId": "xyz789",
"fuelType": "ELECTRIC",
"vin": "abc123",
"bmsId": "abc123",
"deleted": true
}
StopPointInput
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"
TelemetryQueries
Fields
Field Name | Description |
---|---|
findDailyVehicleTelemetry - [DailyVehicleTelemetry!]!
|
|
Arguments
|
Example
{"findDailyVehicleTelemetry": [DailyVehicleTelemetry]}
UpdateVehicleInput
Fields
Input Field | Description |
---|---|
companyId - String!
|
|
vehicleId - String!
|
|
vehicleMetadata - VehicleMetadata!
|
Example
{
"companyId": "abc123",
"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": "abc123",
"companyId": "abc123",
"internalNumber": "xyz789",
"divisionId": "xyz789",
"fuelType": "ELECTRIC",
"bmsId": "xyz789",
"vin": "xyz789",
"model": "xyz789",
"make": "abc123",
"vehicleType": "abc123",
"devices": [VehicleDevice],
"batteryKwh": 987.65,
"consumptionPerKm": 987.65,
"deleted": false,
"svv": {}
}
VehicleAssignment
VehicleDevice
VehicleId
VehicleMetadata
Example
{
"internalNumber": "xyz789",
"fuelType": "ELECTRIC",
"divisionId": "xyz789",
"bmsId": "abc123",
"vin": "xyz789",
"model": "xyz789",
"make": "xyz789",
"batteryKwh": 987.65,
"consumptionPerKm": 123.45,
"registrationNumber": "xyz789",
"vehicleType": "xyz789",
"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]}