A REST API (Representational State Transfer) is a set of functions that allows communication and data exchange between different systems over the web. It uses standard HTTP methods such as GET, POST, PUT, DELETE to perform operations on resources, represented in JSON format. REST APIs are widely used for their simplicity, flexibility, and scalability.
The Factory IL GPS REST API provides a robust and secure way to integrate Factory IL GPS's functionalities into your own applications. By following the guidelines above, you can make efficient requests and correctly manage errors and API limits. For more details, refer to the full Factory IL GPS REST API documentation .
Uses of a REST API
- System Integration: Allows different systems and applications to communicate and share data efficiently.
- Process Automation: Facilitates the automation of tasks and workflows.
- Functionality Extension: Enables developers to add new functionalities to existing applications without modifying the base code.
- Mobile Application Development: Provides an easy way to connect mobile applications to backend services.
- Remote Access to Services: Allows access to services and data from anywhere with an internet connection.
Base URL for Requests
The base URL for all requests to the Factory IL GPS REST API is:
Authentication Method
To communicate with the Factory IL GPS service, you must authenticate using an OAuth scheme. The first step is to generate a JWT (JSON Web Token) access token. This token is obtained through the following operation:
- Endpoint:
/api/Auth/Token
- Method:
POST
- Description: Obtain the Auth token required to make requests to other API endpoints.
How to Use OAuth in Factory IL GPS
-
Generate an Authentication Token:
- Endpoint:
/api/Auth/Token
- Method:
POST
- Description: Obtain the Auth token required to make requests to other API endpoints.
- Request Example:
{ "userName": "your_username", "apiKey": "your_api_key" }
- Endpoint:
-
Include the Token in Requests:
- Once the token is obtained, you must include it in the header of each API request.
- Header:
Authorization: Bearer your_token
- Example of a GET request:
GET /api/devices
HTTP/1.1 Host: api.plaspy.com
Authorization: Bearer your_token
Operations
Below is a table of available operations in the Factory IL GPS REST API:
Operation | Method | Endpoint | Description |
---|---|---|---|
Get Authentication Token | POST | /api/Auth/Token |
Obtain the Auth token to make requests to other endpoints. |
List Devices | GET | /api/devices |
List active devices in the account. |
Device Information | GET | /api/devices/{deviceId} |
Get information about a specific device. |
Last Location | GET | /api/devices/{deviceId}/lastLocation |
Get the last recorded location of a device. |
Get Locations | POST | /api/devices/{deviceId}/locations |
Get locations of a device within a date range. |
Get Alerts | POST | /api/devices/{deviceId}/alerts |
Get alerts generated by a device within a date range. |
List Groups | GET | /api/groups |
List all groups created in the account. |
Create Group | POST | /api/groups |
Create a new group. |
Group Information | GET | /api/groups/{groupId} |
Get information about a specific group. |
Update Group | PUT | /api/groups/{groupId} |
Update information about a specific group. |
Delete Group | DELETE | /api/groups/{groupId} |
Delete a specific group. |
List Users | GET | /api/users |
List users registered in the account. |
Create User | POST | /api/users |
Create a new user. |
User Information | GET | /api/users/{userId} |
Get information about a specific user. |
Update User | PUT | /api/users/{userId} |
Update information about a specific user. |
Delete User | DELETE | /api/users/{userId} |
Delete a specific user. |
Get Countries | GET | /api/users/countries |
Get the list of available countries. |
Get Time Zones | GET | /api/users/timeZones |
Get the list of available time zones. |
HTTP Status Codes
Status Code | Description |
---|---|
200 OK | The request was successful. |
201 Created | The request was successful and a new resource was created. |
400 Bad Request | There is an issue on the client side, parameters need to be validated. |
401 Unauthorized | A valid token was not provided. |
403 Forbidden | The user associated with the token does not have permission to make the request. |
404 Not Found | The requested resource does not exist. |
408 Request Timeout | The request did not complete within the allowed time. |
409 Conflict | A valid HTTP request, but the server attempts to place the resources in an impossible or inconsistent state. |
415 Unsupported Media Type | An unsupported media type was sent. The server expected JSON. |
429 Too Many Requests | Too many requests have been sent in a short period of time. |
500 Internal Server Error | Uncontrolled error during the request process. |
503 Service Unavailable | The API is unavailable due to temporary overload or maintenance. |
Error Handling
Errors in the Factory IL GPS REST API have the following JSON structure:
- success:
false
when an error occurs in the request. - error: Message explaining the cause of the error.
Request Limits
It is important to consider the following limits when integrating the Factory IL GPS API:
- Requests per minute: Maximum of 60 requests.
- Daily results per device: Limit of 25,000 results.
These limits are designed to ensure the performance and stability of the system.
- Welcome to Factory IL GPS help
- Map
- Viewing a Device's Route History
- Device Control Panel
- Detailed Device Information
- Buttons on the Map
- Details
- Trip Statistics
- Device Menu
- GeoFences
- Bulk Alert Editing
- Enable map notifications
- Mileage Calculation
- Atributes
- Devices
- Marker Icon
- Information
- Sensors
- Reassign Digital Sensors
- Commands
- Alerts
- Types
- Configuration
- Reminders
- Limits
- History
- Setting Up a New Tracker
- Solution for Identifier Already in Use by Another Account
- Device Issues
- Email alerts sending limits
- Reports
- New Report
- My Account
- Password Change
- Email Notifications
- Telegram Accounts
- Update Mobile Phone Number
- Primary Email
- Alternative Email
- Activate Two-Factor Authentication (2FA)
- Access Log
- Password Recovery
- Recover Username
- Delete Your Account
- Statistics
- Activity Summary
- Groups
- Users
- Share Access
- Developers
- Enable the API
- Rest API
- Authentication
- Devices API
- GET /api/devices
- GET /api/devices/{deviceId}
- GET /api/devices/{deviceId}/lastLocation
- POST /api/devices/{deviceId}/locations
- POST /api/devices/{deviceId}/alerts
- Groups API
- GET /api/groups
- POST /api/groups
- GET /api/groups/{groupId}
- PUT /api/groups/{groupId}
- PATCH /api/groups/{groupId}
- DELETE /api/groups/{groupId}
- Users API
- GET /api/users
- POST /api/users
- GET /api/users/countries
- GET /api/users/timeZones
- GET /api/users/{userId}
- PUT /api/users/{userId}
- PATCH /api/users/{userId}
- DELETE /api/users/{userId}