Skip to content

Litestar API 1.0.0

Servers

Description URL
/ /

Endpoints


GET /api/query/collectors/{collector_id}

GetCollectorDetails

Description

Returns the details for all data contained in a collector node.

Input parameters

Parameter In Type Default Nullable Description
collector_id path string No
errors_page query integer No
errors_page_size query integer No

Response 200 OK

{
    "id": "string",
    "name": "string",
    "device_model": "string",
    "polling_interval": 0,
    "status": "Unknown",
    "total_sensors": 0,
    "latest_record": "2022-04-13T15:42:05.901Z",
    "earliest_record": "2022-04-13T15:42:05.901Z",
    "total_records": 0,
    "latest_error": "2022-04-13T15:42:05.901Z",
    "total_errors": 0,
    "sensors": [
        {
            "id": "string",
            "name": "string",
            "status": null,
            "last_value": null
        }
    ],
    "errors": [
        {
            "message": "string",
            "timestamp": "2022-04-13T15:42:05.901Z",
            "source": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string"
        },
        "name": {
            "type": "string"
        },
        "device_model": {
            "type": "string"
        },
        "polling_interval": {
            "type": "integer"
        },
        "status": {
            "$ref": "#/components/schemas/StatusEnum"
        },
        "total_sensors": {
            "type": "integer"
        },
        "latest_record": {
            "type": "string",
            "format": "date-time"
        },
        "earliest_record": {
            "type": "string",
            "format": "date-time"
        },
        "total_records": {
            "type": "integer"
        },
        "latest_error": {
            "type": "string",
            "format": "date-time"
        },
        "total_errors": {
            "type": "integer"
        },
        "sensors": {
            "items": {
                "$ref": "#/components/schemas/SensorSummary"
            },
            "type": "array"
        },
        "errors": {
            "items": {
                "$ref": "#/components/schemas/CollectorError"
            },
            "type": "array"
        }
    },
    "type": "object",
    "required": [
        "device_model",
        "earliest_record",
        "errors",
        "id",
        "latest_error",
        "latest_record",
        "name",
        "polling_interval",
        "sensors",
        "status",
        "total_errors",
        "total_records",
        "total_sensors"
    ],
    "title": "CollectorDetails"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

GET /api/query/summary

GetNetworkSummary

Description

Returns the summary for all data contained in this storage node.

Response 200 OK

{
    "total_collectors": 0,
    "collectors_reporting": 0,
    "total_sensors": 0,
    "sensors_reporting": 0,
    "records_reported": 0,
    "errors_reported": 0,
    "collectors": [
        {
            "id": "string",
            "name": "string",
            "status": "Unknown",
            "sensors": [
                {
                    "id": "string",
                    "name": "string",
                    "status": null,
                    "last_value": null
                }
            ]
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "total_collectors": {
            "type": "integer"
        },
        "collectors_reporting": {
            "type": "integer"
        },
        "total_sensors": {
            "type": "integer"
        },
        "sensors_reporting": {
            "type": "integer"
        },
        "records_reported": {
            "type": "integer"
        },
        "errors_reported": {
            "type": "integer"
        },
        "collectors": {
            "items": {
                "$ref": "#/components/schemas/CollectorSummary"
            },
            "type": "array"
        }
    },
    "type": "object",
    "required": [
        "collectors",
        "collectors_reporting",
        "errors_reported",
        "records_reported",
        "sensors_reporting",
        "total_collectors",
        "total_sensors"
    ],
    "title": "NetworkSummary"
}

GET /api/query/collectors/sensors/{sensor_id}

GetSensorDetails

Description

Returns the details for all data contained in a sensor.

Input parameters

Parameter In Type Default Nullable Description
errors_page query integer No
errors_page_size query integer No
records_page query integer No
records_page_size query integer No
sensor_id path string No

Response 200 OK

{
    "id": "string",
    "name": "string",
    "status": "Unknown",
    "code": "DHT20",
    "latest_record": "2022-04-13T15:42:05.901Z",
    "earliest_record": "2022-04-13T15:42:05.901Z",
    "total_records": 0,
    "latest_error": "2022-04-13T15:42:05.901Z",
    "total_errors": 0,
    "records": [
        {
            "sensor_id": "string",
            "record_id": "string",
            "unit": "string",
            "value": 10.12,
            "timestamp": "2022-04-13T15:42:05.901Z"
        }
    ],
    "errors": [
        {
            "message": "string",
            "timestamp": "2022-04-13T15:42:05.901Z",
            "source": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string"
        },
        "name": {
            "type": "string"
        },
        "status": {
            "$ref": "#/components/schemas/StatusEnum"
        },
        "code": {
            "$ref": "#/components/schemas/SensorCodeEnum"
        },
        "latest_record": {
            "type": "string",
            "format": "date-time"
        },
        "earliest_record": {
            "type": "string",
            "format": "date-time"
        },
        "total_records": {
            "type": "integer"
        },
        "latest_error": {
            "type": "string",
            "format": "date-time"
        },
        "total_errors": {
            "type": "integer"
        },
        "records": {
            "items": {
                "$ref": "#/components/schemas/CollectorRecord"
            },
            "type": "array"
        },
        "errors": {
            "items": {
                "$ref": "#/components/schemas/CollectorError"
            },
            "type": "array"
        }
    },
    "type": "object",
    "required": [
        "code",
        "earliest_record",
        "errors",
        "id",
        "latest_error",
        "latest_record",
        "name",
        "records",
        "status",
        "total_errors",
        "total_records"
    ],
    "title": "SensorDetails"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

GET /collectors/{collector_id}

Collector

Input parameters

Parameter In Type Default Nullable Description
collector_id path string No

Response 200 OK

"string"
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "string"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

GET /

Dashboard

Response 200 OK

"string"
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "string"
}

GET /collectors/{collector_id}/sensors/{sensor_id}

Sensor

Input parameters

Parameter In Type Default Nullable Description
collector_id path string No
sensor_id path string No

Response 200 OK

"string"
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "string"
}

Response 400 Bad Request

{
    "status_code": 0,
    "detail": "string",
    "extra": {
        "additionalProperties": {},
        "type": [
            "null",
            "object",
            "array"
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status_code": {
            "type": "integer"
        },
        "detail": {
            "type": "string"
        },
        "extra": {
            "additionalProperties": {},
            "type": [
                "null",
                "object",
                "array"
            ]
        }
    },
    "type": "object",
    "required": [
        "detail",
        "status_code"
    ],
    "description": "Validation Exception",
    "examples": [
        {
            "status_code": 400,
            "detail": "Bad Request",
            "extra": {}
        }
    ]
}

Schemas

CollectorDetails

Name Type
device_model string
earliest_record string(date-time)
errors Array<CollectorError>
id string
latest_error string(date-time)
latest_record string(date-time)
name string
polling_interval integer
sensors Array<SensorSummary>
status StatusEnum
total_errors integer
total_records integer
total_sensors integer

CollectorError

Name Type
message string
source string
timestamp string(date-time)

CollectorRecord

Name Type
record_id string
sensor_id string
timestamp string(date-time)
unit string
value number

CollectorSummary

Name Type
id string
name string
sensors Array<SensorSummary>
status StatusEnum

NetworkSummary

Name Type
collectors Array<CollectorSummary>
collectors_reporting integer
errors_reported integer
records_reported integer
sensors_reporting integer
total_collectors integer
total_sensors integer

SensorCodeEnum

Type: string

SensorDetails

Name Type
code SensorCodeEnum
earliest_record string(date-time)
errors Array<CollectorError>
id string
latest_error string(date-time)
latest_record string(date-time)
name string
records Array<CollectorRecord>
status StatusEnum
total_errors integer
total_records integer

SensorSummary

Name Type
id string
last_value
name string
status StatusEnum

StatusEnum

Type: string