All URIs are relative to https://cdn.emnify.net
Method | HTTP request | Description |
---|---|---|
eventTypeGet | GET /api/v1/event/type | List Event Types |
getEvents | GET /api/v1/event | List Events |
\Emnify\EmnifySdk\Model\RetrieveEventTypesresponse[] eventTypeGet()
List Event Types
Provides the list of event_types (lookup).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = Emnify\EmnifySdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Emnify\EmnifySdk\Api\EventsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->eventTypeGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EventsApi->eventTypeGet: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\Emnify\EmnifySdk\Model\RetrieveEventTypesresponse[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Emnify\EmnifySdk\Model\Event[] getEvents($page, $per_page, $sort, $q)
List Events
Returns the list of events, filtered, sorted and paged according to query parameters.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = Emnify\EmnifySdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Emnify\EmnifySdk\Api\EventsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$page = 56; // int | Current page number
$per_page = 56; // int | Paging parameters defining the number of items per page
$sort = "sort_example"; // string | 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 = "q_example"; // string | Filter parameter in `<filter>:<value>` format. Multiple filters must be in the format of a comma separated list of the following fields: * `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) * `ip_address` (**endpoint IP address**, valid IPv4/IPv6 address) * `imei` (**endpoint imei**, numerical string) * `iccid` (**sim iccid**, numerical string) * `imsi` (**sim imsi**, numerical string) * `from` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, __only valid with until!__) * `until` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, __only valid with from!__) * `timestamp` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, for querying events of 1 day, deprecated in future)
try {
$result = $apiInstance->getEvents($page, $per_page, $sort, $q);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EventsApi->getEvents: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
page | int | Current page number | [optional] |
per_page | int | Paging parameters defining the number of items per page | [optional] |
sort | string | 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) | [optional] |
q | string | Filter parameter in `<filter>:<value>` format. Multiple filters must be in the format of a comma separated list of the following fields: * `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) * `ip_address` (endpoint IP address, valid IPv4/IPv6 address) * `imei` (endpoint imei, numerical string) * `iccid` (sim iccid, numerical string) * `imsi` (sim imsi, numerical string) * `from` (date, format `YYYY-MM-DDTHH:mm:ssZ`, only valid with until!) * `until` (date, format `YYYY-MM-DDTHH:mm:ssZ`, only valid with from!) * `timestamp` (date, format `YYYY-MM-DDTHH:mm:ssZ`, for querying events of 1 day, deprecated in future) | [optional] |
\Emnify\EmnifySdk\Model\Event[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]