> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.iot.telia.lt/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.iot.telia.lt/_mcp/server.

# List SIM events

GET https://iot.telia.lt/api/v1/sim/{sim_id}/event

Returns the list of events, filtered, sorted and paged according to query parameters.

This API endpoint deviates from the specified conventions and may not return the same HTTP Codes as the higher layer call (`/api/v1/sim/{sim_id}`).

In case the requested `{sim_id}` doesn't exist or is not accessible for the user, **HTTP 200** will be returned with empty **\[]** as long as the provided `{sim_id}` is a number and all parameters are valid.

Please take that into consideration when building automation on top of the error behavior of this endpoint.

Reference: https://docs.iot.telia.lt/developers/api/sim/sim-event-page-per-page-sort-by-sim-id-and-q-get

## Authentication

- `Authorization` header (bearer token, required) — An `auth_token` should be provided to authenticate a session. To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

## Request

### Path parameters

- `sim_id` (integer, required) — Numeric ID of a SIM

### Query parameters

- `page` (integer, optional) — Current page number
- `per_page` (integer, optional) — Defines the number of items per page
- `sort` (string, optional) — Sort properties according to a comma separated list of accepted fields. Valid fields are: * `id` - (**event id**) * `timestamp` - (**event timestamp**) * `source` - (**event source**) * `severity` - (**event severity**) * `alert` - (**alert status**) * `organisation` - (**organisation name**) * `user` - (**user id**) * `endpoint` - (**endpoint name**) * `tags` - (**endpoint tags**) * `ip_address` - (**endpoint ip_address**) * `iccid` - (**sim iccid**) * `imsi` - (**sim imsi**) * `type` - (**event type**)
- `q` (string, optional) — Filter parameter in `<filter>:<value>` format. Multiple filters must be a comma-separated list of the following fields: * `from` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, **only valid with until**) * `until` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, **only valid with from**) * `type` (**event\_type**, numerical) * `source` (**event\_type**, numerical, e.g. 0 = Network), 1 = Policy Control, 2 = API) * `severity` (**event\_severity**, numerical, e.g. 0 = Info, 1 = Warn), 2 = Critical) * `alert` (boolean, e.g. true, false) * `description` (**event description**, string) * `organisation` (**organisation name**, string) * `user` (**user name**, string) * `endpoint` (**endpoint name**, string) * `tags` (**endpoint tags**, string) * `tag_id` (**endpoint tag ID**, numerical, matches events whose endpoint has the tag. Tag IDs are listed in the endpoint's `tag_assignments`) * `ip_address` (**endpoint IP address**, valid IPv4/IPv6 address) * `imei` (**endpoint imei**, numerical string) * `iccid` (**sim iccid**, numerical string) * `imsi` (**sim imsi**, numerical string) * `timestamp` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, for querying events of 1 day, deprecated in future) * `iccid_with_luhn` (**sim iccid with Luhn**, numerical string) * `network` (**endpoint network**, string, e.g. Telekom) * `rat` (**event pdp context rat type**, numerical string, e.g. 6) * `country` (**endpoint country**, string, e.g. Germany) Some filters can accept up to 6 values which must be separated by the pipe symbol (`|`) or url-encoded as (`%7C`): * `iccid` (q: iccid:1234567890123456789|8988303000123456789) * `iccid_with_luhn` (q: iccid:12345678901234567891|89883030001234567891) * `endpoint` (q: endpoint:example\_endpoint\_name|another\_endpoint\_name) * `type` (q: type:example\_event\_type|another\_event\_type) * `network` (q: network:example\_network|another\_network) * `rat` (q: rat:example\_rat|another\_rat) * `country` (q: country:example\_country|another\_country) * `tag_id` (q: tag\_id:7|12, matches events whose endpoint has any of the tags)

## Response

### 200

Successfully returned a list of SIM events

- `list of ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItems`

## Errors

### 400 Bad Request Error

**Bad Request** due to incorrect **Paging** Parameters, **Sorting** Parameter or incorrect `{sim_id}`

- `any`

### 403 Forbidden Error

Your role doesn't include the permission this endpoint requires. Most endpoints return `error_code`, `error_token`, and `message`. Some return only `status_code` and `message`.

- `error_code` (integer, optional)
- `error_token` (string, optional)
- `status_code` (integer, optional)
- `message` (string, optional)

### 422 Unprocessable Entity Error

**Unprocessable Entity** due to incorrect **Query** parameters

- `any`

## Types

### ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItems

- `timestamp` (string, optional)
- `alert` (boolean, optional)
- `description` (string, optional)
- `id` (integer, optional)
- `event_type` (ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsEventType, optional)
- `event_source` (ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsEventSource, optional)
- `event_severity` (ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsEventSeverity, optional)
- `organisation` (ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsOrganisation, optional)
- `endpoint` (ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsEndpoint, optional)
- `sim` (ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsSim, optional)
- `imsi` (ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsImsi, optional)

### ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsEventType

### ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsEventSource

### ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsEventSeverity

### ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsOrganisation

### ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsEndpoint

### ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsSim

### ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItemsImsi

## Examples

**Response**

```json
[
  {
    "timestamp": "2019-07-16T12:07:09.000Z",
    "alert": true,
    "description": "PDP Context deleted.",
    "id": 69535,
    "event_type": {
      "description": "Delete PDP Context",
      "id": 4
    },
    "event_source": {
      "id": 0,
      "name": "Network"
    },
    "event_severity": {
      "description": "INFO",
      "id": 0
    },
    "organisation": {
      "id": 2,
      "name": "Organisation_Name"
    },
    "endpoint": {
      "id": 6,
      "imei": null,
      "ip_address": "10.199.6.39",
      "name": "Monitoring201",
      "tag_assignments": [
        {
          "id": 1,
          "name": "Monitoring",
          "tag_color": {
            "id": 3
          }
        }
      ],
      "tags": "Monitoring"
    },
    "sim": {
      "iccid": "8988317000000000100",
      "iccid_with_luhn": "89883170000000001001",
      "id": 2,
      "production_date": "2018-12-17T13:26:13.000Z"
    },
    "imsi": {
      "id": 110,
      "import_date": "2018-12-17T13:26:08.000Z",
      "imsi": 901430000000114
    }
  }
]
```

**SDK Code**

```python SIM Event List
import requests

url = "https://iot.telia.lt/api/v1/sim/1/event"

querystring = {"q":"","sort":""}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript SIM Event List
const url = 'https://iot.telia.lt/api/v1/sim/1/event?q=&sort=';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SIM Event List
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v1/sim/1/event?q=&sort="

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SIM Event List
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/sim/1/event?q=&sort=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java SIM Event List
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://iot.telia.lt/api/v1/sim/1/event?q=&sort=")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php SIM Event List
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://iot.telia.lt/api/v1/sim/1/event?q=&sort=', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp SIM Event List
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/sim/1/event?q=&sort=");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift SIM Event List
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/sim/1/event?q=&sort=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```