---
title: "REST API: Get Space Files"
type: "wiki"
space: "Axero Documentation"
author: "Anonymous User"
created: 2015-05-08T12:34:30Z
updated: 2026-09-28T01:16:43Z
tags: ["API"]
url: "https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/4910/rest-api-get-space-files"
---

# REST API: Get Space Files

[Open API Guide](https://my.axerosolutions.com/spaces/5/axero-documentation/api-guide?id=4910)
GET/api/files/space

Retrieve the files in a space. A site administrator gets every matching file; any other caller gets only the files they can view.

## 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 | Query | ID of the space to return files from |
### Optional Parameters
| Parameter | Type | Required | Location | Description |
| :--- | :--- | :--- | :--- | :--- |
| `FileDirectoryID` | Integer | NO | Query | ID of the file directory to return files from. A value that is not a number is ignored, and files from every directory in the space are returned. |
| `Status` | Integer | NO | Query | Status of the files to return, an EntityStatus value: PendingWorkflow = 0, Published = 1, Draft = 2, Declined = 3, Updated = 4, Expired = 5, Spam = 6, All = 7, DelayedPublishing = 8, TemporarilySaved = 9, UnderProcessing = 10, Deleted = 11. Default: 7 \(All\). |
| `SortColumn` | String | NO | Query | Column to sort by. Values:<br><br>Unspecified = 0,<br>DateCreated = 1,<br>Rating = 2,<br>DatePublished = 3,<br>DateUpdated = 4,<br>ViewCount = 5,<br>CommentCount = 6,<br>EventStartDate = 7,<br>SortOrder = 8,<br>VoteCount = 9,<br>ContentTitle = 10,<br>DateAwarded = 11,<br>TagCount = 12,<br>MostRelavant = 13. Default: 0 \(Unspecified\). |
| `SortType` | Integer | NO | Query | Sort direction. Values:<br><br>Ascending = 0,<br>Descending = 1,<br>Unspecified = 2. Default: 2 \(Unspecified\). |
| `StartPage` | Integer | NO | Query | Page of results to return. Default: 1. |
| `PageLength` | Integer | NO | Query | Number of results to return per page. When omitted, every matching file is returned in one page. A value that is not a number is treated as omitted. |
| `UserID` | Integer | NO | Query | Return only the files uploaded by this user. Omit for every user. |
## Example

### Request Header

```
Authorization: Bearer YOUR_TOKEN
```

### Request URL

`https://your-site.com/api/files/space?SpaceID=234&Status=1&SortColumn=1&SortType=0&StartPage=1&PageLength=100`

### Success Response

```
{
  "IsError": false,
  "ResponseMessage": "",
  "ResponseData": [
    {
      "ContentID": 2355,
      "EntityType": 14,
      "ContentTypeID": 14,
      "ContentTitle": "star.png",
      "ContentStub": "star-png",
      "ContentBody": "",
      "ContentBodyUnprocessed": "",
      "ContentSummary": "",
      "AuthorID": 1,
      "AuthorUserName": "john",
      "UpdatedByUserID": 1,
      "UpdatedByUserDisplayName": "John Smith",
      "UpdatedByUserUsername": "john",
      "UpdatedByUserEmail": "acme@acme.com",
      "UpdatedByUserFirstName": "John",
      "UpdatedByUserLastName": "Smith",
      "UpdatedByUserAvatarImageUrl": "https://your-site.com/Assets/Uploaded-Photos/884af119-4937-4b33-a795-826cda3d19a3.png",
      "UpdatedByUserProfileUrl": "https://your-site.com//people/john",
      "ParentContentID": 326,
      "ContentVersionID": 1,
      "SpaceID": 234,
      "WorkflowID": 0,
      "CurrentWorkflowStepID": 0,
      "StatusID": 1,
      "DateCreated": "2026-02-09T12:03:10.557",
      "DatePublished": "2026-02-09T12:03:12.78",
      "DateUpdated": "2026-02-09T12:03:10.557",
      "IsFeatured": false,
      "ViewCount": 0,
      "CommentCount": 0,
      "Rating": 0,
      "MetaTitle": "star.png",
      "MetaDescription": "",
      "MetaKeywords": "",
      "ContentMediaServerID": 3,
      "ContentMediaFileName": "02824a14-39c2-4828-a128-11e4648706b7.png",
      "ContentMediaServerRootURL": "https://your-site.com/Assets/Uploaded-CMS-Files",
      "SpaceName": "Files storage space",
      "SpaceURL": "/spaces/234/files-storage-space",
      "AuthorDisplayName": "John Smith",
      "AuthorEmail": "acme@acme.com",
      "AuthorFirstName": "John",
      "AuthorLastName": "Smith",
      "AuthorAvatarImageUrl": "https://your-site.com/Assets/Uploaded-Photos/884af119-4937-4b33-a795-826cda3d19a3.png",
      "AuthorProfileUrl": "http://your-site.com//people/john",
      "IsLatest": false,
      "DateCreatedString": "19 minutes ago",
      "DatePublishedString": "19 minutes ago",
      "DateUpdatedString": "19 minutes ago",
      "ContentURL": "/spaces/234/file-storage-space/files/2355/star-png",
      "ContentVersionURL": "",
      "IsPublishedFromDraftMode": false,
      "IsPublishedFromDelayedPublishingMode": false,
      "ParentContentTitle": "Root",
      "ParentContentURL": "/spaces/files/default?spaceid=234&spacename=file-storage-space&directoryid=326",
      "IsPublishedFromUnderProcessingMode": false,
      "IsWallContent": false,
      "ContentFileSize": 159926,
      "ContentFileSizeString": "156.2KB",
      "ContentTypeIconCSSClass": "cf-icon cf-icon-file-image",
      "ContentFileUpdateType": 0,
      "IsEditable": true,
      "IsDeletable": true,
      "IsDownloadable": true,
      "IsChekoutable": false,
      "IsUndochekoutable": false,
      "IsChekinable": false,
      "IsRestoreable": false,
      "IsPurgeable": false,
      "IsHistoryViewable": true,
      "IsMoveable": true,
      "ContentMediaOnlineViewUrl": "/spaces/234/files-storage-space/files/view/2355",
      "ContentMediaUrl": "/fileattachment?file=tTC%2FraSgl9HKLbDv5%2BOcig%3D%3D&v=1",
      "IsDirectory": false
    }
  ]
}
```

### Error Response

```
{
  "Message": "The requested resource does not support http method 'GET'."
}
```

## Error Handling

| Status Code | Likely Cause | Next Action |
| :--- | :--- | :--- |
| 400 Bad Request | SpaceID is not an integer. | Check the request against the required parameters. |
| 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) |
| 500 Server Error | SortColumn, SortType, StartPage, or PageLength holds a value with a non-numeric character such as a comma. The endpoint fails with an empty body instead of reporting the bad value. | Send these parameters as whole numbers. |
| 500 Server Error | Internal failure. | Retry later. |
| 404 or 405 | A required query parameter was left out, so the request matched a different action or none. The message reads No HTTP resource was found or The requested resource does not support http method. | Send every required query parameter. The message does not mean the item you asked for is missing. |

## 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.
