Folders
Get the user's personal folder if it exists.
Successful Response
GET /folders/me HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
Successful Response
{
"id": "ca45f483-db07-41e1-ab9a-1c610614416a",
"name": "folder1",
"user_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"group_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"personal_folder_owner_id": "ca45f483-db07-41e1-ab9a-1c610614416a"
}Successful Response
Validation Error
GET /folders/{folder_id} HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "ca45f483-db07-41e1-ab9a-1c610614416a",
"name": "folder1",
"user_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"group_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"personal_folder_owner_id": "ca45f483-db07-41e1-ab9a-1c610614416a"
}Delete a folder in the current organization.
Successful Response
Validation Error
DELETE /folders/{folder_id} HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Update a folder in the current organization.
The name of the folder, it is used like a path
folder1DEPRECATED. A list containing emails and group ids that have access to the folder
["[email protected]","ca45f483-db07-41e1-ab9a-1c610614416b"]A list containing user ids that have access to the folder
["ca45f483-db07-41e1-ab9a-1c610614416b","ca45f483-db07-41e1-ab9a-1c610614416c"]A list containing group ids that have access to the folder
["ca45f483-db07-41e1-ab9a-1c610614416b","ca45f483-db07-41e1-ab9a-1c610614416c"]Successful Response
Validation Error
PATCH /folders/{folder_id} HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 223
{
"name": "folder1",
"user_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"group_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
]
}{
"id": "ca45f483-db07-41e1-ab9a-1c610614416a",
"name": "folder1",
"user_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"group_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"personal_folder_owner_id": "ca45f483-db07-41e1-ab9a-1c610614416a"
}Get all folders for the current user organization.
Args: offset (int): The offset of the folders to return as a number of rows. Defaults to 0. limit (int): The limit of the folders to return as a number of rows. Defaults to 100. query (str): The search query to filter folders by name. If provided, only folders whose names contain the query string will be returned.
Query parameters for folder retrieval.
Args: offset (int): The offset of the folders to return as a number of rows. Defaults to 0. limit (int): The limit of the folders to return as a number of rows. Defaults to 100. query (str): The search query to filter folders by name. If provided, only folders whose names contain the query string will be returned. include_public_folders (bool): Whether to include public folders in the results. Defaults to True. include_personal_folders (bool): Whether to include personal folders in the results. Defaults to False. include_empty_folders (bool): Whether to include empty folders in the results. Defaults to False.
0100truetruefalsefalseSuccessful Response
Validation Error
POST /folders HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 163
{
"offset": 0,
"limit": 100,
"query": "text",
"include_public_folders": true,
"include_private_folders": true,
"include_personal_folders": false,
"include_empty_folders": false
}[
{
"id": "ca45f483-db07-41e1-ab9a-1c610614416a",
"name": "folder1",
"user_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"group_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"personal_folder_owner_id": "ca45f483-db07-41e1-ab9a-1c610614416a"
}
]Create a new folder in the current organization.
DEPRECATED field, kept for backward compatibility
User ids of users who have access to the folder
Group ids of users who have access to the folder
Successful Response
Validation Error
PUT /folders HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 142
{
"name": "text",
"user_id_access_list": [
"123e4567-e89b-12d3-a456-426614174000"
],
"group_id_access_list": [
"123e4567-e89b-12d3-a456-426614174000"
]
}{
"id": "ca45f483-db07-41e1-ab9a-1c610614416a",
"name": "folder1",
"user_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"group_id_access_list": [
"ca45f483-db07-41e1-ab9a-1c610614416b",
"ca45f483-db07-41e1-ab9a-1c610614416c"
],
"personal_folder_owner_id": "ca45f483-db07-41e1-ab9a-1c610614416a"
}Last updated
Was this helpful?

