# Get Storage

### List or get storage items

GET /storage\
GET /storage/:uuid

Retrieve storage items, either all (with optional filters) or a single item by `uuid`.

Query parameters (for GET /storage):

| Parameter            | Type    | Description                                                |
| -------------------- | ------- | ---------------------------------------------------------- |
| `uuid`               | string  | Filter by storage item UUID (or use path `/storage/:uuid`) |
| `storage_id`         | number  | Filter by storage ID                                       |
| `location_id`        | number  | Filter by location                                         |
| `case_id`            | number  | Filter by case ID                                          |
| `case_uuid`          | string  | Filter by case UUID                                        |
| `is_general_storage` | boolean | Filter general vs case-assigned storage                    |
| `page_size`          | number  | Results per page (1–1000), optional                        |
| `page`               | number  | Page number (1-based), optional                            |

Example: get all storage at a location

```http
GET /storage?location_id=5
```

Example: get one item by UUID

```http
GET /storage/550e8400-e29b-41d4-a716-446655440000
```

Response: 200 OK

```json
{
  "data": [
    {
      "storage_id": 1,
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "storage_number": "STR-2024-0001",
      "type": "HDD",
      "make": "Vendor",
      "model_name": "Model X",
      "model_number": "X-100",
      "serial_number": "SN123",
      "capacity": 1000,
      "capacity_unit": "GB",
      "notes": "",
      "free_space": 500,
      "location": {
        "location_id": 1,
        "name": "Evidence Room A",
        "group": {
          "location_id": 10,
          "name": "Main Evidence"
        },
        "office": {
          "office_id": 1,
          "name": "HQ"
        },
        "path": "Building 1 / Evidence Room A"
      },
      "case": {
        "case_id": 1,
        "uuid": "660e8400-e29b-41d4-a716-446655440001",
        "case_number": "CASE-2024-0001",
        "case_name": "Example Case",
        "date_assigned": "2024-01-10T00:00:00.000Z",
        "client": {
          "client_id": 1,
          "name": "Acme Corp",
          "email": "contact@acme.example.com",
          "organization": "Acme Corporation"
        }
      },
      "created_on": "2024-01-15T00:00:00.000Z",
      "is_general_storage": false,
      "encryption_key": "",
      "last_audit_date": "2024-01-01",
      "custom_fields": []
    }
  ]
}
```

Storage item response properties

| Property                     | Type           | Description                                                                                                                   |
| ---------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `storage_id`                 | number         | Unique internal ID for the storage item.                                                                                      |
| `uuid`                       | string         | UUID for the storage item.                                                                                                    |
| `storage_number`             | string         | Human-readable storage number (e.g. STR-2024-0001).                                                                           |
| `type`                       | string         | Storage type (e.g. HDD, SSD, USB).                                                                                            |
| `make`                       | string         | Manufacturer or brand.                                                                                                        |
| `model_name`                 | string         | Model name.                                                                                                                   |
| `model_number`               | string         | Model number.                                                                                                                 |
| `serial_number`              | string         | Device serial number.                                                                                                         |
| `capacity`                   | number         | Storage capacity (numeric value).                                                                                             |
| `capacity_unit`              | string         | Unit for capacity: `KB`, `MB`, `GB`, or `TB`.                                                                                 |
| `notes`                      | string         | Free-text notes.                                                                                                              |
| `free_space`                 | number         | Free space (e.g. in bytes or same unit as capacity, depending on implementation).                                             |
| `location`                   | object \| null | Assigned location; see below.                                                                                                 |
| `location.location_id`       | number         | Location ID.                                                                                                                  |
| `location.name`              | string         | Location name.                                                                                                                |
| `location.group`             | object         | Location group.                                                                                                               |
| `location.group.location_id` | number         | Group location ID.                                                                                                            |
| `location.group.name`        | string         | Group name.                                                                                                                   |
| `location.office`            | object         | Office.                                                                                                                       |
| `location.office.office_id`  | number         | Office ID.                                                                                                                    |
| `location.office.name`       | string         | Office name.                                                                                                                  |
| `location.path`              | string         | Hierarchical path (e.g. building / room).                                                                                     |
| `case`                       | object \| null | Assigned case; see below.                                                                                                     |
| `case.case_id`               | number         | Case ID.                                                                                                                      |
| `case.uuid`                  | string         | Case UUID.                                                                                                                    |
| `case.case_number`           | string         | Case number.                                                                                                                  |
| `case.case_name`             | string         | Case name.                                                                                                                    |
| `case.date_assigned`         | string         | ISO date when storage was assigned to the case.                                                                               |
| `case.client`                | object \| null | Case client, if any.                                                                                                          |
| `case.client.client_id`      | number         | Client ID.                                                                                                                    |
| `case.client.name`           | string         | Client name.                                                                                                                  |
| `case.client.email`          | string         | Client email.                                                                                                                 |
| `case.client.organization`   | string         | Client organization.                                                                                                          |
| `created_on`                 | string         | ISO date when the storage item was created.                                                                                   |
| `is_general_storage`         | boolean        | Whether the item is general (unassigned) storage.                                                                             |
| `encryption_key`             | string         | Reference or identifier for the encryption key.                                                                               |
| `last_audit_date`            | string         | Date of last audit.                                                                                                           |
| `custom_fields`              | array \| null  | Custom field values; see [Custom fields](https://docs.monolithforensics.com/monolith/monolith-api/storage-api/custom-fields). |

`location` and `case` may be `null` when not set. When present, `case.client` may also be `null` if the case has no associated client.
