Appearance
Depot Aggregations Documentation
Depot Aggregations service for handling data aggregation and statistics
- Version: 1.0.0
Endpoints
Statistics
POST /statistics/aggregation
Summary: Gets aggregations by sector/site/company id with date range and optional review source filter. Operation ID: postStatisticsAggregation
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| No parameters to pass. |
Request Body (application/json):
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
company_uuid | string | No | string | - |
site_uuid | string | No | string | - |
sector_uuid | string | No | string | - |
date_from | string | Yes | string | - |
date_to | string | Yes | string | - |
review_source | string | No | string | - |
rescale_scores | boolean | No | true | - |
score_range | object | No | - |
json
{
"company_uuid": "string",
"site_uuid": "string",
"sector_uuid": "string",
"date_from": "string",
"date_to": "string",
"review_source": "string",
"rescale_scores": true,
"score_range": {
"min": 0,
"max": 0
}
}Responses:
200 OK Aggregated statistics were calculated successfully.
json
{}Response Parameters
| Property | Type | Description | Enum |
|---|---|---|---|
value | - | - | - |
400 Bad Request The aggregation request is invalid.
json
{
"message": "string"
}401 Unauthorized The request is missing a valid depot client identifier.
json
{
"message": "string"
}500 Internal Server Error The service failed to calculate aggregations.
json
{
"message": "string"
}Example usage
curl
curl --location --request POST 'https://api.example.com/statistics/aggregation' \
--header 'Content-Type: application/json' \
--data-raw '{
"company_uuid": "string",
"site_uuid": "string",
"sector_uuid": "string",
"date_from": "string",
"date_to": "string",
"review_source": "string",
"rescale_scores": true,
"score_range": {
"min": 0,
"max": 0
}
}'c#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.example.com/statistics/aggregation");
var json = """
{
"company_uuid": "string",
"site_uuid": "string",
"sector_uuid": "string",
"date_from": "string",
"date_to": "string",
"review_source": "string",
"rescale_scores": true,
"score_range": {
"min": 0,
"max": 0
}
}
""";
request.Content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);ts
const response = await fetch("https://api.example.com/statistics/aggregation", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"company_uuid": "string",
"site_uuid": "string",
"sector_uuid": "string",
"date_from": "string",
"date_to": "string",
"review_source": "string",
"rescale_scores": true,
"score_range": {
"min": 0,
"max": 0
}
}),
});
const data = await response.json();
console.log(data);