Skip to content

File systems (VFS)

51 calls. Every request needs the Authorization header: see the overview.

GET /namespaces/{namespaceName}/vfs

Every VFS of the tenant, or of one namespace with { namespace }.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes

Response: VirtualFileSystem[] (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/vfs" \
-H "Authorization: $MAITENTO_AUTH"
POST /namespaces/{namespaceName}/vfs

Creates a VFS in the namespace.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes

Request body: VirtualFileSystemCreateRequest

FieldTypeRequiredDescription
namestringyesThe file system’s name, under 150 characters.

Response: VirtualFileSystem (200)

curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/vfs" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"..."}'
DELETE /namespaces/{namespaceName}/vfs/by-name/{name}

Deletes the VFS with this name.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Response: no body (204)

curl -X DELETE "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>" \
-H "Authorization: $MAITENTO_AUTH"
GET /namespaces/{namespaceName}/vfs/by-name/{name}

The VFS with this name. Throws NotFoundError when there is none.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Response: VirtualFileSystem (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>" \
-H "Authorization: $MAITENTO_AUTH"
POST /namespaces/{namespaceName}/vfs/by-name/{name}/batch/edit

Applies edits to several files (optionally all-or-nothing).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Request body: BatchEditRequest

FieldTypeRequiredDescription
editsBatchEditFileRequest[]List of file edits to apply.
atomicbooleanIf true, all edits must succeed or none are applied. If false, each file is edited independently.

Response: BatchEditResponse (200)

curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/batch/edit" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"edits":[],"atomic":false}'
POST /namespaces/{namespaceName}/vfs/by-name/{name}/batch/read

Reads several files at once.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Request body: BatchReadRequest

FieldTypeRequiredDescription
pathsstring[]Paths to the files to read.
maxLinesPerFileintegerMaximum lines per file (0 = unlimited). Truncates large files.

Response: BatchReadResponse (200)

curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/batch/read" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"paths":[],"maxLinesPerFile":0}'
PUT /namespaces/{namespaceName}/vfs/by-name/{name}/copy

Copies a file or directory.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring
destinationstring

Response: FileSystemEntry (200)

curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/copy" \
-H "Authorization: $MAITENTO_AUTH"
DELETE /namespaces/{namespaceName}/vfs/by-name/{name}/directories

Deletes a directory (with recursive: true, and everything in it).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring
recursiveboolean

Response: no body (204)

curl -X DELETE "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/directories" \
-H "Authorization: $MAITENTO_AUTH"
PUT /namespaces/{namespaceName}/vfs/by-name/{name}/directories

Creates a directory.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: FileSystemDirectory (200)

curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/directories" \
-H "Authorization: $MAITENTO_AUTH"
GET /namespaces/{namespaceName}/vfs/by-name/{name}/directories/contents

Every VFS of the tenant, or of one namespace with { namespace }.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: FileSystemEntry[] (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/directories/contents" \
-H "Authorization: $MAITENTO_AUTH"
GET /namespaces/{namespaceName}/vfs/by-name/{name}/directories/exists

Whether a DIRECTORY exists at the path.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: boolean (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/directories/exists" \
-H "Authorization: $MAITENTO_AUTH"
DELETE /namespaces/{namespaceName}/vfs/by-name/{name}/files

Deletes the VFS with this id.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: no body (204)

curl -X DELETE "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files" \
-H "Authorization: $MAITENTO_AUTH"
PUT /namespaces/{namespaceName}/vfs/by-name/{name}/files/append/bytes

Appends bytes to a file. Never retried.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileByteContentRequest

FieldTypeRequiredDescription
contentbase64yesThe file’s bytes, up to 100 MB. May be empty.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/append/bytes" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
PUT /namespaces/{namespaceName}/vfs/by-name/{name}/files/append/lines

Appends lines to a file. Never retried.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileLinesContentRequest

FieldTypeRequiredDescription
contentstring[]yesThe file’s lines, up to 100,000. May be empty.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/append/lines" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":[]}'
PUT /namespaces/{namespaceName}/vfs/by-name/{name}/files/append/text

Appends text to a file (creating it). Never retried.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileTextContentRequest

FieldTypeRequiredDescription
contentstringyesThe file’s text, up to 100 MB. Whitespace is kept exactly as sent.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/append/text" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
GET /namespaces/{namespaceName}/vfs/by-name/{name}/files/contents/bytes

A file’s bytes.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: binary (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/contents/bytes" \
-H "Authorization: $MAITENTO_AUTH"
GET /namespaces/{namespaceName}/vfs/by-name/{name}/files/contents/lines

A file’s lines.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: string[] (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/contents/lines" \
-H "Authorization: $MAITENTO_AUTH"
GET /namespaces/{namespaceName}/vfs/by-name/{name}/files/contents/text

A file’s text, exactly as stored.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: string (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/contents/text" \
-H "Authorization: $MAITENTO_AUTH"
POST /namespaces/{namespaceName}/vfs/by-name/{name}/files/edit

Applies edit operations to one file.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Request body: EditRequest

FieldTypeRequiredDescription
pathstringPath to the file within the file system.
operationsEditOperation[]List of edit operations to apply, in order.

Response: EditResponse (200)

curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/edit" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"path":"...","operations":[]}'
GET /namespaces/{namespaceName}/vfs/by-name/{name}/files/exists

Whether a FILE exists at the path.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: boolean (200)

curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/exists" \
-H "Authorization: $MAITENTO_AUTH"
PUT /namespaces/{namespaceName}/vfs/by-name/{name}/files/write/bytes

Writes (creates or replaces) a binary file.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileByteContentRequest

FieldTypeRequiredDescription
contentbase64yesThe file’s bytes, up to 100 MB. May be empty.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/write/bytes" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
PUT /namespaces/{namespaceName}/vfs/by-name/{name}/files/write/lines

Writes (creates or replaces) a file from lines.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileLinesContentRequest

FieldTypeRequiredDescription
contentstring[]yesThe file’s lines, up to 100,000. May be empty.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/write/lines" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":[]}'
PUT /namespaces/{namespaceName}/vfs/by-name/{name}/files/write/text

Writes (creates or replaces) a text file.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileTextContentRequest

FieldTypeRequiredDescription
contentstringyesThe file’s text, up to 100 MB. Whitespace is kept exactly as sent.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/files/write/text" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
POST /namespaces/{namespaceName}/vfs/by-name/{name}/find

The VFS with this id, or null.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Request body: FindRequest

FieldTypeRequiredDescription
pathstringStarting directory path. Defaults to ”/” (root).
patternstring | nullGlob pattern to match files (e.g., ”/*.cs”, “src//*.ts”). Supports *, **, ?, [abc], {a,b} patterns.
grepstring | nullSearch pattern for file contents. If specified, only files containing this pattern are returned.
grepModestringHow to interpret the grep pattern: “literal” (default) or “regex”.
ignoreCasebooleanCase-insensitive search for grep. Default false.
contextLinesintegerNumber of lines before and after each grep match to include as context.
includePreviewbooleanIf true, include a preview of each file’s content (first N lines).
previewLinesintegerNumber of lines to include in preview. Default 30.
maxResultsintegerMaximum number of results to return. Default 100.
maxDepthintegerMaximum recursion depth. Default -1 (unlimited).
typestringFilter by entry type: “file”, “directory”, or “all”. Default “file”.
includeHiddenbooleanInclude hidden files/directories (starting with .). Default false.

Response: FindResponse (200)

curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/find" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"path":"...","pattern":"...","grep":"...","grepMode":"...","ignoreCase":false,"contextLines":0,"includePreview":false,"previewLines":0,"maxResults":0,"maxDepth":0,"type":"...","includeHidden":false}'
POST /namespaces/{namespaceName}/vfs/by-name/{name}/move

Moves a file or directory.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Query parameters

NameTypeRequiredDescription
pathstring
destinationstring

Response: FileSystemEntry (200)

curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/move" \
-H "Authorization: $MAITENTO_AUTH"
POST /namespaces/{namespaceName}/vfs/by-name/{name}/tree

The directory tree below a path.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
namespaceNamestringyes
namestringyes

Request body: TreeRequest

FieldTypeRequiredDescription
pathstringStarting path. Defaults to ”/”.
maxDepthintegerMaximum depth to recurse. -1 for unlimited.
includeFilesbooleanInclude files in output (not just directories).
includeHiddenbooleanInclude hidden files/directories.
patternstring | nullGlob pattern to filter results (optional).

Response: TreeResponse (200)

curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/vfs/by-name/<name>/tree" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"path":"...","maxDepth":0,"includeFiles":false,"includeHidden":false,"pattern":"..."}'
GET /vfs

Every VFS of the tenant, or of one namespace with { namespace }.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Response: VirtualFileSystem[] (200)

curl -X GET "https://api.maitento.com/vfs" \
-H "Authorization: $MAITENTO_AUTH"
DELETE /vfs/by-id/{id}

Deletes the VFS with this id.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (204)

curl -X DELETE "https://api.maitento.com/vfs/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
GET /vfs/by-id/{id}

The VFS with this id. Throws NotFoundError when there is none.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: VirtualFileSystem (200)

curl -X GET "https://api.maitento.com/vfs/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
POST /vfs/by-id/{id}/batch/edit

Applies edits to several files (optionally all-or-nothing).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: BatchEditRequest

FieldTypeRequiredDescription
editsBatchEditFileRequest[]List of file edits to apply.
atomicbooleanIf true, all edits must succeed or none are applied. If false, each file is edited independently.

Response: BatchEditResponse (200)

curl -X POST "https://api.maitento.com/vfs/by-id/<id>/batch/edit" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"edits":[],"atomic":false}'
POST /vfs/by-id/{id}/batch/read

Reads several files at once.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: BatchReadRequest

FieldTypeRequiredDescription
pathsstring[]Paths to the files to read.
maxLinesPerFileintegerMaximum lines per file (0 = unlimited). Truncates large files.

Response: BatchReadResponse (200)

curl -X POST "https://api.maitento.com/vfs/by-id/<id>/batch/read" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"paths":[],"maxLinesPerFile":0}'
PUT /vfs/by-id/{id}/copy

Copies a file or directory.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring
destinationstring

Response: FileSystemEntry (200)

curl -X PUT "https://api.maitento.com/vfs/by-id/<id>/copy" \
-H "Authorization: $MAITENTO_AUTH"
DELETE /vfs/by-id/{id}/directories

Deletes a directory (with recursive: true, and everything in it).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring
recursiveboolean

Response: no body (204)

curl -X DELETE "https://api.maitento.com/vfs/by-id/<id>/directories" \
-H "Authorization: $MAITENTO_AUTH"
PUT /vfs/by-id/{id}/directories

Creates a directory.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: FileSystemDirectory (200)

curl -X PUT "https://api.maitento.com/vfs/by-id/<id>/directories" \
-H "Authorization: $MAITENTO_AUTH"
GET /vfs/by-id/{id}/directories/contents

Every VFS of the tenant, or of one namespace with { namespace }.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: FileSystemEntry[] (200)

curl -X GET "https://api.maitento.com/vfs/by-id/<id>/directories/contents" \
-H "Authorization: $MAITENTO_AUTH"
GET /vfs/by-id/{id}/directories/exists

Whether a DIRECTORY exists at the path.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: boolean (200)

curl -X GET "https://api.maitento.com/vfs/by-id/<id>/directories/exists" \
-H "Authorization: $MAITENTO_AUTH"
DELETE /vfs/by-id/{id}/files

Deletes the VFS with this id.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: no body (204)

curl -X DELETE "https://api.maitento.com/vfs/by-id/<id>/files" \
-H "Authorization: $MAITENTO_AUTH"
PUT /vfs/by-id/{id}/files/append/bytes

Appends bytes to a file. Never retried.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileByteContentRequest

FieldTypeRequiredDescription
contentbase64yesThe file’s bytes, up to 100 MB. May be empty.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/vfs/by-id/<id>/files/append/bytes" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
PUT /vfs/by-id/{id}/files/append/lines

Appends lines to a file. Never retried.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileLinesContentRequest

FieldTypeRequiredDescription
contentstring[]yesThe file’s lines, up to 100,000. May be empty.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/vfs/by-id/<id>/files/append/lines" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":[]}'
PUT /vfs/by-id/{id}/files/append/text

Appends text to a file (creating it). Never retried.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileTextContentRequest

FieldTypeRequiredDescription
contentstringyesThe file’s text, up to 100 MB. Whitespace is kept exactly as sent.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/vfs/by-id/<id>/files/append/text" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
GET /vfs/by-id/{id}/files/contents/bytes

A file’s bytes.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: binary (200)

curl -X GET "https://api.maitento.com/vfs/by-id/<id>/files/contents/bytes" \
-H "Authorization: $MAITENTO_AUTH"
GET /vfs/by-id/{id}/files/contents/lines

A file’s lines.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: string[] (200)

curl -X GET "https://api.maitento.com/vfs/by-id/<id>/files/contents/lines" \
-H "Authorization: $MAITENTO_AUTH"
GET /vfs/by-id/{id}/files/contents/text

A file’s text, exactly as stored.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: string (200)

curl -X GET "https://api.maitento.com/vfs/by-id/<id>/files/contents/text" \
-H "Authorization: $MAITENTO_AUTH"
POST /vfs/by-id/{id}/files/edit

Applies edit operations to one file.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: EditRequest

FieldTypeRequiredDescription
pathstringPath to the file within the file system.
operationsEditOperation[]List of edit operations to apply, in order.

Response: EditResponse (200)

curl -X POST "https://api.maitento.com/vfs/by-id/<id>/files/edit" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"path":"...","operations":[]}'
GET /vfs/by-id/{id}/files/exists

Whether a FILE exists at the path.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Response: boolean (200)

curl -X GET "https://api.maitento.com/vfs/by-id/<id>/files/exists" \
-H "Authorization: $MAITENTO_AUTH"
PUT /vfs/by-id/{id}/files/write/bytes

Writes (creates or replaces) a binary file.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileByteContentRequest

FieldTypeRequiredDescription
contentbase64yesThe file’s bytes, up to 100 MB. May be empty.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/vfs/by-id/<id>/files/write/bytes" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
PUT /vfs/by-id/{id}/files/write/lines

Writes (creates or replaces) a file from lines.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileLinesContentRequest

FieldTypeRequiredDescription
contentstring[]yesThe file’s lines, up to 100,000. May be empty.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/vfs/by-id/<id>/files/write/lines" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":[]}'
PUT /vfs/by-id/{id}/files/write/text

Writes (creates or replaces) a text file.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring

Request body: FileTextContentRequest

FieldTypeRequiredDescription
contentstringyesThe file’s text, up to 100 MB. Whitespace is kept exactly as sent.

Response: FileSystemFile (200)

curl -X PUT "https://api.maitento.com/vfs/by-id/<id>/files/write/text" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"content":"..."}'
POST /vfs/by-id/{id}/find

The VFS with this id, or null.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: FindRequest

FieldTypeRequiredDescription
pathstringStarting directory path. Defaults to ”/” (root).
patternstring | nullGlob pattern to match files (e.g., ”/*.cs”, “src//*.ts”). Supports *, **, ?, [abc], {a,b} patterns.
grepstring | nullSearch pattern for file contents. If specified, only files containing this pattern are returned.
grepModestringHow to interpret the grep pattern: “literal” (default) or “regex”.
ignoreCasebooleanCase-insensitive search for grep. Default false.
contextLinesintegerNumber of lines before and after each grep match to include as context.
includePreviewbooleanIf true, include a preview of each file’s content (first N lines).
previewLinesintegerNumber of lines to include in preview. Default 30.
maxResultsintegerMaximum number of results to return. Default 100.
maxDepthintegerMaximum recursion depth. Default -1 (unlimited).
typestringFilter by entry type: “file”, “directory”, or “all”. Default “file”.
includeHiddenbooleanInclude hidden files/directories (starting with .). Default false.

Response: FindResponse (200)

curl -X POST "https://api.maitento.com/vfs/by-id/<id>/find" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"path":"...","pattern":"...","grep":"...","grepMode":"...","ignoreCase":false,"contextLines":0,"includePreview":false,"previewLines":0,"maxResults":0,"maxDepth":0,"type":"...","includeHidden":false}'
POST /vfs/by-id/{id}/move

Moves a file or directory.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
pathstring
destinationstring

Response: FileSystemEntry (200)

curl -X POST "https://api.maitento.com/vfs/by-id/<id>/move" \
-H "Authorization: $MAITENTO_AUTH"
POST /vfs/by-id/{id}/tree

The directory tree below a path.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: TreeRequest

FieldTypeRequiredDescription
pathstringStarting path. Defaults to ”/”.
maxDepthintegerMaximum depth to recurse. -1 for unlimited.
includeFilesbooleanInclude files in output (not just directories).
includeHiddenbooleanInclude hidden files/directories.
patternstring | nullGlob pattern to filter results (optional).

Response: TreeResponse (200)

curl -X POST "https://api.maitento.com/vfs/by-id/<id>/tree" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"path":"...","maxDepth":0,"includeFiles":false,"includeHidden":false,"pattern":"..."}'