# Read object metadata

Source: https://docs.wabe.sh/api-reference/operations/statfile/

`GET https://api.wabe.sh/v1/disks/{disk}/stat`

## Authorization

Project API key from the Wabe Dashboard or actor runtime access token for the disk URL supplied by the broker.

## Parameters

- `disk` (path, string, required) — Project disk name, or the disk ID in the actor runtime disk URL.

- `branch` (query, string)

- `commit` (query, string)

- `label` (query, string)

- `path` (query, string, required)

## Responses

### 200

Current file or directory metadata.

`application/json`

Example

```json
{
  "version": 2,
  "object_id": "1a99088e-bfec-4eec-87e4-19ba5acf29e1",
  "version_id": "f75f43ae-8375-48f0-8bcd-862cb75c26ef",
  "branch_id": "8ec08f61-c6b4-4f3a-83e9-d46ae3e5bc30",
  "revision": 1,
  "first_edit_at_ms": 1794225600000,
  "last_edit_at_ms": 1794225600000,
  "mode": 33188,
  "kind": {
    "File": {
      "content_root": null,
      "size": 0,
      "chunk_bytes": 65536
    }
  }
}
```

Schema

```json
{
  "type": "object",
  "properties": {
    "version": {
      "const": 2
    },
    "kind": {
      "oneOf": [
        {
          "const": "Directory"
        },
        {
          "type": "object",
          "properties": {
            "File": {
              "type": "object",
              "properties": {
                "size": {
                  "type": "integer",
                  "minimum": 0
                },
                "chunk_bytes": {
                  "type": "integer",
                  "minimum": 4096,
                  "maximum": 4194304
                },
                "content_root": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[0-9a-f]{64}$"
                }
              },
              "required": [
                "content_root",
                "size",
                "chunk_bytes"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "File"
          ],
          "additionalProperties": false
        }
      ]
    },
    "object_id": {
      "type": "string",
      "format": "uuid"
    },
    "version_id": {
      "type": "string",
      "format": "uuid"
    },
    "branch_id": {
      "type": "string",
      "format": "uuid",
      "description": "Origin of the version; inherited or imported versions may refer to an internal or deleted branch absent from the branch list."
    },
    "revision": {
      "type": "integer",
      "minimum": 0
    },
    "first_edit_at_ms": {
      "type": "integer",
      "minimum": 0
    },
    "last_edit_at_ms": {
      "type": "integer",
      "minimum": 0
    },
    "mode": {
      "type": "integer",
      "enum": [
        16384,
        33188,
        33261,
        40960
      ]
    }
  },
  "required": [
    "version",
    "kind",
    "object_id",
    "version_id",
    "branch_id",
    "revision",
    "first_edit_at_ms",
    "last_edit_at_ms",
    "mode"
  ],
  "additionalProperties": false
}
```

### 400

Invalid input.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 401

Missing, invalid or revoked project API key, or an invalid runtime access token.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 403

Actor runtime token does not authorize this disk or instance generation.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 404

Object was not found.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 409

Conflict, nonempty destination or referenced object.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 500

Storage, I/O or corruption failure.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 503

Disk unavailable.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```
