> ## Documentation Index
> Fetch the complete documentation index at: https://learn.servitly.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get me active events
> Returns the paginated list of the events currently active on the things visible by the logged-in user.
An event is active when its condition is still true, i.e. it has a startTimestamp but no endTimestamp yet. Once cleared, the event moves to the historical events.
The results can be narrowed by customer, location and thing, by severity (1:FAILURE, 2:MAJOR ANOMALY, 3:MINOR ANOMALY, 4:OPERATION, 5:MAINTENANCE), by topic and by a time period range.
## OpenAPI
````json GET /v2/identity/users/me/events
{
"openapi": "3.1.0",
"info": {
"title": "Servitly DPS API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.servitly-sandbox.com",
"description": "[AWS SANDBOX]"
},
{
"url": "https://api.servitly.com",
"description": "[AWS PRODUCTION Ireland]"
},
{
"url": "https://api-ap.servitly.com",
"description": "[AWS Hong Kong]"
},
{
"url": "https://azapi.servitly-dev.com",
"description": "[AZURE DEV Frankfurt]"
},
{
"url": "https://azapi.servitly-staging.com",
"description": "[AZURE STAGING Frankfurt]"
},
{
"url": "https://azapi.servitly.com",
"description": "[AZURE PRODUCTION Frankfurt]"
}
],
"security": [
{
"bearerAuth": []
}
],
"tags": [
{
"name": "ACTIONS"
},
{
"name": "ALERTS"
},
{
"name": "API GATEWAY"
},
{
"name": "AUTHENTICATION"
},
{
"name": "AUTHORIZATIONS"
},
{
"name": "CUSTOMERS"
},
{
"name": "DATA IMPORT / EXPORT"
},
{
"name": "EVENTS"
},
{
"name": "LOCATIONS"
},
{
"name": "MAINTENANCE"
},
{
"name": "MAPPING"
},
{
"name": "METRIC DATA"
},
{
"name": "MOBILE APP"
},
{
"name": "ORGANIZATION"
},
{
"name": "PARTNERS"
},
{
"name": "PRODUCT MODELS"
},
{
"name": "SPARE PARTS"
},
{
"name": "STATISTICS"
},
{
"name": "STORE ORDERS"
},
{
"name": "SUBSCRIPTIONS"
},
{
"name": "SUBSCRIPTIONS (OLD)"
},
{
"name": "THING CONTROL"
},
{
"name": "THING DEFINITIONS"
},
{
"name": "THING MANAGEMENT"
},
{
"name": "THINGS"
},
{
"name": "TICKETS"
},
{
"name": "USER TYPES"
},
{
"name": "USERS"
},
{
"name": "WORK SESSIONS"
}
],
"paths": {
"/v2/identity/users/me/events": {
"get": {
"summary": "Get me active events",
"description": "Returns the paginated list of the events currently active on the things visible by the logged-in user.
An event is active when its condition is still true, i.e. it has a startTimestamp but no endTimestamp yet. Once cleared, the event moves to the historical events.
The results can be narrowed by customer, location and thing, by severity (1:FAILURE, 2:MAJOR ANOMALY, 3:MINOR ANOMALY, 4:OPERATION, 5:MAINTENANCE), by topic and by a time period range.",
"tags": [
"EVENTS"
],
"parameters": [
{
"$ref": "#/components/parameters/tenantNameHeader"
},
{
"$ref": "#/components/parameters/customerId"
},
{
"$ref": "#/components/parameters/locationId"
},
{
"$ref": "#/components/parameters/thingId"
},
{
"$ref": "#/components/parameters/eventSeverity"
},
{
"$ref": "#/components/parameters/topics"
},
{
"$ref": "#/components/parameters/minStartTimestamp"
},
{
"$ref": "#/components/parameters/maxStartTimestamp"
},
{
"$ref": "#/components/parameters/pageSize"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/sort"
}
],
"responses": {
"200": {
"description": "Successful operation.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Event"
}
}
}
},
{
"$ref": "#/components/schemas/PaginatedResponse"
}
]
}
}
}
},
"401": {
"$ref": "#/components/responses/NotAuthenticated"
},
"403": {
"$ref": "#/components/responses/NotAuthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/ApiLimit"
},
"500": {
"$ref": "#/components/responses/IntError"
}
}
}
}
},
"components": {
"parameters": {
"tenantNameHeader": {
"in": "header",
"name": "X-Servitly-Tenant",
"required": "true",
"schema": {
"type": "string",
"example": "{{tenantName}}"
},
"description": "The name of the tenant (e.g. acme)."
},
"customerId": {
"in": "query",
"name": "customerId",
"required": "false",
"schema": {
"type": "string",
"example": "abcd1234"
},
"description": "Condition on customer id."
},
"locationId": {
"in": "query",
"name": "locationId",
"required": "false",
"schema": {
"type": "string",
"example": "abcd1234"
},
"description": "Condition on location id."
},
"thingId": {
"in": "query",
"name": "thingId",
"required": "false",
"schema": {
"type": "string",
"example": "abcd1234"
},
"description": "Condition on thing id."
},
"eventSeverity": {
"in": "query",
"name": "eventSeverity",
"required": "false",
"schema": {
"type": "string",
"example": "1"
},
"description": "Condition on event severity (1:FAILURE, 2:MAJOR ANOMALY, 3:MINOR ANOMALY, 4:OPERATION, 5:MAINTENANCE)."
},
"topics": {
"in": "query",
"name": "topics",
"required": "false",
"schema": {
"type": "string",
"example": "in;HEALTH,MAINTENANCE"
},
"description": "Condition to get events by topics (CONNECTION, CONSUMPTION, DOWNTIME, HEALTH, MAINTENANCE, PRODUCTIVITY, QUALITY, UPTIME)."
},
"minStartTimestamp": {
"in": "query",
"name": "minStartTimestamp",
"required": "false",
"schema": {
"type": "integer",
"format": "int64",
"example": "1578438000000"
},
"description": "Condition to get events started after a specific timestamp."
},
"maxStartTimestamp": {
"in": "query",
"name": "maxStartTimestamp",
"required": "false",
"schema": {
"type": "integer",
"format": "int64",
"example": "1578438000000"
},
"description": "Condition to get events started before a specific timestamp."
},
"pageSize": {
"in": "query",
"name": "size",
"required": "false",
"schema": {
"type": "integer",
"minimum": "1"
},
"example": "200",
"description": "The number of elements to retrieve for the current page."
},
"page": {
"in": "query",
"name": "page",
"required": "false",
"schema": {
"type": "integer",
"minimum": "0"
},
"example": "0",
"description": "The page number to retrieve (zero-based)."
},
"sort": {
"in": "query",
"name": "sort",
"required": "false",
"schema": {
"type": "string",
"minimum": "0"
},
"example": "name,ASC",
"description": "The sorting criteria based on object properties."
}
},
"schemas": {
"Event": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The event object identifier.",
"readOnly": "true",
"example": "1234abcd"
},
"alertDefinitionId": {
"type": "string",
"description": "The identifier of the event-definition associated with the event.",
"example": "1234abcd"
},
"name": {
"type": "string",
"description": "The event name.",
"readOnly": "true",
"example": "E450"
},
"title": {
"type": "string",
"description": "The event title.",
"readOnly": "true",
"example": "Overheating"
},
"description": {
"type": "string",
"description": "The event description.",
"readOnly": "true",
"example": "High temperature detected"
},
"technicalDescription": {
"type": "string",
"description": "The event technical description.",
"readOnly": "true"
},
"startTimestamp": {
"type": "integer",
"format": "int64",
"description": "The event start timestamp.",
"example": "1578438000000"
},
"endTimestamp": {
"type": "integer",
"format": "int64",
"description": "The event end timestamp.",
"example": "1578438000000"
},
"eventSeverity": {
"type": "integer",
"enum": [
"1",
"2",
"3",
"4",
"5"
],
"description": "The event severity (1:FAILURE, 2:MAJOR ANOMALY, 3:MINOR ANOMALY, 4:OPERATION, 5:MAINTENANCE).",
"readOnly": "true"
},
"customerId": {
"type": "string",
"description": "The customer identifier associated with the event.",
"readOnly": "true"
},
"locationId": {
"type": "string",
"description": "The location identifier associated with the event."
},
"thingId": {
"type": "string",
"description": "The thing identifier associated with the event."
},
"activateUserEmail": {
"type": "string",
"description": "The email of the user who has reported the event.",
"example": "mark.hamill@abon-metal.com"
},
"notes": {
"type": "string",
"description": "The text notes in case of User Reported event.",
"example": "The machine was...."
}
}
},
"PaginatedResponse": {
"type": "object",
"properties": {
"first": {
"type": "boolean",
"description": "The flag indicating whether the page is the first one."
},
"last": {
"type": "boolean",
"description": "The flag indicating whether the last page has been reached."
},
"totalPages": {
"type": "integer",
"description": "The total number of pages."
},
"totalElements": {
"type": "integer",
"description": "The total number of elements."
},
"sort": {
"type": "string",
"description": "The current sorting criteria."
},
"numberOfElements": {
"type": "integer",
"description": "The number of elements in this page."
},
"size": {
"type": "integer",
"description": "The requested page size."
},
"number": {
"type": "integer",
"minimum": "0",
"description": "The number of the page (zero-based)."
}
}
}
},
"responses": {
"NotAuthenticated": {
"description": "User not authenticated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "User not authenticated"
}
}
}
}
}
},
"NotAuthorized": {
"description": "User not authorized.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "User not authorized"
}
}
}
}
}
},
"NotFound": {
"description": "Resource was not found.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "Resource not found"
}
}
}
}
}
},
"ApiLimit": {
"description": "API call rate limit exceeded.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "API call rate limit exceeded"
}
}
}
}
}
},
"IntError": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "Internal Server Error"
}
}
}
}
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
}
}
````