The Span API
- API version: 4.4.2 nonviolent-adelbert
- Build date: 2023-03-02T10:55:33.745521Z[Etc/UTC]
API for device, collection, output and firmware management
For more information, please visit https://lab5e.com
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer 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.4.2</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'span-java-client' jar has been published to maven central.
mavenLocal() // Needed if the 'span-java-client' jar has been published to the local maven repo.
}
dependencies {
implementation "com.lab5e:span-java-client:4.4.2"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/span-java-client-4.4.2.jar
target/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.BlobsApi;
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");
BlobsApi apiInstance = new BlobsApi(defaultClient);
String collectionId = "collectionId_example"; // String |
String blobId = "blobId_example"; // String |
try {
Object result = apiInstance.deleteBlob(collectionId, blobId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BlobsApi#deleteBlob");
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
Class | Method | HTTP request | Description |
---|---|---|---|
BlobsApi | deleteBlob | DELETE /span/collections/{collectionId}/blobs/{blobId} | Remove a blob stored on a collection |
BlobsApi | listBlobs | GET /span/collections/{collectionId}/blobs | List the blobs for a collection |
CertificatesApi | createCertificate | POST /span/collections/{collectionId}/certificates/create | Create certificate |
CertificatesApi | retrieveCertificateChain | GET /span/collections/{collectionId}/certificates | Get certificate chain |
CertificatesApi | signCertificate | POST /span/collections/{collectionId}/certificates/sign | Sign certificate |
CertificatesApi | verifyCertificate | POST /span/collections/{collectionId}/certificates/verify | Verify certificate |
CollectionsApi | createCollection | POST /span/collections | Create collection |
CollectionsApi | deleteCollection | DELETE /span/collections/{collectionId} | Delete collection |
CollectionsApi | listCollectionData | GET /span/collections/{collectionId}/data | Retrieve data from devices |
CollectionsApi | listCollections | GET /span/collections | List collections |
CollectionsApi | retrieveCollection | GET /span/collections/{collectionId} | Retrieve collection |
CollectionsApi | updateCollection | PATCH /span/collections/{collectionId} | Update collection |
DevicesApi | addDownstreamMessage | POST /span/collections/{collectionId}/devices/{deviceId}/outbox | Add message to oubox |
DevicesApi | createDevice | POST /span/collections/{collectionId}/devices | Create device |
DevicesApi | deleteDevice | DELETE /span/collections/{collectionId}/devices/{deviceId} | Remove device. |
DevicesApi | deleteDownstreamMessage | DELETE /span/collections/{collectionId}/devices/{deviceId}/outbox/{messageId} | Delete outgoing message |
DevicesApi | deviceCertificate | GET /span/collections/{collectionId}/devices/{deviceId}/certs | Get issued certificate(s) for device |
DevicesApi | listDeviceData | GET /span/collections/{collectionId}/devices/{deviceId}/data | Retrieve data from device |
DevicesApi | listDevices | GET /span/collections/{collectionId}/devices | List devices in collection. |
DevicesApi | listDownstreamMessages | GET /span/collections/{collectionId}/devices/{deviceId}/outbox | List the messages in the outbox |
DevicesApi | listUpstreamMessages | GET /span/collections/{collectionId}/devices/{deviceId}/inbox | List incoming messages |
DevicesApi | retrieveDevice | GET /span/collections/{collectionId}/devices/{deviceId} | Retrieve device |
DevicesApi | updateDevice | PATCH /span/collections/{existingCollectionId}/devices/{deviceId} | Update device |
FotaApi | clearFirmwareError | DELETE /span/collections/{collectionId}/devices/{deviceId}/fwerror | Clear FOTA error |
FotaApi | createFirmware | POST /span/collections/{collectionId}/firmware | Create firmware |
FotaApi | deleteFirmware | DELETE /span/collections/{collectionId}/firmware/{imageId} | Delete firmware |
FotaApi | firmwareUsage | GET /span/collections/{collectionId}/firmware/{imageId}/usage | Firmware usage |
FotaApi | listFirmware | GET /span/collections/{collectionId}/firmware | List firmware |
FotaApi | retrieveFirmware | GET /span/collections/{collectionId}/firmware/{imageId} | Retrieve firmware |
FotaApi | updateFirmware | PATCH /span/collections/{existingCollectionId}/firmware/{imageId} | Update firmware |
GatewaysApi | createGateway | POST /span/collections/{collectionId}/gateways | Create gateway |
GatewaysApi | deleteGateway | DELETE /span/collections/{collectionId}/gateways/{gatewayId} | Delete gateway |
GatewaysApi | gatewayCertificates | GET /span/collections/{collectionId}/gateways/{gatewayId}/certs | Get issued certificate(s) for gateway |
GatewaysApi | listGateways | GET /span/collections/{collectionId}/gateways | List gateways |
GatewaysApi | retrieveGateway | GET /span/collections/{collectionId}/gateways/{gatewayId} | Retrieve gateway |
GatewaysApi | updateGateway | PATCH /span/collections/{existingCollectionId}/gateways/{gatewayId} | Update gateway |
OutputsApi | createOutput | POST /span/collections/{collectionId}/outputs | Create output |
OutputsApi | deleteOutput | DELETE /span/collections/{collectionId}/outputs/{outputId} | Delete output |
OutputsApi | listOutputs | GET /span/collections/{collectionId}/outputs | List outputs |
OutputsApi | logs | GET /span/collections/{collectionId}/outputs/{outputId}/logs | Output logs |
OutputsApi | retrieveOutput | GET /span/collections/{collectionId}/outputs/{outputId} | Retrieve output |
OutputsApi | status | GET /span/collections/{collectionId}/outputs/{outputId}/status | Output status |
OutputsApi | updateOutput | PATCH /span/collections/{existingCollectionId}/outputs/{outputId} | Update output |
SpanApi | getSystemInfo | GET /span/system | System information |
- AddDownstreamMessageRequest
- Any
- Blob
- CellularIoTConfig
- CellularIoTMetadata
- CertificateChainResponse
- CertificateInfo
- ClearFirmwareErrorResponse
- CoAPMetadata
- Collection
- CollectionFirmware
- CreateCertificateRequest
- CreateCertificateResponse
- CreateCollectionRequest
- CreateDeviceRequest
- CreateFirmwareRequest
- CreateOutputRequest
- DeleteDownstreamMessageResponse
- Device
- DeviceCertificateResponse
- DeviceConfig
- DeviceMetadata
- Firmware
- FirmwareManagement
- FirmwareMetadata
- FirmwareUsageResponse
- Gateway
- GatewayCIoTConfig
- GatewayCertificateResponse
- GatewayConfig
- GatewayCustomConfig
- GatewayDeviceConfig
- GatewayDeviceMetadata
- GatewayInetConfig
- GatewayMetadata
- GatewayStatus
- GatewayType
- InetMetadata
- InlineObject
- InlineObject1
- ListBlobResponse
- ListCollectionResponse
- ListDataResponse
- ListDevicesResponse
- ListDownstreamMessagesResponse
- ListFirmwareResponse
- ListGatewayResponse
- ListOutputResponse
- ListUpstreamMessagesResponse
- MQTTMetadata
- MessageDownstream
- MessageState
- MessageTransport
- MessageUpstream
- Output
- OutputConfig
- OutputDataMessage
- OutputLogEntry
- OutputLogResponse
- OutputMessageType
- OutputStatusResponse
- OutputType
- RetrieveBlobResponse
- SignCertificateRequest
- SignCertificateResponse
- Status
- SystemInfoResponse
- UDPMetadata
- UpdateCollectionRequest
- UpdateDeviceRequest
- UpdateFirmwareRequest
- UpdateOutputRequest
- VerifyCertificateRequest
- VerifyCertificateResponse
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.