zen-open-api v1.0.14
ZenduOne Open API library
JSON-RPC API documentation
Documentation available at link https://one-api-docs.zenduit.com/
How to Install on the project
Install the library on your angular app:
npm install zen-open-api --save
NodeJS requirements
To use library on NodeJs you need to install the package xhr2:
npm install xhr2 --save
License
The License available via this link https://docs.google.com/document/d/1gu0ttXK4bAs9qUreCH3XUKLKP8AB7Ib4q_BTy9d6ppg/edit?usp=sharing
Library Documentation
authWithGeotabSession
Authenticate with Geotab session. Usefull for Geotab add-in integration.
auth
Authenticate with One username/password
getDevices
This method return the tracking devices installed in the vehicles
Search parameters:
- comment?: string;
- deviceType?: string;
- fromDate?: Date | string;
- toDate?: Date | string;
- groups?: Array;
- licensePlate?: string;
- name?: string;
- serialNumber?: string;
- vehicleIdentificationNumber?: string;
- id?: string;
getDeviceStatuses
This method return the current states of a vehicles, including details such as the vehicle's location, speed.
Search parameters:
- closestAssetLimit?: number;
- deviceSearch?: Ref;
- userSearch?: Ref;
getCurrentUser
This method return the current authenticated user
getUsers
This method return the users/drivers. This method can be used in various ways to return all, one or some specific set of data for the Users.
Search parameters:
- fromDate?: Date | string;
- toDate?: Date | string;
- companyGroups?: Array;
- isDriver?: boolean;
- name?: string;
- serialNumber?: string;
- id?: string;
getTrips
This method retrieves vehicle trips. This method can be used in various ways to return all, one or some specific set of data for the Trips.
Search parameters:
- deviceSearch?: Ref;
- userSearch?: Ref;
- fromDate?: string | Date;
- toDate?: string | Date;
- includeOverlappedTrips?: boolean;
getExceptions
Gets the Exceptions. This method can be used in various ways to return all, one or some specific set of data for the Exceptions.
Search parameters:
- deviceSearch?: Ref;
- userSearch?: Ref;
- ruleSearch?: Ref;
- fromDate?: Date | string;
- toDate?: Date | string;
getZones
Gets the Zones. This method can be used in various ways to return all, one or some specific set of data for the Zones.
Search parameters:
- id?: string;
- groups?: Ref[],
- searchArea?: BoundingBox,
- minimumRadiusInMeters?: number;
getFaultData
Search the fault data
getDiagnostics
This method provides vehicle diagnostic information retrieved from the engine computer, encompassing both measurement data and fault code data.
Search parameters:
- id: string;
- fromDate?: Date | string;
getStatusData
This method return the current status data that match the search criteria.
Search parameters:
- deviceSearch: Ref;
- diagnosticSearch: Ref;
- fromDate?: Date | string;
- toDate?: Date | string;
- id?: string;
getLogRecords
This method return the GPS logs that match the search criteria.
Search parameters:
- fromDate?: Date | string;
- toDate?: Date | string;
- deviceSearch?: Ref;
getCustomEntities
This method return the custom entities for the specific entityType.
- entityType is name of custom entity type
addCustomEntity
Add the custom entity to the database.
- entityType is name of custom entity type
updateCustomEntity
Update the custom entity to the database.
- entityType is name of custom entity type
upsertCustomEntity
Upsert the custom entity to the database.
- entityType is name of custom entity type
removeCustomEntity
Remove the custom entity from database
uploadFile
Upload file to cloud storage. This method return url to cloud storage.
Development
Build
Run the command to build project
npm run build
Watch
Run the command to build and watch changes on library
npm run build