Closed rysavy-ondrej closed 7 months ago
Base URL: /api/v1/host-context
Enumeration of Available Windows for Specified Period
/windows
GET
start
: Starting timestamp of the period.end
: Ending timestamp of the period.Sample Request:
GET /api/v1/host-context/windows?start=2023-11-01T00:00:00Z&end=2023-11-02T00:00:00Z
Enumeration of Host-contexts within Specific Interval
/contexts
GET
windowId
: Identifier for the specific window interval.ip
: (Optional) IP address to filter specific host-context.Sample Request:
GET /api/v1/host-context/contexts?windowId=1234
Information About the Last Available Window
/windows/last
GET
Sample Request:
GET /api/v1/host-context/windows/last
Enumeration of Aggregated Host-context for Specified Range of Windows
/contexts/aggregated
GET
startWindowId
: Identifier for the starting window.endWindowId
: Identifier for the ending window.Sample Request:
GET /api/v1/host-context/contexts/aggregated?startWindowId=1234&endWindowId=5678
Response Format:
Responses should be in a structured JSON format for easy parsing and standardization. Here's a sample format for the window enumeration:
{
"status": "success",
"data": [
{
"windowId": "1234",
"start": "2023-11-01T00:00:00Z",
"end": "2023-11-01T01:00:00Z"
},
{
"windowId": "1235",
"start": "2023-11-01T01:00:00Z",
"end": "2023-11-01T02:00:00Z"
}
// ... more windows
]
}
Technology: SERVER side: https://fast-endpoints.com/ CLIENT side: https://restsharp.dev/
Alternatively, use GraphQL:
Implemented as specified.
Define and implement an API for host-context consumer. Points:
Implementation hints: