---
title: "REST API: Get Space Root Directory"
type: "wiki"
space: "Axero Documentation"
author: "Anonymous User"
created: 2020-07-10T18:11:38Z
updated: 2026-09-28T01:16:51Z
tags: ["API"]
url: "https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/42913/rest-api-get-space-root-directory"
---

# REST API: Get Space Root Directory

[Open API Guide](https://my.axerosolutions.com/spaces/5/axero-documentation/api-guide?id=42913)
GET/api/spaces/\{SpaceID\}/files/directories/root

Get the root directory of a space.

## Request

### Request Header
| Header | Required | Value | Description |
| :--- | :--- | :--- | :--- |
| `Authorization` | YES | `Bearer YOUR_TOKEN` | Bearer token for the authenticated user. [Learn how to create Bearer tokens](https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/108973/creating-bearer-tokens). |
### Required Parameters
| Parameter | Type | Required | Location | Description |
| :--- | :--- | :--- | :--- | :--- |
| `SpaceID` | Integer | YES | Path | Unique ID of the space |
## Example

### Request Header

```
Authorization: Bearer YOUR_TOKEN
```

### Request URL

`https://your-site.com/api/spaces/252/files/directories/root`

### Success Response

```
{
  "IsError": false,
  "ResponseMessage": "",
  "ResponseData": {
    "DirectoryID": 3590,
    "DirectoryName": "Root",
    "ParentID": 0,
    "UserID": 630,
    "SpaceID": 313,
    "SpaceName": "Marketing",
    "MediaServerID": 0,
    "MediaServerRootURL": "https://your-site.com/Assets/Uploaded-Files",
    "IsDeleted": false,
    "IsRenamable": false,
    "IsDeletable": false,
    "IsSubDirectoryCreatable": false,
    "CanCreateFile": false,
    "IsSync": false,
    "IsActivityStreamDirectory": false,
    "IsDownloadable": false,
    "ExternalDirectoryType": 0,
    "ExternalURL": "",
    "CreatedByUserType": -1,
    "UpdatedByUserType": -1,
    "DateCreated": "2026-09-05T04:01:39.21",
    "ExternalDirectoryID": "",
    "IsExternalContent": false,
    "IsBeingAddedViaExternalSource": false,
    "TenantID": 0
  }
}
```

### Error Response

```
{
  "Message": "The request is invalid."
}
```

## Error Handling

| Status Code | Likely Cause | Next Action |
| :--- | :--- | :--- |
| 400 Bad Request | SpaceID in the path is not an integer. | Send the space's numeric ID. |
| 401 Unauthorized | Missing or invalid Bearer token. | Check token validity. [Learn how to create Bearer tokens →](https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/108973/creating-bearer-tokens) |
| 200 with ResponseData null | The caller cannot view the space's root directory. | Confirm the user can view files in the space. |
| 200 with ResponseData null | The space has no root directory, or no space has that ID. | Check the SpaceID. |
| 500 Server Error | Internal failure. | Retry later. |

## Rate Limits

While Axero does not enforce hard rate limits by default, we recommend the following best practices to ensure optimal performance:

- **Sustained Request Rate:** Do not exceed 5 API calls per second
- **Sequential Processing:** Wait for each request to complete before sending the next in automated workflows
- **Concurrent Connections:** If parallel processing is required, limit to 3 or fewer simultaneous requests
- **Response Timeout:** Ensure API responses complete within 15 seconds during testing

Axero may implement temporary rate restrictions if excessive API usage affects overall site performance. For high-volume integrations, contact Axero to discuss your requirements.
