> 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.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_mcp/server.

# List events

GET https://cdn.emnify.net/api/v1/event

Required permissions Beta [Learn more](/developers/api-guidelines/permissions#how-permissions-work)`Event` + `List`Roles: Administrator User ObserverReturns the list of events, filtered, sorted and paged according to query parameters.

Reference: https://docs.emnify.com/developers/api/events/get-events

## 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

### 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 events

- `list of ApiV1EventGetResponsesContentApplicationJsonSchemaItems`

## Errors

### 400 Bad Request Error

**Bad Request** due to incorrect **Paging** Parameters or **Sorting** Parameter

- `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

### ApiV1EventGetResponsesContentApplicationJsonSchemaItems

- `id` (integer, optional)
- `alert` (boolean, optional)
- `description` (string, optional)
- `timestamp` (string, optional)
- `event_type` (ApiV1EventGetResponsesContentApplicationJsonSchemaItemsEventType, optional)
- `event_source` (ApiV1EventGetResponsesContentApplicationJsonSchemaItemsEventSource, optional)
- `event_severity` (ApiV1EventGetResponsesContentApplicationJsonSchemaItemsEventSeverity, optional)
- `organisation` (ApiV1EventGetResponsesContentApplicationJsonSchemaItemsOrganisation, optional)
- `user` (ApiV1EventGetResponsesContentApplicationJsonSchemaItemsUser, optional)

### ApiV1EventGetResponsesContentApplicationJsonSchemaItemsEventType

- `id` (double, optional)
- `description` (string, optional)

### ApiV1EventGetResponsesContentApplicationJsonSchemaItemsEventSource

- `id` (double, optional)
- `description` (string, optional)

### ApiV1EventGetResponsesContentApplicationJsonSchemaItemsEventSeverity

- `id` (double, optional)
- `description` (string, optional)

### ApiV1EventGetResponsesContentApplicationJsonSchemaItemsOrganisation

- `id` (double, optional)
- `name` (string, optional)

### ApiV1EventGetResponsesContentApplicationJsonSchemaItemsUser

- `id` (double, optional)
- `username` (string, optional)
- `name` (string, optional)

## Examples

### Default - List All Events

**Response**

```json
[
  {
    "id": 123456,
    "alert": true,
    "description": "Disconnecting data access for endpoint, because it has been disabled.",
    "timestamp": "2020-07-20T14:19:29.000+0000",
    "event_type": {
      "id": 0,
      "description": "Generic"
    },
    "event_source": {
      "id": 1,
      "description": "Policy Control"
    },
    "event_severity": {
      "id": 1,
      "description": "Warn"
    },
    "organisation": {
      "id": 1234,
      "name": "Example Organisation"
    },
    "endpoint": {
      "id": 123456,
      "imei": "1234567890123456",
      "ip_address": "10.10.10.10",
      "name": "My Endpoint",
      "tags": null
    },
    "imsi": {
      "id": 1234,
      "import_date": "2019-01-22T13:38:30.000+0000",
      "imsi": "123456789123456"
    },
    "sim": {
      "iccid": "8988303000123456789",
      "iccid_with_luhn": "89883030001234567891",
      "id": 1234,
      "production_date": "2019-01-22T13:38:30.000+0000"
    }
  }
]
```

**SDK Code**

```python Default - List All Events
import requests

url = "https://cdn.emnify.net/api/v1/event"

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

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

print(response.json())
```

```javascript Default - List All Events
const url = 'https://cdn.emnify.net/api/v1/event';
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 Default - List All Events
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event"

	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 Default - List All Events
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event")

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 Default - List All Events
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Default - List All Events
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/event', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Default - List All Events
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/event");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Default - List All Events
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event")! 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()
```

### Filter by Time Range

**Response**

```json
[
  {
    "id": 123456,
    "alert": false,
    "description": "New location received from VLR",
    "timestamp": "2020-07-20T11:03:08.000+0000",
    "event_type": {
      "id": 1,
      "description": "Update location"
    },
    "event_source": {
      "id": 0,
      "description": "Network"
    },
    "event_severity": {
      "id": 0,
      "description": "Info"
    },
    "organisation": {
      "id": 1234,
      "name": "Example Organisation"
    }
  }
]
```

**SDK Code**

```python Filter by Time Range
import requests

url = "https://cdn.emnify.net/api/v1/event"

querystring = {"q":"from:2020-07-20T08:00:00Z,until:2020-07-21T08:00:00Z"}

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

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

print(response.json())
```

```javascript Filter by Time Range
const url = 'https://cdn.emnify.net/api/v1/event?q=from%3A2020-07-20T08%3A00%3A00Z%2Cuntil%3A2020-07-21T08%3A00%3A00Z';
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 Filter by Time Range
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event?q=from%3A2020-07-20T08%3A00%3A00Z%2Cuntil%3A2020-07-21T08%3A00%3A00Z"

	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 Filter by Time Range
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event?q=from%3A2020-07-20T08%3A00%3A00Z%2Cuntil%3A2020-07-21T08%3A00%3A00Z")

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 Filter by Time Range
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event?q=from%3A2020-07-20T08%3A00%3A00Z%2Cuntil%3A2020-07-21T08%3A00%3A00Z")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by Time Range
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/event?q=from%3A2020-07-20T08%3A00%3A00Z%2Cuntil%3A2020-07-21T08%3A00%3A00Z', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Filter by Time Range
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/event?q=from%3A2020-07-20T08%3A00%3A00Z%2Cuntil%3A2020-07-21T08%3A00%3A00Z");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by Time Range
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event?q=from%3A2020-07-20T08%3A00%3A00Z%2Cuntil%3A2020-07-21T08%3A00%3A00Z")! 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()
```

### Filter by Event Type

**Response**

```json
[
  {
    "id": 123457,
    "alert": false,
    "description": "PDP Context created.",
    "timestamp": "2020-07-16T14:23:11.000Z",
    "event_type": {
      "id": 3,
      "description": "Create PDP Context"
    },
    "event_source": {
      "id": 0,
      "description": "Network"
    },
    "event_severity": {
      "id": 0,
      "description": "Info"
    }
  }
]
```

**SDK Code**

```python Filter by Event Type
import requests

url = "https://cdn.emnify.net/api/v1/event"

querystring = {"q":"type:3"}

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

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

print(response.json())
```

```javascript Filter by Event Type
const url = 'https://cdn.emnify.net/api/v1/event?q=type%3A3';
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 Filter by Event Type
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event?q=type%3A3"

	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 Filter by Event Type
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event?q=type%3A3")

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 Filter by Event Type
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event?q=type%3A3")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by Event Type
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/event?q=type%3A3', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Filter by Event Type
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/event?q=type%3A3");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by Event Type
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event?q=type%3A3")! 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()
```

### Filter by ICCID

**Response**

```json
[
  {
    "id": 123459,
    "alert": false,
    "description": "Data session started",
    "timestamp": "2020-07-20T10:15:30.000+0000",
    "event_type": {
      "id": 3,
      "description": "Create PDP Context"
    },
    "event_source": {
      "id": 0,
      "description": "Network"
    },
    "event_severity": {
      "id": 0,
      "description": "Info"
    },
    "sim": {
      "iccid": "1234567890123456789",
      "iccid_with_luhn": "12345678901234567891",
      "id": 1234
    }
  }
]
```

**SDK Code**

```python Filter by ICCID
import requests

url = "https://cdn.emnify.net/api/v1/event"

querystring = {"q":"iccid:1234567890123456789"}

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

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

print(response.json())
```

```javascript Filter by ICCID
const url = 'https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789';
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 Filter by ICCID
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789"

	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 Filter by ICCID
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789")

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 Filter by ICCID
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by ICCID
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Filter by ICCID
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by ICCID
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789")! 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()
```

### Filter by multiple ICCIDs

**Response**

```json
[
  {
    "id": 123459,
    "alert": false,
    "description": "Data session started",
    "timestamp": "2020-07-20T10:15:30.000+0000",
    "event_type": {
      "id": 3,
      "description": "Create PDP Context"
    },
    "event_source": {
      "id": 0,
      "description": "Network"
    },
    "event_severity": {
      "id": 0,
      "description": "Info"
    },
    "sim": {
      "iccid": "1234567890123456789",
      "iccid_with_luhn": "12345678901234567891",
      "id": 1234
    }
  },
  {
    "id": 123456,
    "alert": false,
    "description": "Data session started",
    "timestamp": "2020-07-20T10:15:30.000+0000",
    "event_type": {
      "id": 3,
      "description": "Create PDP Context"
    },
    "event_source": {
      "id": 0,
      "description": "Network"
    },
    "event_severity": {
      "id": 0,
      "description": "Info"
    },
    "sim": {
      "iccid": "8988303000123456789",
      "iccid_with_luhn": "89883030001234567891",
      "id": 1234
    }
  }
]
```

**SDK Code**

```python Filter by multiple ICCIDs
import requests

url = "https://cdn.emnify.net/api/v1/event"

querystring = {"q":"iccid:1234567890123456789|8988303000123456789"}

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

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

print(response.json())
```

```javascript Filter by multiple ICCIDs
const url = 'https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789%7C8988303000123456789';
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 Filter by multiple ICCIDs
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789%7C8988303000123456789"

	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 Filter by multiple ICCIDs
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789%7C8988303000123456789")

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 Filter by multiple ICCIDs
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789%7C8988303000123456789")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by multiple ICCIDs
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789%7C8988303000123456789', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Filter by multiple ICCIDs
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789%7C8988303000123456789");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by multiple ICCIDs
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event?q=iccid%3A1234567890123456789%7C8988303000123456789")! 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()
```

### Multiple Filters - Tag and Organization

**Response**

```json
[
  {
    "id": 123460,
    "alert": false,
    "description": "Event with tag and organisation filter",
    "timestamp": "2020-07-20T12:30:00.000+0000",
    "event_type": {
      "id": 0,
      "description": "Generic"
    },
    "event_source": {
      "id": 1,
      "description": "Policy Control"
    },
    "event_severity": {
      "id": 0,
      "description": "Info"
    },
    "organisation": {
      "id": 123,
      "name": "Example Organisation"
    },
    "endpoint": {
      "tag_assignments": [
        {
          "id": 7,
          "name": "tag1",
          "tag_color": {
            "id": 2
          }
        }
      ],
      "tags": "tag1"
    }
  }
]
```

**SDK Code**

```python Multiple Filters - Tag and Organization
import requests

url = "https://cdn.emnify.net/api/v1/event"

querystring = {"q":"tags:tag1,organisation:123"}

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

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

print(response.json())
```

```javascript Multiple Filters - Tag and Organization
const url = 'https://cdn.emnify.net/api/v1/event?q=tags%3Atag1%2Corganisation%3A123';
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 Multiple Filters - Tag and Organization
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event?q=tags%3Atag1%2Corganisation%3A123"

	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 Multiple Filters - Tag and Organization
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event?q=tags%3Atag1%2Corganisation%3A123")

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 Multiple Filters - Tag and Organization
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event?q=tags%3Atag1%2Corganisation%3A123")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Multiple Filters - Tag and Organization
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/event?q=tags%3Atag1%2Corganisation%3A123', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Multiple Filters - Tag and Organization
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/event?q=tags%3Atag1%2Corganisation%3A123");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Multiple Filters - Tag and Organization
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event?q=tags%3Atag1%2Corganisation%3A123")! 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()
```

### Filter by tag ID

**Response**

```json
[
  {
    "id": 123461,
    "alert": false,
    "description": "PDP Context created.",
    "timestamp": "2020-07-20T13:45:00.000+0000",
    "event_type": {
      "id": 3,
      "description": "Create PDP Context"
    },
    "event_source": {
      "id": 0,
      "description": "Network"
    },
    "event_severity": {
      "id": 0,
      "description": "Info"
    },
    "endpoint": {
      "id": 123456,
      "name": "My Endpoint",
      "tag_assignments": [
        {
          "id": 7,
          "name": "tag1",
          "tag_color": {
            "id": 2
          }
        },
        {
          "id": 12,
          "name": "sensor",
          "tag_color": {
            "id": 5
          }
        }
      ],
      "tags": "tag1, sensor"
    }
  }
]
```

**SDK Code**

```python Filter by tag ID
import requests

url = "https://cdn.emnify.net/api/v1/event"

querystring = {"q":"tag_id:7"}

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

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

print(response.json())
```

```javascript Filter by tag ID
const url = 'https://cdn.emnify.net/api/v1/event?q=tag_id%3A7';
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 Filter by tag ID
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event?q=tag_id%3A7"

	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 Filter by tag ID
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event?q=tag_id%3A7")

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 Filter by tag ID
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event?q=tag_id%3A7")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by tag ID
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/event?q=tag_id%3A7', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Filter by tag ID
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/event?q=tag_id%3A7");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by tag ID
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event?q=tag_id%3A7")! 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()
```

### Sort by Timestamp and ID (Descending)

**Response**

```json
[
  {
    "id": 123458,
    "alert": true,
    "description": "Latest event",
    "timestamp": "2020-07-21T14:19:29.000+0000",
    "event_type": {
      "id": 0,
      "description": "Generic"
    },
    "event_source": {
      "id": 1,
      "description": "Policy Control"
    },
    "event_severity": {
      "id": 1,
      "description": "Warn"
    }
  }
]
```

**SDK Code**

```python Sort by Timestamp and ID (Descending)
import requests

url = "https://cdn.emnify.net/api/v1/event"

querystring = {"sort":"-timestamp,id"}

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

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

print(response.json())
```

```javascript Sort by Timestamp and ID (Descending)
const url = 'https://cdn.emnify.net/api/v1/event?sort=-timestamp%2Cid';
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 Sort by Timestamp and ID (Descending)
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event?sort=-timestamp%2Cid"

	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 Sort by Timestamp and ID (Descending)
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event?sort=-timestamp%2Cid")

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 Sort by Timestamp and ID (Descending)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event?sort=-timestamp%2Cid")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Sort by Timestamp and ID (Descending)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/event?sort=-timestamp%2Cid', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Sort by Timestamp and ID (Descending)
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/event?sort=-timestamp%2Cid");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Sort by Timestamp and ID (Descending)
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event?sort=-timestamp%2Cid")! 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()
```