The Span API
- API version: 4.1.3 factual-kahlil
- Build date: 2020-12-03T14:07:27.227Z[GMT]
API for device, collection, output and firmware management
For more information, please visit https://lab5e.com/span
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean installTo deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deployRefer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.lab5e</groupId>
<artifactId>span-java-client</artifactId>
<version>4.1.3</version>
<scope>compile</scope>
</dependency>Add this dependency to your project's build file:
compile "com.lab5e:span-java-client:4.1.3"At first generate the JAR by executing:
mvn clean packageThen manually install the following JARs:
target/span-java-client-4.1.3.jartarget/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// 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.CollectionsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.lab5e.com/span");
// 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");
CollectionsApi apiInstance = new CollectionsApi(defaultClient);
String collectionId = "collectionId_example"; // String |
SendMessageRequest body = new SendMessageRequest(); // SendMessageRequest |
try {
MultiSendMessageResponse result = apiInstance.broadcastMessage(collectionId, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#broadcastMessage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}All URIs are relative to https://api.lab5e.com/span
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CollectionsApi | broadcastMessage | POST /collections/{collectionId}/to | Broadcast message |
| CollectionsApi | createCollection | POST /collections | Create collection |
| CollectionsApi | deleteCollection | DELETE /collections/{collectionId} | Delete collection |
| CollectionsApi | listCollectionData | GET /collections/{collectionId}/data | Get payloads |
| CollectionsApi | listCollections | GET /collections | List collections |
| CollectionsApi | retrieveCollection | GET /collections/{collectionId} | Retrieve collection |
| CollectionsApi | updateCollection | PATCH /collections/{collectionId} | Update collection |
| DatadumpApi | dataDump | POST /datadump | Data dump |
| DevicesApi | createDevice | POST /collections/{collectionId}/devices | Create device |
| DevicesApi | deleteDevice | DELETE /collections/{collectionId}/devices/{deviceId} | Remove device |
| DevicesApi | listDeviceData | GET /collections/{collectionId}/devices/{deviceId}/data | Get payloads |
| DevicesApi | listDevices | GET /collections/{collectionId}/devices | List devices |
| DevicesApi | retrieveDevice | GET /collections/{collectionId}/devices/{deviceId} | Retrieve device |
| DevicesApi | sendMessage | POST /collections/{collectionId}/devices/{deviceId}/to | Send message |
| DevicesApi | updateDevice | PATCH /collections/{existingCollectionId}/devices/{deviceId} | Update device |
| FotaApi | clearFirmwareError | DELETE /collections/{collectionId}/devices/{deviceId}/fwerror | Clear FOTA error |
| FotaApi | createFirmware | POST /collections/{collectionId}/firmware | Create firmware |
| FotaApi | deleteFirmware | DELETE /collections/{collectionId}/firmware/{imageId} | Delete firmware |
| FotaApi | firmwareUsage | PATCH /collections/{collectionId}/firmware/{imageId}/usage | Firmware usage |
| FotaApi | listFirmware | GET /collections/{collectionId}/firmware | List firmware |
| FotaApi | retrieveFirmware | GET /collections/{collectionId}/firmware/{imageId} | Retrieve firmware |
| FotaApi | updateFirmware | PATCH /collections/{collectionId}/firmware/{imageId} | Update firmware |
| OutputsApi | createOutput | POST /collections/{collectionId}/outputs | Create output |
| OutputsApi | deleteOutput | DELETE /collections/{collectionId}/outputs/{outputId} | Delete output |
| OutputsApi | listOutputs | GET /collections/{collectionId}/outputs | List outputs |
| OutputsApi | logs | GET /collections/{collectionId}/outputs/{outputId}/logs | Output logs |
| OutputsApi | retrieveOutput | GET /collections/{collectionId}/outputs/{outputId} | Retrieve output |
| OutputsApi | status | GET /collections/{collectionId}/outputs/{outputId}/status | Output status |
| OutputsApi | updateOutput | PATCH /collections/{collectionId}/outputs/{outputId} | Update output |
| SystemApi | getSystemInfo | GET /system | System information |
- CoAPMetadata
- Collection
- CollectionFirmware
- CollectionFirmwareFirmwareManagement
- CreateFirmwareRequest
- DataDumpResponse
- Device
- DumpedCollection
- DumpedDevice
- FieldMask
- Firmware
- FirmwareMetadata
- FirmwareUsageResponse
- ListCollectionResponse
- ListDataResponse
- ListDevicesResponse
- ListFirmwareResponse
- ListOutputResponse
- MessageSendResult
- MultiSendMessageResponse
- NetworkMetadata
- Output
- OutputConfig
- OutputDataMessage
- OutputDataMessageOutputMessageType
- OutputLogEntry
- OutputLogs
- OutputStatus
- OutputType
- ProtobufAny
- RuntimeError
- RuntimeStreamError
- SendMessageRequest
- SystemInfoResponse
- UDPMetadata
- UpdateDeviceRequest
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-API-Token
- Location: HTTP header
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.