post__bucket_{bucketId}_stats
POST /bucket/{bucketId}/stats
Get Bucket Daily Statistics
Retrieve daily performance statistics for a specific storage bucket, including uptime percentages, latency metrics, and node status information for a given date.
Note: This endpoint respects workspace access controls. Users can only access buckets within their accessible workspaces.
TypeScript Client Library
public getBucketNodeStats = async (bucketId: string, data: GetBucketNodeStatsRequest): Promise<GetBucketNodeStatsResponse> => {
return this.makeRequest<GetBucketNodeStatsResponse>(`bucket/${bucketId}/stats`, 'POST', data);
};Code Samples
# You can also use wget
curl -X POST https://backend.flashback.tech/bucket/{bucketId}/stats \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'POST https://backend.flashback.tech/bucket/{bucketId}/stats HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: application/jsonconst inputBody = '{
"day": "2024-01-15T00:00:00.000Z"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://backend.flashback.tech/bucket/{bucketId}/stats',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post 'https://backend.flashback.tech/bucket/{bucketId}/stats',
params: {
}, headers: headers
p JSON.parse(result)import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('https://backend.flashback.tech/bucket/{bucketId}/stats', headers = headers)
print(r.json())<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);URL obj = new URL("https://backend.flashback.tech/bucket/{bucketId}/stats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://backend.flashback.tech/bucket/{bucketId}/stats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}Parameters
bucketId
path
string
true
Unique identifier of the bucket
body
body
object
true
Request body containing the date
Body parameter
{
"day": "2024-01-15T00:00:00.000Z"
}Parameters
body
body
object
true
none
» day
body
string
true
Date for which to retrieve statistics (ISO 8601 format)
Example responses
200 Response
{
"success": true,
"nodeStats": [
{
"ip": "192.168.1.100",
"host": "*-us-east-1-aws.flashback.tech",
"perc_uptime": 99.5,
"avg_latency_ms": 45,
"version": "1.2.3",
"node_status": "ONLINE",
"last_updated": "2024-01-15T10:30:00Z",
"last_latency_ms": 42
}
]
}Responses
Response Schema
Status Code 200
» success
boolean
false
none
Operation success status
» nodeStats
[object]
false
none
Array of daily node statistics
»» ip
string
false
none
IP address of the node
»» host
string
false
none
Hostname pattern for the node
»» perc_uptime
number
false
none
Percentage of time the node was online
»» avg_latency_ms
number
false
none
Average latency to the node in milliseconds
»» version
string
false
none
Software version running on the node
»» node_status
string
false
none
Current operational status of the node
»» last_updated
string(date-time)
false
none
Timestamp of last status update
»» last_latency_ms
number
false
none
Most recent latency measurement in milliseconds
Status Code 400
» success
boolean
false
none
none
» message
string
false
none
none
Status Code 403
» success
boolean
false
none
none
» message
string
false
none
none
Status Code 404
» success
boolean
false
none
none
» message
string
false
none
none
To perform this operation, you must be authenticated by means of one of the following methods: BearerAuth
Last updated
Was this helpful?