Spaces

List spaces

GET
Returns all spaces for an account or environment

Query parameters

environmentIdstringOptional
The ID of the environment.
pageSizeintegerOptional
Number of spaces to return in a page (default 10)
pageNumberintegerOptional
Based on pageSize, which page of records to return
searchstringOptional
Search query for spaces
namespacestringOptional
Search by namespace
archivedbooleanOptional
Flag to include archived spaces
sortFieldenumOptional
Field to sort spaces by
sortDirectionenumOptional
Direction of sorting
Allowed values: ascdesc
isCollaborativebooleanOptional
Flag for collaborative (project) spaces

Response

This endpoint returns an object
data
list of objects
A place to store your workbooks
pagination
objectOptional
pagination info

Errors

GET
$curl -G https://api.x.flatfile.com/v1/spaces \
> -H "Authorization: Bearer <token>" \
> -d environmentId=us_env_YOUR_ID
Response
1{
2 "data": [
3 {
4 "createdAt": "2021-01-01T00:00:00.000Z",
5 "guestAuthentication": [
6 "magic_link",
7 "shared_link"
8 ],
9 "id": "us_sp_YOUR_ID",
10 "name": "My First Worbook",
11 "updatedAt": "2021-01-01T00:00:00.000Z",
12 "createdByUserId": "us_usr_YOUR_ID",
13 "displayOrder": 1,
14 "environmentId": "us_env_YOUR_ID",
15 "filesCount": 1,
16 "isCollaborative": true,
17 "labels": [],
18 "lastActivityAt": "2021-01-01T00:00:00.000Z",
19 "metadata": null,
20 "primaryWorkbookId": "us_wb_YOUR_ID",
21 "upgradedAt": "2021-01-01T00:00:00.000Z",
22 "workbooksCount": 1
23 }
24 ],
25 "pagination": {
26 "currentPage": 3,
27 "pageCount": 50,
28 "totalCount": 100
29 }
30}