FileSystems
List FileSystems
Retrieves a paginated list of file systems in the workspace. Use cursor-based pagination parameters to navigate through the results.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.list()
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.list();
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"search": Optional[str],
"project_id": Optional[str],
}
{
limit?: number;
startingAfter?: string;
endingBefore?: string;
search?: string;
projectId?: string;
}
Show Response
Show Response
{
"object": Literal["list"],
"data": [{
"id": Optional[str],
"key": str,
"display_name": str,
"description": str,
"project_id": str,
"external_access": Literal["disabled", "read_only", "read_write"],
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
"created": str,
"updated": str,
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
"used_bytes": Optional[str],
"used_inodes": Optional[str],
"last_metered_at": Optional[str],
}],
"has_more": bool,
}
{
object: "list";
data: {
id?: string;
key: string;
displayName: string;
description: string;
projectId: string;
externalAccess: "disabled" | "read_only" | "read_write";
createdById?: string;
updatedById?: string;
created: string;
updated: string;
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
usedBytes?: string;
usedInodes?: string;
lastMeteredAt?: string;
}[];
hasMore: boolean;
}
Create a FileSystem
Creates a file system. Storage is provisioned lazily on first use by an agent run or MCP client.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.create(key="<key>", path="/etc/ppp")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.create({
key: "<key>",
path: "/etc/ppp",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"key": str, # required
"path": str, # required
"display_name": Optional[str],
"description": Optional[str],
"external_access": Optional[Literal["disabled", "read_only", "read_write"]],
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
}
{
key: string; // required
path: string; // required
displayName?: string;
description?: string;
externalAccess?: "disabled" | "read_only" | "read_write";
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
}
Show Response
Show Response
{
"id": Optional[str],
"key": str,
"display_name": str,
"description": str,
"project_id": str,
"external_access": Literal["disabled", "read_only", "read_write"],
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
"created": str,
"updated": str,
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
"used_bytes": Optional[str],
"used_inodes": Optional[str],
"last_metered_at": Optional[str],
}
{
id?: string;
key: string;
displayName: string;
description: string;
projectId: string;
externalAccess: "disabled" | "read_only" | "read_write";
createdById?: string;
updatedById?: string;
created: string;
updated: string;
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
usedBytes?: string;
usedInodes?: string;
lastMeteredAt?: string;
}
Retrieve a FileSystem
Retrieves detailed information about a specific file system, including its quota and external access configuration.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.retrieve(file_system_key="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.retrieve({
fileSystemKey: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"file_system_key": str, # required
}
{
fileSystemKey: string; // required
}
Show Response
Show Response
{
"id": Optional[str],
"key": str,
"display_name": str,
"description": str,
"project_id": str,
"external_access": Literal["disabled", "read_only", "read_write"],
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
"created": str,
"updated": str,
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
"used_bytes": Optional[str],
"used_inodes": Optional[str],
"last_metered_at": Optional[str],
}
{
id?: string;
key: string;
displayName: string;
description: string;
projectId: string;
externalAccess: "disabled" | "read_only" | "read_write";
createdById?: string;
updatedById?: string;
created: string;
updated: string;
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
usedBytes?: string;
usedInodes?: string;
lastMeteredAt?: string;
}
Delete a FileSystem
Permanently deletes a file system and every file stored in it. This cannot be undone.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.delete(file_system_key="<value>")
assert res is not None
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.delete({
fileSystemKey: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"file_system_key": str, # required
}
{
fileSystemKey: string; // required
}
Update a FileSystem
Updates the mutable file system configuration. The key is immutable.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.update(file_system_key="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.update({
fileSystemKey: "<value>",
updateFileSystemRequest: {},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"file_system_key": str, # required
"display_name": Optional[str],
"description": Optional[str],
"path": Optional[str],
"external_access": Optional[Literal["disabled", "read_only", "read_write"]],
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
}
{
fileSystemKey: string; // required
updateFileSystemRequest: { // required
displayName?: string;
description?: string;
path?: string;
externalAccess?: "disabled" | "read_only" | "read_write";
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
};
}
Show Response
Show Response
{
"id": Optional[str],
"key": str,
"display_name": str,
"description": str,
"project_id": str,
"external_access": Literal["disabled", "read_only", "read_write"],
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
"created": str,
"updated": str,
"sharing": { # optional
"all_projects": Dict[str, Any], # optional
"selected": { # optional
"project_ids": List[str], # optional
},
"allow_version_pin": Optional[bool],
"allow_fork": Optional[bool],
"auto_grant_new_projects": Optional[bool],
},
"used_bytes": Optional[str],
"used_inodes": Optional[str],
"last_metered_at": Optional[str],
}
{
id?: string;
key: string;
displayName: string;
description: string;
projectId: string;
externalAccess: "disabled" | "read_only" | "read_write";
createdById?: string;
updatedById?: string;
created: string;
updated: string;
sharing?: {
allProjects?: Record<string, unknown>;
selected?: {
projectIds?: string[];
};
allowVersionPin?: boolean;
allowFork?: boolean;
autoGrantNewProjects?: boolean;
};
usedBytes?: string;
usedInodes?: string;
lastMeteredAt?: string;
}
List Files
Lists the files and folders stored in a file system. An empty path lists the file system root.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.list_files(file_system_key="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.listFiles({
fileSystemKey: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"file_system_key": str, # required
"path": Optional[str],
"depth": Optional[int],
"max_entries": Optional[int],
}
{
fileSystemKey: string; // required
path?: string;
depth?: number;
maxEntries?: number;
}
Show Response
Show Response
{
"path": str,
"depth": int,
"entries": [{
"path": str,
"name": str,
"type": Literal["file", "dir", "symlink", "other"],
"size_bytes": str,
"modified": str,
}],
"entry_count": int,
"truncated": bool,
}
{
path: string;
depth: number;
entries: {
path: string;
name: string;
type: "file" | "dir" | "symlink" | "other";
sizeBytes: string;
modified: string;
}[];
entryCount: number;
truncated: boolean;
}
Delete File
Deletes one file or folder. A folder that still has content is refused unless recursive is set.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.delete_file(file_system_key="<value>")
assert res is not None
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.deleteFile({
fileSystemKey: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"file_system_key": str, # required
"path": Optional[str],
"recursive": Optional[bool],
}
{
fileSystemKey: string; // required
path?: string;
recursive?: boolean;
}
Show Response
Show Response
{
"path": str,
"type": Literal["file", "dir", "symlink", "other"],
}
{
path: string;
type: "file" | "dir" | "symlink" | "other";
}
Move File
Moves or renames one file or folder within the same file system. Missing destination folders are created.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.move_file(file_system_key="<value>", from_="<value>", to="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.moveFile({
fileSystemKey: "<value>",
moveFileSystemFileRequest: {
from: "<value>",
to: "<value>",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"file_system_key": str, # required
"from_": str, # required
"to": str, # required
}
{
fileSystemKey: string; // required
moveFileSystemFileRequest: { // required
from: string; // required
to: string; // required
};
}
Show Response
Show Response
{
"from_": str,
"to": str,
}
{
from: string;
to: string;
}
Stat File
Retrieves the metadata of one file or folder without transferring its content.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.stat_file(file_system_key="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.statFile({
fileSystemKey: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"file_system_key": str, # required
"path": Optional[str],
}
{
fileSystemKey: string; // required
path?: string;
}
Show Response
Show Response
{
"path": str,
"type": Literal["file", "dir", "symlink", "other"],
"size_bytes": str,
"mode": str,
"modified": str,
}
{
path: string;
type: "file" | "dir" | "symlink" | "other";
sizeBytes: string;
mode: string;
modified: string;
}
Create Folder
Creates a folder and every missing parent. Succeeds on a folder that already exists.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.file_systems.create_folder(file_system_key="<value>", path="/boot/defaults")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.fileSystems.createFolder({
fileSystemKey: "<value>",
createFileSystemFolderRequest: {
path: "/boot/defaults",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"file_system_key": str, # required
"path": str, # required
}
{
fileSystemKey: string; // required
createFileSystemFolderRequest: { // required
path: string; // required
};
}
Show Response
Show Response
{
"path": str,
}
{
path: string;
}