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 |
open class func createGateway(collectionId: String, body: CreateGatewayBody, completion: @escaping (_ data: Gateway?, _ error: Error?) -> Void)
Create gateway
Create a new gateway.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import Span
let collectionId = "collectionId_example" // String |
let body = CreateGatewayBody(name: "name_example", type: GatewayType(), config: GatewayConfig(ciot: GatewayCIoTConfig(apn: "apn_example", udpEndpoint: "udpEndpoint_example", coapEndpoint: "coapEndpoint_example"), inet: GatewayInetConfig(dtlsEndpoint: "dtlsEndpoint_example", coapEndpoint: "coapEndpoint_example", mqttEndpoint: "mqttEndpoint_example"), user: GatewayCustomConfig(params: "TODO")), tags: "TODO") // CreateGatewayBody |
// Create gateway
GatewaysAPI.createGateway(collectionId: collectionId, body: body) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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]
open class func deleteGateway(collectionId: String, gatewayId: String, completion: @escaping (_ data: Gateway?, _ error: Error?) -> Void)
Delete gateway
Remove a gateway from Span.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import Span
let collectionId = "collectionId_example" // String |
let gatewayId = "gatewayId_example" // String |
// Delete gateway
GatewaysAPI.deleteGateway(collectionId: collectionId, gatewayId: gatewayId) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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]
open class func gatewayCertificates(collectionId: String, gatewayId: String, completion: @escaping (_ data: GatewayCertificateResponse?, _ error: Error?) -> Void)
Get issued certificate(s) for gateway
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import Span
let collectionId = "collectionId_example" // String |
let gatewayId = "gatewayId_example" // String |
// Get issued certificate(s) for gateway
GatewaysAPI.gatewayCertificates(collectionId: collectionId, gatewayId: gatewayId) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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]
open class func listGateways(collectionId: String, completion: @escaping (_ data: ListGatewayResponse?, _ error: Error?) -> Void)
List gateways
List the user's gatways, including built-in gateways.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import Span
let collectionId = "collectionId_example" // String |
// List gateways
GatewaysAPI.listGateways(collectionId: collectionId) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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]
open class func retrieveGateway(collectionId: String, gatewayId: String, completion: @escaping (_ data: Gateway?, _ error: Error?) -> Void)
Retrieve gateway
Get gateway information
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import Span
let collectionId = "collectionId_example" // String |
let gatewayId = "gatewayId_example" // String |
// Retrieve gateway
GatewaysAPI.retrieveGateway(collectionId: collectionId, gatewayId: gatewayId) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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]
open class func retrieveGatewayStats(collectionId: String, gatewayId: String, completion: @escaping (_ data: GatewayStats?, _ error: Error?) -> Void)
Retrieve gateway statistics
Get statistics for gateway
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import Span
let collectionId = "collectionId_example" // String |
let gatewayId = "gatewayId_example" // String |
// Retrieve gateway statistics
GatewaysAPI.retrieveGatewayStats(collectionId: collectionId, gatewayId: gatewayId) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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]
open class func updateGateway(existingCollectionId: String, gatewayId: String, body: UpdateGatewayBody, completion: @escaping (_ data: Gateway?, _ error: Error?) -> Void)
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.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import Span
let existingCollectionId = "existingCollectionId_example" // String |
let gatewayId = "gatewayId_example" // String |
let body = UpdateGatewayBody(name: "name_example", collectionId: "collectionId_example", type: GatewayType(), config: GatewayConfig(ciot: GatewayCIoTConfig(apn: "apn_example", udpEndpoint: "udpEndpoint_example", coapEndpoint: "coapEndpoint_example"), inet: GatewayInetConfig(dtlsEndpoint: "dtlsEndpoint_example", coapEndpoint: "coapEndpoint_example", mqttEndpoint: "mqttEndpoint_example"), user: GatewayCustomConfig(params: "TODO")), tags: "TODO", enabled: false) // UpdateGatewayBody |
// Update gateway
GatewaysAPI.updateGateway(existingCollectionId: existingCollectionId, gatewayId: gatewayId, body: body) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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]