All URIs are relative to https://api.thelightbug.com/api
| Method | HTTP request | Description |
|---|---|---|
| userLogin | POST /users/login | Login a user with username/email and password. |
| userPrototypeCreateGeofences | POST /users/{id}/geofences | Creates a new instance in geofences of this model. |
| userPrototypeDeleteGeofences | DELETE /users/{id}/geofences | Deletes all geofences of this model. |
| userPrototypeDestroyByIdGeofences | DELETE /users/{id}/geofences/{fk} | Delete a related item by id for geofences. |
| userPrototypeFindByIdGeofences | GET /users/{id}/geofences/{fk} | Find a related item by id for geofences. |
| userPrototypeGetDeviceSummary | GET /users/{id}/getDeviceSummary | Retrieve a summary of all devices on this user account. |
| userPrototypeGetDevices | GET /users/{id}/devices | Queries devices of user. |
| userPrototypeGetDevicesInZone | GET /users/{id}/getDevicesInZone | Retrieve a list of devices in any given zone or group of zones. |
| userPrototypeGetGeofences | GET /users/{id}/geofences | Queries geofences of user. |
| userPrototypeGetMqttCredentials | GET /users/{id}/getMqttCredentials | |
| userPrototypeUpdateByIdGeofences | PUT /users/{id}/geofences/{fk} | Update a related item by id for geofences. |
\Swagger\Client\Model\AccessToken userLogin($credentials, $include)
Login a user with username/email and password.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$credentials = new \Swagger\Client\Model\Credentials(); // \Swagger\Client\Model\Credentials | Body (JSON)
$include = "include_example"; // string | Related objects to include in the response. See the description of return value for more details.
try {
$result = $apiInstance->userLogin($credentials, $include);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userLogin: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| credentials | \Swagger\Client\Model\Credentials | Body (JSON) | |
| include | string | Related objects to include in the response. See the description of return value for more details. | [optional] |
\Swagger\Client\Model\AccessToken
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Geofence userPrototypeCreateGeofences($id, $data)
Creates a new instance in geofences of this model.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
$data = new \Swagger\Client\Model\Geofence(); // \Swagger\Client\Model\Geofence | Body (JSON)
try {
$result = $apiInstance->userPrototypeCreateGeofences($id, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeCreateGeofences: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id | |
| data | \Swagger\Client\Model\Geofence | Body (JSON) | [optional] |
\Swagger\Client\Model\Geofence
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userPrototypeDeleteGeofences($id)
Deletes all geofences of this model.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
try {
$apiInstance->userPrototypeDeleteGeofences($id);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeDeleteGeofences: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id |
void (empty response body)
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userPrototypeDestroyByIdGeofences($id, $fk)
Delete a related item by id for geofences.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
$fk = 8.14; // float | Foreign key for geofences
try {
$apiInstance->userPrototypeDestroyByIdGeofences($id, $fk);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeDestroyByIdGeofences: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id | |
| fk | float | Foreign key for geofences |
void (empty response body)
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Geofence userPrototypeFindByIdGeofences($id, $fk)
Find a related item by id for geofences.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
$fk = 8.14; // float | Foreign key for geofences
try {
$result = $apiInstance->userPrototypeFindByIdGeofences($id, $fk);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeFindByIdGeofences: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id | |
| fk | float | Foreign key for geofences |
\Swagger\Client\Model\Geofence
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object[] userPrototypeGetDeviceSummary($id, $point_count, $date_range, $hide_approx)
Retrieve a summary of all devices on this user account.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
$point_count = "point_count_example"; // string | Maximum number of points to return per device. Default 5.
$date_range = "date_range_example"; // string | What date range to consider when retrieving recent points. Typical use is [TimeOfLastPointDownload, NOW]. Defaults to all time.
$hide_approx = "hide_approx_example"; // string | Don't include GSM / poor accuracy locations. Default to false.
try {
$result = $apiInstance->userPrototypeGetDeviceSummary($id, $point_count, $date_range, $hide_approx);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeGetDeviceSummary: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id | |
| point_count | string | Maximum number of points to return per device. Default 5. | [optional] |
| date_range | string | What date range to consider when retrieving recent points. Typical use is [TimeOfLastPointDownload, NOW]. Defaults to all time. | [optional] |
| hide_approx | string | Don't include GSM / poor accuracy locations. Default to false. | [optional] |
object[]
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Device[] userPrototypeGetDevices($id, $filter)
Queries devices of user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
$filter = "filter_example"; // string | JSON Filter object
try {
$result = $apiInstance->userPrototypeGetDevices($id, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeGetDevices: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id | |
| filter | string | JSON Filter object | [optional] |
\Swagger\Client\Model\Device[]
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object[] userPrototypeGetDevicesInZone($id, $zone_id, $zone_type, $include_approx)
Retrieve a list of devices in any given zone or group of zones.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
$zone_id = "zone_id_example"; // string | ID of geofence to search. zoneId or zoneType required.
$zone_type = "zone_type_example"; // string | Type of zones to search. Ignored if zoneId is specified. zoneId or zoneType required.
$include_approx = "include_approx_example"; // string | Include GSM / poor accuracy locations. Default to false.
try {
$result = $apiInstance->userPrototypeGetDevicesInZone($id, $zone_id, $zone_type, $include_approx);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeGetDevicesInZone: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id | |
| zone_id | string | ID of geofence to search. zoneId or zoneType required. | [optional] |
| zone_type | string | Type of zones to search. Ignored if zoneId is specified. zoneId or zoneType required. | [optional] |
| include_approx | string | Include GSM / poor accuracy locations. Default to false. | [optional] |
object[]
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Geofence[] userPrototypeGetGeofences($id, $filter)
Queries geofences of user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
$filter = "filter_example"; // string | JSON Filter object
try {
$result = $apiInstance->userPrototypeGetGeofences($id, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeGetGeofences: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id | |
| filter | string | JSON Filter object | [optional] |
\Swagger\Client\Model\Geofence[]
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse200 userPrototypeGetMqttCredentials($id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
try {
$result = $apiInstance->userPrototypeGetMqttCredentials($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeGetMqttCredentials: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id |
\Swagger\Client\Model\InlineResponse200
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Geofence userPrototypeUpdateByIdGeofences($id, $fk, $data)
Update a related item by id for geofences.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\UserApi(
// 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()
);
$id = "id_example"; // string | user id
$fk = 8.14; // float | Foreign key for geofences
$data = new \Swagger\Client\Model\Geofence(); // \Swagger\Client\Model\Geofence | Body (JSON)
try {
$result = $apiInstance->userPrototypeUpdateByIdGeofences($id, $fk, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->userPrototypeUpdateByIdGeofences: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | user id | |
| fk | float | Foreign key for geofences | |
| data | \Swagger\Client\Model\Geofence | Body (JSON) | [optional] |
\Swagger\Client\Model\Geofence
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded, application/xml, text/xml
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
[Back to top] [Back to API list] [Back to Model list] [Back to README]