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);
});Parameters
bucketId
path
string
true
Unique identifier of the bucket
body
body
object
true
Request body containing the date
Body parameter
Parameters
body
body
object
true
none
» day
body
string
true
Date for which to retrieve statistics (ISO 8601 format)
Example responses
200 Response
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?