# get\_\_bucket\_{bucketId}\_status

`GET /bucket/{bucketId}/status`

*Get Bucket Status*

Retrieve the current status of a specific storage bucket, including information about all connected nodes, their latency, and operational status.

**Note:** This endpoint respects workspace access controls. Users can only access buckets within their accessible workspaces.

#### TypeScript Client Library

```typescript
public getStorageBucketStatus = async (bucketId: string): Promise<StorageBucketStatusResponse> => {
  return this.makeRequest<StorageBucketStatusResponse>(`bucket/${bucketId}/status`, 'GET', null);
};
```

#### Code Samples

{% tabs %}
{% tab title="Shell" %}

```shell
# You can also use wget
curl -X GET https://backend.flashback.tech/bucket/{bucketId}/status \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
```

{% endtab %}

{% tab title="HTTP" %}

```http
GET https://backend.flashback.tech/bucket/{bucketId}/status HTTP/1.1
Host: localhost:3000
Accept: application/json
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://backend.flashback.tech/bucket/{bucketId}/status',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://backend.flashback.tech/bucket/{bucketId}/status',
  params: {
  }, headers: headers

p JSON.parse(result)
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://backend.flashback.tech/bucket/{bucketId}/status', headers = headers)

print(r.json())
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://backend.flashback.tech/bucket/{bucketId}/status', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getResponse()->getBody()->getContents());
 }
```

{% endtab %}

{% tab title="Java" %}

```java
URL obj = new URL("https://backend.flashback.tech/bucket/{bucketId}/status");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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());
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://backend.flashback.tech/bucket/{bucketId}/status", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
```

{% endtab %}
{% endtabs %}

#### Parameters <a href="#get__bucket_-bucketid-_status-parameters" id="get__bucket_-bucketid-_status-parameters"></a>

| Name     | In   | Type   | Required | Description                     |
| -------- | ---- | ------ | -------- | ------------------------------- |
| bucketId | path | string | true     | Unique identifier of the bucket |

> Example responses

> 200 Response

```json
{
  "bucketId": "550e8400-e29b-41d4-a716-446655440000",
  "nodeStatus": [
    {
      "ip": "192.168.1.100",
      "region": "us-east-1",
      "version": "1.2.3",
      "status": "ONLINE",
      "latency_ms": 45,
      "lastUpdated": "2024-01-15T10:30:00Z"
    }
  ]
}
```

#### Responses <a href="#get__bucket_-bucketid-_status-responses" id="get__bucket_-bucketid-_status-responses"></a>

| Status | Meaning                                                        | Description              | Schema |
| ------ | -------------------------------------------------------------- | ------------------------ | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)        | Bucket status retrieved  | Inline |
| 403    | [Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) | Insufficient permissions | Inline |
| 404    | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | Bucket or user not found | Inline |

#### Response Schema <a href="#get__bucket_-bucketid-_status-responseschema" id="get__bucket_-bucketid-_status-responseschema"></a>

Status Code **200**

| Name           | Type              | Required | Restrictions | Description                            |
| -------------- | ----------------- | -------- | ------------ | -------------------------------------- |
| » bucketId     | string            | false    | none         | Unique identifier for the bucket       |
| » nodeStatus   | \[object]         | false    | none         | Array of node status information       |
| »» ip          | string            | false    | none         | IP address of the node                 |
| »» region      | string            | false    | none         | Geographic region of the node          |
| »» version     | string            | false    | none         | Software version running on the node   |
| »» status      | string            | false    | none         | Current operational status of the node |
| »» latency\_ms | integer           | false    | none         | Latency to the node in milliseconds    |
| »» lastUpdated | string(date-time) | false    | none         | Timestamp of last status update        |

Status Code **403**

| Name      | Type    | Required | Restrictions | Description |
| --------- | ------- | -------- | ------------ | ----------- |
| » success | boolean | false    | none         | none        |
| » message | string  | false    | none         | none        |

Status Code **404**

| Name      | Type    | Required | Restrictions | Description |
| --------- | ------- | -------- | ------------ | ----------- |
| » 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flashback.tech/support-reference/platform-api-reference/storage-apis/bucket-management/get__bucket_-bucketid-_status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
