# Summarize the organization's Sandboxes: counts by state and provider, recent creations, running time, recoveries and how many need attention.

Source: <https://everruns.com/docs/api/operations/get_sandbox_fleet_stats/>

GET

/v1/sandboxes/stats

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sandboxes/stats';
const options = {method: 'GET'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request GET \
  --url https://app.everruns.com/api/v1/sandboxes/stats
```

* Production APIapp.everruns.com/api/v1/sandboxes/stats

## Parameters

### Query Parameters

**state**

string

Comma-separated states: `running`, `paused`, `lost`, `starting`, `failed`, `not_started`, `deleted`, or `live` for the first five.

**provider**

string

Comma-separated provider ids, such as `daytona,modal`.

**agent\_id**

string

Only Sandboxes of Sessions that ran this Agent.

**sandbox\_template\_id**

string

Only Sandboxes created from this Sandbox Template.

**needs\_attention**

boolean

Only Sandboxes with at least one attention reason.

**search**

string

Case-insensitive match on Session title, Agent, provider or provider resource id.

**include\_in\_process**

boolean

Include in-process targets (virtual filesystem, host), which have no provider resource.

## Responses

### 200

Success

Media typeapplication/json

Roll-ups for the fleet summary.

object

**by\_state**

required

Sandboxes per state.

Array\<object>

A count keyed by a label.

object

**count**

required

integer format: int64

**key**

required

string

**created\_in\_prior\_window**

required

Created in the window before, for a trend.

integer format: int64

**created\_in\_window**

required

integer format: int64

**live\_by\_provider**

required

Live Sandboxes per provider.

Array\<object>

A count keyed by a label.

object

**count**

required

integer format: int64

**key**

required

string

**needs\_attention**

required

Sandboxes with at least one attention reason.

integer format: int64

**recoveries\_in\_window**

required

Provider resources lost and rebuilt in the window.

integer format: int64

**running\_seconds\_in\_window**

required

Total time Sandboxes spent running in the window.

integer format: int64

**window\_days**

required

Days covered by the `*_in_window` figures.

integer format: int64

##### Example

```json
{
  "by_state": [
    {
      "count": 5,
      "key": "running"
    }
  ],
  "live_by_provider": [
    {
      "count": 5,
      "key": "running"
    }
  ],
  "window_days": 7
}
```