import 'package:spanapi/api.dart';
All URIs are relative to https://api.lab5e.com
Method | HTTP request | Description |
---|---|---|
createGateway | POST /span/collections/{collectionId}/gateways | Create gateway |
deleteGateway | DELETE /span/collections/{collectionId}/gateways/{gatewayId} | Delete gateway |
gatewayCertificates | GET /span/collections/{collectionId}/gateways/{gatewayId}/certs | Get issued certificate(s) for gateway |
listGateways | GET /span/collections/{collectionId}/gateways | List gateways |
retrieveGateway | GET /span/collections/{collectionId}/gateways/{gatewayId} | Retrieve gateway |
retrieveGatewayStats | GET /span/collections/{collectionId}/gateways/{gatewayId}/stats | Retrieve gateway statistics |
updateGateway | PATCH /span/collections/{existingCollectionId}/gateways/{gatewayId} | Update gateway |
Gateway createGateway(collectionId, body)
Create gateway
Create a new gateway.
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = GatewaysApi();
final collectionId = collectionId_example; // String |
final body = CreateGatewayBody(); // CreateGatewayBody |
try {
final result = api_instance.createGateway(collectionId, body);
print(result);
} catch (e) {
print('Exception when calling GatewaysApi->createGateway: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
body | CreateGatewayBody |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gateway deleteGateway(collectionId, gatewayId)
Delete gateway
Remove a gateway from Span.
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = GatewaysApi();
final collectionId = collectionId_example; // String |
final gatewayId = gatewayId_example; // String |
try {
final result = api_instance.deleteGateway(collectionId, gatewayId);
print(result);
} catch (e) {
print('Exception when calling GatewaysApi->deleteGateway: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
gatewayId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GatewayCertificateResponse gatewayCertificates(collectionId, gatewayId)
Get issued certificate(s) for gateway
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = GatewaysApi();
final collectionId = collectionId_example; // String |
final gatewayId = gatewayId_example; // String |
try {
final result = api_instance.gatewayCertificates(collectionId, gatewayId);
print(result);
} catch (e) {
print('Exception when calling GatewaysApi->gatewayCertificates: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
gatewayId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListGatewayResponse listGateways(collectionId)
List gateways
List the user's gatways, including built-in gateways.
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = GatewaysApi();
final collectionId = collectionId_example; // String |
try {
final result = api_instance.listGateways(collectionId);
print(result);
} catch (e) {
print('Exception when calling GatewaysApi->listGateways: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gateway retrieveGateway(collectionId, gatewayId)
Retrieve gateway
Get gateway information
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = GatewaysApi();
final collectionId = collectionId_example; // String |
final gatewayId = gatewayId_example; // String |
try {
final result = api_instance.retrieveGateway(collectionId, gatewayId);
print(result);
} catch (e) {
print('Exception when calling GatewaysApi->retrieveGateway: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
gatewayId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GatewayStats retrieveGatewayStats(collectionId, gatewayId)
Retrieve gateway statistics
Get statistics for gateway
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = GatewaysApi();
final collectionId = collectionId_example; // String |
final gatewayId = gatewayId_example; // String |
try {
final result = api_instance.retrieveGatewayStats(collectionId, gatewayId);
print(result);
} catch (e) {
print('Exception when calling GatewaysApi->retrieveGatewayStats: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
gatewayId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gateway updateGateway(existingCollectionId, gatewayId, body)
Update gateway
Update configuration for a gateway. If you want to remove or move a gateway from the collection the devices in the collection must not have any gateway configuration. The certificates for the gateway are unchanged when the gateway is moved.
import 'package:spanapi/api.dart';
// TODO Configure API key authorization: APIToken
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('APIToken').apiKeyPrefix = 'Bearer';
final api_instance = GatewaysApi();
final existingCollectionId = existingCollectionId_example; // String |
final gatewayId = gatewayId_example; // String |
final body = UpdateGatewayBody(); // UpdateGatewayBody |
try {
final result = api_instance.updateGateway(existingCollectionId, gatewayId, body);
print(result);
} catch (e) {
print('Exception when calling GatewaysApi->updateGateway: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
existingCollectionId | String | ||
gatewayId | String | ||
body | UpdateGatewayBody |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]