1. Home
  2. Docs
  3. GIOT Portal
  4. API
  5. Use Cases API

Use Cases API

[vc_row][vc_column][vc_column_text css=\”\”]

To interact with the API, you’ll need the generated API key. This key can be included in your requests in the following ways:

  • Header Authentication: Add the key as a header for more secure access.
    Example of Header Authentication:
GET https://dev.giot.api.gimasi.com/api/v1/events/by_id?id=6e9f3d2e-a37d49ab-9369-3bb1474839b4\" -H \"accept: application/json\" -H “api-key:

3uoUPTpZ9pEquHMho6ynvqNRvLHY2aJZ4gglGAHGJWs=\"

Handling Authentication Errors

The API returns error codes to help you troubleshoot authentication issues:
401 Unauthorized: Your key is missing, expired, or invalid.
403 Forbidden: Your key doesn’t have the right permissions.

API Endpoints

Lists all alarms of all devices in the tenant. > API Request

GET https://tenant_url/api/v1/alarms?request_parameters

Request Parameters > Optional Parameters:

  • page_number: Number of the page to view
  • field_to_orderd: Field to order results by.
  • order: Sorting order of the results.
  • tenant_id: Filter results by tenant_id. Only for API keys configured to access all tenants.
  • status: Filter results by alarm status.
  • start_date: Filter results by alarm start date.
  • end_date: Filter results by alarm end date.

Note:
API Key with Read permission is required.

Example API Request:
GET http:// dev.giot.api.gimasi.com/api/v1/alarms?
page_number=1&field_to_order=id&order=desc&status=ON&start_date=20
24-11-11&end_date=2024-12-11\"

Example Response:

JSON List in the following format:
{
\"items\": [
\"confirmed_at\": null,
\"device_id\": \"7e89800a-3a58-47f7-95e0-088497ed341a\",
\"device_name\": \"Name FOTA Test\",
\"device_serial\": \"901405800168258\",
\"events\": [
{
\"event\": \"ON\",
\"inserted_at\": \"2024-12-11T13:03:45\",
\"params\": {
\"tamper_state\": \"INTACT\"
}
}
],
\"id\": \"1a87b2a4-de3c-4abe-ada1-ad12c77bfd10\",
\"inserted_at\": \"2025-03-11T13:03:45\",
\"label\": \"device-tamper-alarm\",
\"level\": \"warning\",
\"params\": {
\"tamper_state\": \"INTACT\"
},
\"resolved_at\": null,
\"status\": \"ON\",
\"triggered_at\": \"2024-12-11T13:03:45.917377Z\",
\"type\": \"multiple\",
\"updated_at\": \"2024-12-11T13:03:45\"
}

[/vc_column_text][/vc_column][/vc_row]

How can we help?