Skip to main content

API methods

A list of API methods by group, with the purpose of each. Request and response schemas are provided in the Swagger UI (nav.gpspos.ru/api/docs), where the methods can be executed from the browser.

Paths are shown with the /api/ prefix used in a standard installation (see base path). All methods except obtaining a token require the Authorization: Bearer <token> header and return data within the user's access rights.

Authentication​

  • POST /api/Token — obtain a token with a login and password; see Authentication.

Objects​

  • GET /api/Profile — the user profile, as in the web interface: objects without sensor calibrations, geozones, drivers, keys, templates, icon catalogues, and the current server time; see Quick start.
  • GET /api/Objects, GET /api/Objects/{id} — the list of monitored objects and a single object card with all fields.
  • GET /api/Objects/lite, GET /api/Objects/lite/{id} — the same with a reduced set of fields.
  • POST /api/Objects, PUT /api/Objects, DELETE /api/Objects/{id} — create, update, and delete an object.
  • DELETE /api/Objects/delete — delete several objects by a list of identifiers.
  • GET /api/Objects/byimei/{imei}, GET /api/Objects/byname/{name} — look up an object by IMEI and by name.
  • GET /api/Objects/imei/{imei}/available — check IMEI availability before creating an object.
  • GET /api/Objects/company/{companyId} — objects of the specified company: the user's own company or one of its child companies.
  • GET /api/Objects/models — the catalogue of supported device models.
  • GET /api/Objects/Icons, GET /api/Objects/SensorIcons, POST /api/Objects/geticons — object and sensor icon catalogues.
  • POST /api/Objects/seticon/{iconId} — assign an icon to a list of objects.
  • GET /api/Objects/odometer/{objectId} — the current odometer value.
  • PUT /api/Objects/SyncOdometer/{id}/{value}, PUT /api/Objects/SyncEngineTime/{id}/{value} — synchronise the odometer and the engine hours counter with the dashboard readings.
  • POST /api/Objects/setowner — transfer the objects ObjectIds from the company FromCompanyId to the company ToCompanyId. Both companies must be in the user's company hierarchy, and all objects must belong to FromCompanyId.
  • GET /api/Objects/Groups, GET /api/Objects/Groups/{id}, POST, PUT, DELETE /api/Objects/Groups/{id} — object groups.
note

The ToCompanyId field of POST /api/Objects/setowner used to be called ToUserId. A request with the old field name is rejected with 403.

Current state​

  • GET /api/ObjectsStatus — the current state of all available objects: last position, sensor values, attached driver keys, aggregated statistics.
  • GET /api/ObjectsStatus/{id} — the current state of one object.

History and tracks​

  • POST /api/ObjectsHistory — the track, events, sensor values, and files of an object over an interval no longer than one month.
  • POST /api/ObjectsHistory/Common — driver sessions, daily statistics, and tasks for one object or for all objects of the user.
  • POST /api/ObjectsHistory/DriverSessions, POST /api/ObjectsHistory/DriverSessions/{objectId} — driver sessions over an interval.
  • POST /api/ObjectsHistory/DailyStat, POST /api/ObjectsHistory/DailyStat/{objectId} — daily statistics.
  • POST /api/ObjectsHistory/Events, POST /api/ObjectsHistory/Events/{objectId} — events over an interval.
  • POST /api/ObjectsHistory/ParkingMoto — parkings and engine operation.
  • POST /api/ObjectPackets — packets received from the object's device over an interval, in their original form.
  • POST /api/ObjectHistoryImport/import — queue a history import job; returns an operation identifier.
  • GET /api/ObjectHistoryImport/import/status/{operationId} — the status of an import job.

Events​

  • GET /api/Events/feed — unacknowledged events for the notification feed, excluding events from groups muted by the user.
  • GET /api/Events — the same list without that filtering.
  • POST /api/Events/ack — acknowledge events by a list of identifiers. An unacknowledged event is returned in every subsequent response.
  • GET /api/EventSettings, GET /api/EventSettings/{id}, POST, PUT, DELETE /api/EventSettings/{id} — event settings.
  • GET /api/EventSettingsGroups, GET /api/EventSettingsGroups/{id}, POST, PUT, DELETE /api/EventSettingsGroups/{id} — event setting groups.

Reports​

  • GET /api/ReportTemplates, GET /api/ReportTemplates/{id} — report templates.
  • PUT /api/ReportTemplates, DELETE /api/ReportTemplates/{id} — update and delete a template.
  • GET /api/ReportTemplates/GetReportTypes — the catalogue of available report types.
  • GET /api/ReportTemplates/GetReportColumns/{reportType} — the set of columns for the specified report type.
  • GET /api/ReportTemplates/GetReportResult/{id} — the result of a previously generated report.
  • POST /api/Reports/Moto — equipment operation report (ignition, special mechanisms) over an interval.
  • POST /api/Reports/GeozoneVisit — geozone visit report.
  • POST /api/Reports/Counters — object counters report.
  • POST /api/Reports/Fuel — fuel report.
note

Creating a report template and requesting a report by template use the same path POST /api/ReportTemplates, and the call therefore fails. The limitation will be removed in a future version. Report generation is available in the web interface, section Reports; the result is returned by GET /api/ReportTemplates/GetReportResult/{id}.

Geozones​

  • GET /api/Geozones — the list of geozones.
  • POST /api/Geozones, PUT /api/Geozones, DELETE /api/Geozones/{id} — create, update, and delete a geozone.
  • GET /api/Geozones/Groups, GET /api/Geozones/Groups/{id}, POST, PUT, DELETE /api/Geozones/Groups/{id} — geozone groups.

Drivers​

The entities below share a single set of methods: GET — the list, GET /{id} — a single record, POST — create, PUT — update, DELETE /{id} — delete.

  • /api/Drivers — drivers; /api/DriverGroups — driver groups.
  • /api/DriverKeys — driver keys and tags; /api/DriverKeyGroups — key groups.
  • /api/DriverShifts — driver shifts.
  • /api/DriverPenalties — driver penalties; only GET and PUT are available.

Commands​

  • POST /api/Commands/run — send a command to a list of objects by template or as a raw string. A successful response indicates that the command has been queued for delivery to the device.
  • GET /api/CommandTemplates, POST, PUT, DELETE /api/CommandTemplates/{id} — command templates.

Users and companies​

These methods are available to users with administration rights.

  • GET /api/Users, GET /api/Users/{id}, POST, PUT, DELETE /api/Users/{id} — system users.
  • GET /api/Companies, GET /api/Companies/{id}, POST /api/Companies, PUT /api/Companies — companies.
  • GET /api/Companies/statistics — summary statistics by company.

Geocoder and files​

  • POST /api/ReverseGeocoder — resolve addresses for a list of coordinates.
  • POST /api/ObjectFiles — look up a file received from a device (photo, video).
  • GET /api/ObjectFiles/{id} — download the file body.
  • PUT /api/ObjectFiles/{id}, PUT /api/ObjectFiles/{id}/{time} — attach a file to an object. The methods accept multipart/form-data.