Module models

Source
Expand description

Fundamentum API’s models to interact with the API and the HTTP client.

§Basic Fundamentum API’s Response

All of the API’s responses share the same basic structure, which is represented by the ApiResponse. In case of errors, other API responses are possible.

API’s successful response :

{
    "status": "success",
    "data": {
        "configuration": null,
        "mqtt": {
            "host": "mqtts.fundamentum-iot-dev.com",
            "port": 8883
        }
    }
}

API’s unsuccessful response with data :

{
    "status": "error",
    "message": "No Registry to provision device on this project",
    "data":  {
        "errors": [
            {
                "type": "field",
                "value": "serial_number_1",
                "msg": "Invalid value",
                "path": "serial_number",
                "location": "body"
            }
        ]
    }
}

Structs§

ApiErrors
Contains a Vector of Fundamentum API errors.
ApiResponse
The basic Fundamentum API response scheme.
ApiResponseFailedData
The basic Fundamentum API response scheme for errors with data.
ApiResponseFailedEmpty
The basic Fundamentum API response scheme for errors without data.
DeviceFQN
Device fully qualified name.
Empty
The “empty” JSON object.
HttpBody
Body of an HTTP request
HttpRequest
HTTP request fields.
MqttBroker
The Mqtt broker’s configuration to access the Fundamentum MQTT API
ProvisionRequestV3
Provisioning Scheme. More information in the documentation.
ProvisionResponse
Provision Response Scheme
RegistryFQN
Registry fully qualified name on the Hub.
StatusCode
HTTP status code

Enums§

ApiStatus
Status returned from the Fundamentum API.
DeviceIdentity
Algorithm and public secret to identify the device from the cloud.
DeviceIdentityTag
Tags for the DeviceIdentity enumeration.
HttpMethod
HTTP request methods.