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 classes:
import com.lab5e.ApiClient;
import com.lab5e.ApiException;
import com.lab5e.Configuration;
import com.lab5e.auth.*;
import com.lab5e.models.*;
import com.lab5e.span.GatewaysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lab5e.com");
// Configure API key authorization: APIToken
ApiKeyAuth APIToken = (ApiKeyAuth) defaultClient.getAuthentication("APIToken");
APIToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIToken.setApiKeyPrefix("Token");
GatewaysApi apiInstance = new GatewaysApi(defaultClient);
String collectionId = "collectionId_example"; // String |
CreateGatewayBody body = new CreateGatewayBody(); // CreateGatewayBody |
try {
Gateway result = apiInstance.createGateway(collectionId, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GatewaysApi#createGateway");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
body | CreateGatewayBody |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
Gateway deleteGateway(collectionId, gatewayId)
Delete gateway
Remove a gateway from Span.
// Import classes:
import com.lab5e.ApiClient;
import com.lab5e.ApiException;
import com.lab5e.Configuration;
import com.lab5e.auth.*;
import com.lab5e.models.*;
import com.lab5e.span.GatewaysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lab5e.com");
// Configure API key authorization: APIToken
ApiKeyAuth APIToken = (ApiKeyAuth) defaultClient.getAuthentication("APIToken");
APIToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIToken.setApiKeyPrefix("Token");
GatewaysApi apiInstance = new GatewaysApi(defaultClient);
String collectionId = "collectionId_example"; // String |
String gatewayId = "gatewayId_example"; // String |
try {
Gateway result = apiInstance.deleteGateway(collectionId, gatewayId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GatewaysApi#deleteGateway");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
gatewayId | String |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
GatewayCertificateResponse gatewayCertificates(collectionId, gatewayId)
Get issued certificate(s) for gateway
// Import classes:
import com.lab5e.ApiClient;
import com.lab5e.ApiException;
import com.lab5e.Configuration;
import com.lab5e.auth.*;
import com.lab5e.models.*;
import com.lab5e.span.GatewaysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lab5e.com");
// Configure API key authorization: APIToken
ApiKeyAuth APIToken = (ApiKeyAuth) defaultClient.getAuthentication("APIToken");
APIToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIToken.setApiKeyPrefix("Token");
GatewaysApi apiInstance = new GatewaysApi(defaultClient);
String collectionId = "collectionId_example"; // String |
String gatewayId = "gatewayId_example"; // String |
try {
GatewayCertificateResponse result = apiInstance.gatewayCertificates(collectionId, gatewayId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GatewaysApi#gatewayCertificates");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
gatewayId | String |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
ListGatewayResponse listGateways(collectionId)
List gateways
List the user's gatways, including built-in gateways.
// Import classes:
import com.lab5e.ApiClient;
import com.lab5e.ApiException;
import com.lab5e.Configuration;
import com.lab5e.auth.*;
import com.lab5e.models.*;
import com.lab5e.span.GatewaysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lab5e.com");
// Configure API key authorization: APIToken
ApiKeyAuth APIToken = (ApiKeyAuth) defaultClient.getAuthentication("APIToken");
APIToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIToken.setApiKeyPrefix("Token");
GatewaysApi apiInstance = new GatewaysApi(defaultClient);
String collectionId = "collectionId_example"; // String |
try {
ListGatewayResponse result = apiInstance.listGateways(collectionId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GatewaysApi#listGateways");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
Gateway retrieveGateway(collectionId, gatewayId)
Retrieve gateway
Get gateway information
// Import classes:
import com.lab5e.ApiClient;
import com.lab5e.ApiException;
import com.lab5e.Configuration;
import com.lab5e.auth.*;
import com.lab5e.models.*;
import com.lab5e.span.GatewaysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lab5e.com");
// Configure API key authorization: APIToken
ApiKeyAuth APIToken = (ApiKeyAuth) defaultClient.getAuthentication("APIToken");
APIToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIToken.setApiKeyPrefix("Token");
GatewaysApi apiInstance = new GatewaysApi(defaultClient);
String collectionId = "collectionId_example"; // String |
String gatewayId = "gatewayId_example"; // String |
try {
Gateway result = apiInstance.retrieveGateway(collectionId, gatewayId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GatewaysApi#retrieveGateway");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
gatewayId | String |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
GatewayStats retrieveGatewayStats(collectionId, gatewayId)
Retrieve gateway statistics
Get statistics for gateway
// Import classes:
import com.lab5e.ApiClient;
import com.lab5e.ApiException;
import com.lab5e.Configuration;
import com.lab5e.auth.*;
import com.lab5e.models.*;
import com.lab5e.span.GatewaysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lab5e.com");
// Configure API key authorization: APIToken
ApiKeyAuth APIToken = (ApiKeyAuth) defaultClient.getAuthentication("APIToken");
APIToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIToken.setApiKeyPrefix("Token");
GatewaysApi apiInstance = new GatewaysApi(defaultClient);
String collectionId = "collectionId_example"; // String |
String gatewayId = "gatewayId_example"; // String |
try {
GatewayStats result = apiInstance.retrieveGatewayStats(collectionId, gatewayId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GatewaysApi#retrieveGatewayStats");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
collectionId | String | ||
gatewayId | String |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |
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 classes:
import com.lab5e.ApiClient;
import com.lab5e.ApiException;
import com.lab5e.Configuration;
import com.lab5e.auth.*;
import com.lab5e.models.*;
import com.lab5e.span.GatewaysApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lab5e.com");
// Configure API key authorization: APIToken
ApiKeyAuth APIToken = (ApiKeyAuth) defaultClient.getAuthentication("APIToken");
APIToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIToken.setApiKeyPrefix("Token");
GatewaysApi apiInstance = new GatewaysApi(defaultClient);
String existingCollectionId = "existingCollectionId_example"; // String |
String gatewayId = "gatewayId_example"; // String |
UpdateGatewayBody body = new UpdateGatewayBody(); // UpdateGatewayBody |
try {
Gateway result = apiInstance.updateGateway(existingCollectionId, gatewayId, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GatewaysApi#updateGateway");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
existingCollectionId | String | ||
gatewayId | String | ||
body | UpdateGatewayBody |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A successful response. | - |
201 | It's created. | - |
400 | The request has an error. | - |
401 | You can't touch this | - |
404 | Couldn't find the resource. | - |
409 | There's a resource conflict here. | - |
500 | I'm sorry. We are broken | - |
0 | An unexpected error response. | - |