diff options
-rw-r--r-- | docs/api.md | 822 | ||||
-rw-r--r-- | swagger.json | 2 |
2 files changed, 1 insertions, 823 deletions
diff --git a/docs/api.md b/docs/api.md deleted file mode 100644 index 0ceb9467b..000000000 --- a/docs/api.md +++ /dev/null @@ -1,822 +0,0 @@ -# traccar -__Version__: 3.9 -__Base URL__: http://traccar.org/api - -### Contents -[Paths](#paths) -- [attributes](#paths_attributes) - - [PUT /attributes/aliases/{id}](#paths_attributesaliasesid_PUT) - - [DELETE /attributes/aliases/{id}](#paths_attributesaliasesid_DELETE) - - [POST /attributes/aliases](#paths_attributesaliases_POST) - - [GET /attributes/aliases](#paths_attributesaliases_GET) -- [commands](#paths_commands) - - [POST /commands](#paths_commands_POST) -- [commandtypes](#paths_commandtypes) - - [GET /commandtypes](#paths_commandtypes_GET) -- [devices](#paths_devices) - - [POST /devices](#paths_devices_POST) - - [GET /devices](#paths_devices_GET) - - [POST /devices/geofences](#paths_devicesgeofences_POST) - - [DELETE /devices/geofences](#paths_devicesgeofences_DELETE) - - [PUT /devices/{id}](#paths_devicesid_PUT) - - [DELETE /devices/{id}](#paths_devicesid_DELETE) - - [PUT /devices/{id}/distance](#paths_devicesiddistance_PUT) -- [events](#paths_events) - - [GET /events/{id}](#paths_eventsid_GET) -- [geofences](#paths_geofences) - - [PUT /geofences/{id}](#paths_geofencesid_PUT) - - [DELETE /geofences/{id}](#paths_geofencesid_DELETE) - - [POST /geofences](#paths_geofences_POST) - - [GET /geofences](#paths_geofences_GET) -- [groups](#paths_groups) - - [POST /groups/geofences](#paths_groupsgeofences_POST) - - [DELETE /groups/geofences](#paths_groupsgeofences_DELETE) - - [POST /groups](#paths_groups_POST) - - [GET /groups](#paths_groups_GET) - - [PUT /groups/{id}](#paths_groupsid_PUT) - - [DELETE /groups/{id}](#paths_groupsid_DELETE) -- [permissions](#paths_permissions) - - [POST /permissions/devices](#paths_permissionsdevices_POST) - - [DELETE /permissions/devices](#paths_permissionsdevices_DELETE) - - [POST /permissions/geofences](#paths_permissionsgeofences_POST) - - [DELETE /permissions/geofences](#paths_permissionsgeofences_DELETE) - - [POST /permissions/groups](#paths_permissionsgroups_POST) - - [DELETE /permissions/groups](#paths_permissionsgroups_DELETE) -- [positions](#paths_positions) - - [GET /positions](#paths_positions_GET) -- [reports](#paths_reports) - - [GET /reports/summary](#paths_reportssummary_GET) - - [GET /reports/events](#paths_reportsevents_GET) - - [GET /reports/route](#paths_reportsroute_GET) - - [GET /reports/trips](#paths_reportstrips_GET) -- [server](#paths_server) - - [PUT /server](#paths_server_PUT) - - [GET /server](#paths_server_GET) -- [session](#paths_session) - - [POST /session](#paths_session_POST) - - [DELETE /session](#paths_session_DELETE) - - [GET /session](#paths_session_GET) -- [statistics](#paths_statistics) - - [GET /statistics](#paths_statistics_GET) -- [users](#paths_users) - - [POST /users/notifications](#paths_usersnotifications_POST) - - [GET /users/notifications](#paths_usersnotifications_GET) - - [PUT /users/{id}](#paths_usersid_PUT) - - [DELETE /users/{id}](#paths_usersid_DELETE) - - [POST /users](#paths_users_POST) - - [GET /users](#paths_users_GET) - -[Models](#definitions) -- [AttributeAlias](#definitions_AttributeAlias) -- [Command](#definitions_Command) -- [CommandType](#definitions_CommandType) -- [Device](#definitions_Device) -- [DeviceGeofence](#definitions_DeviceGeofence) -- [DevicePermission](#definitions_DevicePermission) -- [DeviceTotalDistance](#definitions_DeviceTotalDistance) -- [Event](#definitions_Event) -- [Geofence](#definitions_Geofence) -- [GeofencePermission](#definitions_GeofencePermission) -- [Group](#definitions_Group) -- [GroupGeofence](#definitions_GroupGeofence) -- [GroupPermission](#definitions_GroupPermission) -- [Notification](#definitions_Notification) -- [Position](#definitions_Position) -- [ReportSummary](#definitions_ReportSummary) -- [ReportTrips](#definitions_ReportTrips) -- [Server](#definitions_Server) -- [Statistics](#definitions_Statistics) -- [User](#definitions_User) - -## <a name="paths"></a> Paths -### <a name="paths_attributes"></a> attributes -#### <a name="paths_attributesaliasesid_PUT"></a> `PUT /attributes/aliases/{id}` -__Summary__: Update an AttributeAlias -##### Parameters -Name | ParamType | Required | DataType | Schema ---- | --- | --- | --- | --- -_id_ | path | __True__ | _integer_ | -_body_ | body | __True__ | | [AttributeAlias](#definitions_AttributeAlias) -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [AttributeAlias](#definitions_AttributeAlias) -#### <a name="paths_attributesaliasesid_DELETE"></a> `DELETE /attributes/aliases/{id}` -__Summary__: Delete an AttributeAlias -##### Parameters -Name | ParamType | Required | DataType ---- | --- | --- | --- -_id_ | path | __True__ | _integer_ -##### Responses -Status Code | Description ---- | --- -_204_ | No Content -#### <a name="paths_attributesaliases_POST"></a> `POST /attributes/aliases` -__Summary__: Set an AttributeAlias -##### Parameters -Name | ParamType | Required | Schema ---- | --- | --- | --- -_body_ | body | __True__ | [AttributeAlias](#definitions_AttributeAlias) -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [AttributeAlias](#definitions_AttributeAlias) -#### <a name="paths_attributesaliases_GET"></a> `GET /attributes/aliases` -__Summary__: Fetch a list of AttributeAlias -__Description__: Without params, it returns a list of AttributeAlias from all the user's Devices -##### Parameters -Name | ParamType | Description | DataType ---- | --- | --- | --- -_deviceId_ | query | Standard users can use this only with _userId_s, they have access to | _integer_ -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [ [AttributeAlias](#definitions_AttributeAlias) ] - -### <a name="paths_commands"></a> commands -#### <a name="paths_commands_POST"></a> `POST /commands` -__Summary__: Dispatch commands to device -##### Parameters -Name | ParamType | Required | Schema ---- | --- | --- | --- -_body_ | body | __True__ | [Command](#definitions_Command) -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [Command](#definitions_Command) -_400_ | Could happen when dispatching to a device that is offline, the user doesn't have permission or an incorrect command _type_ for the device | - -### <a name="paths_commandtypes"></a> commandtypes -#### <a name="paths_commandtypes_GET"></a> `GET /commandtypes` -__Summary__: Fetch a list of available Commands for the Device -##### Parameters -Name | ParamType | Required | DataType ---- | --- | --- | --- -_deviceId_ | query | __True__ | _integer_ -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [ [CommandType](#definitions_CommandType) ] -_400_ | Could happen when trying to fetch from an pffline device or the user does not have permission | - -### <a name="paths_devices"></a> devices -#### <a name="paths_devices_POST"></a> `POST /devices` -__Summary__: Create a Device -##### Parameters -Name | ParamType | Required | Schema ---- | --- | --- | --- -_body_ | body | __True__ | [Device](#definitions_Device) -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [Device](#definitions_Device) -#### <a name="paths_devices_GET"></a> `GET /devices` -__Summary__: Fetch a list of Devices -__Description__: Without any params, returns a list of the user's devices -##### Parameters -Name | ParamType | Description >-Name | ParamType | Required | Schema ---- | --- | --- | --- -_body_ | body | __True__ | [DeviceGeofence](#definitions_DeviceGeofence) -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [DeviceGeofence](#definitions_DeviceGeofence) -#### <a name="paths_devicesgeofences_DELETE"></a> `DELETE /devices/geofences` -__Summary__: Remove a Geofence from a Device -##### Parameters -Name | ParamType | Required | Schema ---- | --- | --- | --- -_body_ | body | __True__ | [DeviceGeofence](#definitions_DeviceGeofence) -##### Responses -Status Code | Description ---- | --- -_204_ | No Content -#### <a name="paths_devicesid_PUT"></a> `PUT /devices/{id}` -__Summary__: Update a Device -##### Parameters -Name | ParamType | Required | DataType | Schema ---- | --- | --- | --- | --- -_id_ | path | __True__ | _integer_ | -_body_ | body | __True__ | | [Device](#definitions_Device) -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [Device](#definitions_Device) -#### <a name="paths_devicesid_DELETE"></a> `DELETE /devices/{id}` -__Summary__: Update a Device -##### Parameters -Name | ParamType | Required | DataType ---- | --- | --- | --- -_id_ | path | __True__ | _integer_ -##### Responses -Status Code | Description ---- | --- -_204_ | No Content -#### <a name="paths_devicesiddistance_PUT"></a> `PUT /devices/{id}/distance` -__Summary__: Update the distance counter of the Device -##### Parameters -Name | ParamType | Required | DataType | Schema ---- | --- | --- | --- | --- -_id_ | path | __True__ | _integer_ | -_body_ | body | __True__ | | [DeviceTotalDistance](#definitions_DeviceTotalDistance) -##### Responses -Status Code | Description ---- | --- -_204_ | No Content - -### <a name="paths_events"></a> events -#### <a name="paths_eventsid_GET"></a> `GET /events/{id}` -##### Parameters -Name | ParamType | Required | DataType ---- | --- | --- | --- -_id_ | path | __True__ | _integer_ -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [Event](#definitions_Event) - -### <a name="paths_geofences"></a> geofences -#### <a name="paths_geofencesid_PUT"></a> `PUT /geofences/{id}` -__Summary__: Update a Geofence -##### Parameters -Name | ParamType | Required | DataType | Schema ---- | --- | --- | --- | --- -_id_ | path | __True__ | _integer_ | -_body_ | body | __True__ | | [Geofence](#definitions_Geofence) -##### Responses -Status Code | Description | Schema ---- | --- | --- -_200_ | OK | [Geofence](#definitions_Geofence) -#### <a name="paths_geofencesid_DELETE"></a> `DELETE /geofences/{id}` -__Summary__: Delete a Geofence -##### Parameters -Name | ParamType | Required | DataType ---- | --- | --- | --- -_id_ | path | __True__ | _integer_ -##### Responses -Status Code | Description ---- | --- -_204_ | No Content -#### <a name="paths_geofences_POST"></a> `POST /geofences` -__Summary__: Create a Geofence -##### Parameters -Name | ParamType | Required | oscript> |