---
title: "List the entities extracted from one file, within a space"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List the entities extracted from one file, within a space

Path: CloudRaker Workspace API › Ontology

`GET /spaces/{spaceId}/ontology/files/{fileId}/entities`

Returns `{ entities }` — every entity the given `:fileId` contributes to the space graph, with its `id`, `type`, `name`, and the file-local `mentions` (each with `page` + `bbox` for documents or `startSeconds`/`endSeconds`/`speaker` for audio, `null` where inapplicable). Entities are limited to those seen in this document. Requires `space:read` on `:spaceId`; missing access surfaces as a 404.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `spaceId` (`listFileEntities.path.spaceId`; string, required)
- `fileId` (`listFileEntities.path.fileId`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/spaces/<spaceId>/ontology/files/<fileId>/entities' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/spaces/<spaceId>/ontology/files/<fileId>/entities';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/spaces/<spaceId>/ontology/files/<fileId>/entities"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The file's entities with their in-file grounded mentions.

#### Example

```json
{
  "entities": [
    {
      "id": "string",
      "type": "organization",
      "name": "string",
      "mentions": [
        {
          "page": -9007199254740991,
          "bbox": {
            "x": 0,
            "y": 0,
            "width": 0,
            "height": 0
          },
          "text": "string",
          "startSeconds": 0,
          "endSeconds": 0,
          "speaker": "string"
        }
      ]
    }
  ]
}
```

- `entities` (`listFileEntities.response.200.entities`; array<object>, required)
  - `id` (`listFileEntities.response.200.entities.id`; string, required)
  - `type` (`listFileEntities.response.200.entities.type`; string, required)
    - example `"organization"`
  - `name` (`listFileEntities.response.200.entities.name`; string, required)
  - `mentions` (`listFileEntities.response.200.entities.mentions`; array<object>, required)
    - `page` (`listFileEntities.response.200.entities.mentions.page`; any of, required) — 0-based page, for documents.
      - any of: `integer`, `null`
    - `bbox` (`listFileEntities.response.200.entities.mentions.bbox`; any of, required)
      - any of: `OntologyBBox`, `null`
    - `text` (`listFileEntities.response.200.entities.mentions.text`; string, required)
    - `startSeconds` (`listFileEntities.response.200.entities.mentions.startSeconds`; number | null, required) — For audio transcripts.
    - `endSeconds` (`listFileEntities.response.200.entities.mentions.endSeconds`; number | null, required)
    - `speaker` (`listFileEntities.response.200.entities.mentions.speaker`; string | null, required)


Source: https://docs.cloudraker.com/workspace/api/ontology/list-file-entities/index.md
