---
raw: true
search:
  tags:
    - Versions
    - GET
seo:
  description: >-
    Returns the version's source files with paths, sizes,… Reference for the GET
    /v1/spaces/{spaceId}/versions/{versionId}/files endpoint in the Spacefast
    API.
sidebar:
  label: List a version's files
  badge: GET
title: List a version's files
type: openapi-operation
---
Returns the version's source files with paths, sizes, and content hashes, read from the runtime's file catalog.

`GET /v1/spaces/{spaceId}/versions/{versionId}/files`

**Responses**

- `200` — Response for status 200
- `default` — Problem details (RFC 9457). Any 4xx/5xx response is one \`application/problem+json\` document.

Response example, 200:

```json
{
  "$schema": "http://example.com",
  "data": {
    "versionId": "string",
    "view": "uploaded",
    "files": [
      {
        "path": "string",
        "size": 0,
        "sha256": "string",
        "contentType": "string",
        "sourceUrl": "http://example.com",
        "previewable": true,
        "generatedPreview": {
          "kind": "image",
          "status": "ready",
          "key": "string",
          "cacheScope": "hash",
          "contentType": "image/webp",
          "width": 1,
          "height": 1
        }
      }
    ],
    "index": {
      "entries": [
        {
          "key": "string",
          "selector": {
            "kind": "hash",
            "sha256": "string"
          },
          "primaryPath": "string",
          "paths": [
            "string"
          ],
          "count": 0,
          "size": 0,
          "totalBytes": 0,
          "contentTypes": [
            "string"
          ],
          "previewable": true,
          "generatedPreview": {
            "kind": "image",
            "status": "ready",
            "key": "string",
            "cacheScope": "hash",
            "contentType": "image/webp",
            "width": 1,
            "height": 1
          },
          "searchText": "string"
        }
      ],
      "byHash": {
        "property1": {
          "key": "string",
          "selector": {
            "kind": "hash",
            "sha256": "string"
          },
          "primaryPath": "string",
          "paths": [
            "string"
          ],
          "count": 0,
          "size": 0,
          "totalBytes": 0,
          "contentTypes": [
            "string"
          ],
          "previewable": true,
          "generatedPreview": {
            "kind": "image",
            "status": "ready",
            "key": "string",
            "cacheScope": "hash",
            "contentType": "image/webp",
            "width": 1,
            "height": 1
          },
          "searchText": "string"
        },
        "property2": {
          "key": "string",
          "selector": {
            "kind": "hash",
            "sha256": "string"
          },
          "primaryPath": "string",
          "paths": [
            "string"
          ],
          "count": 0,
          "size": 0,
          "totalBytes": 0,
          "contentTypes": [
            "string"
          ],
          "previewable": true,
          "generatedPreview": {
            "kind": "image",
            "status": "ready",
            "key": "string",
            "cacheScope": "hash",
            "contentType": "image/webp",
            "width": 1,
            "height": 1
          },
          "searchText": "string"
        }
      },
      "byPath": {
        "property1": {
          "key": "string",
          "selector": {
            "kind": "hash",
            "sha256": "string"
          },
          "primaryPath": "string",
          "paths": [
            "string"
          ],
          "count": 0,
          "size": 0,
          "totalBytes": 0,
          "contentTypes": [
            "string"
          ],
          "previewable": true,
          "generatedPreview": {
            "kind": "image",
            "status": "ready",
            "key": "string",
            "cacheScope": "hash",
            "contentType": "image/webp",
            "width": 1,
            "height": 1
          },
          "searchText": "string"
        },
        "property2": {
          "key": "string",
          "selector": {
            "kind": "hash",
            "sha256": "string"
          },
          "primaryPath": "string",
          "paths": [
            "string"
          ],
          "count": 0,
          "size": 0,
          "totalBytes": 0,
          "contentTypes": [
            "string"
          ],
          "previewable": true,
          "generatedPreview": {
            "kind": "image",
            "status": "ready",
            "key": "string",
            "cacheScope": "hash",
            "contentType": "image/webp",
            "width": 1,
            "height": 1
          },
          "searchText": "string"
        }
      }
    },
    "search": {
      "query": "string",
      "total": 0,
      "matched": 0
    }
  }
}
```
