Skip to content
Hoody.com

These endpoints connect the Files service to remote storage backends (Git, S3, SSH/SFTP, FTP) and provide helpers for managing file service authentication. All routes share the same container-scoped host, so substitute the placeholders in every request:

https://{projectId}-{containerId}-files-1.{server}.containers.hoody.com

  • {projectId} — 24-character hexadecimal project identifier.
  • {containerId} — 24-character hexadecimal container identifier.
  • {server} — cluster node serving the container, for example node-us.

GET /{path}?type=git

Access a file from a GitHub, GitLab, Bitbucket, or other Git repository.

NameInTypeRequiredDescription
pathpathstringYesPath of the file inside the repository to fetch
typequerystringYesMust be git
urlquerystringYesFull GitHub, GitLab, Bitbucket, or repository URL
refquerystringNoBranch, tag, or commit; defaults to HEAD or the value parsed from the URL
passquerystringNoPersonal Access Token (base64 encoded) for private repositories
# Hoody Backend Connections
Connect remote storage backends to the Hoody Files service.

The response body is the raw file content streamed back from the Git server.

Terminal window
curl -G "https://{projectId}-{containerId}-files-1.node-us.containers.hoody.com/README.md" \
--data-urlencode "type=git" \
--data-urlencode "url=https://github.com/hoody/hoody-docs.git" \
--data-urlencode "ref=main"

GET /{path}?type=s3

Access an object stored in AWS S3 or any S3-compatible storage such as MinIO or DigitalOcean Spaces.

NameInTypeRequiredDescription
pathpathstringYesObject key to access within the bucket
typequerystringYesMust be s3
serverquerystringYesS3-compatible host to connect to
s3_bucketquerystringYesS3 bucket name
s3_regionquerystringYesS3 region for the bucket
userquerystringNoAWS Access Key ID
passquerystringNoAWS Secret Key (base64 encoded)
s3_endpointquerystringNoCustom S3 endpoint for MinIO and similar services

Object content is streamed back when path points to a single object; a directory listing is returned when path points to a prefix.

[
{
"name": "manifest.json",
"type": "file",
"size": 1842,
"mime": "application/json"
},
{
"name": "assets",
"type": "dir",
"size": 0,
"mime": "directory"
}
]
Terminal window
curl -G "https://{projectId}-{containerId}-files-1.node-us.containers.hoody.com/datasets/2024/q1/" \
--data-urlencode "type=s3" \
--data-urlencode "server=s3.amazonaws.com" \
--data-urlencode "s3_bucket=acme-data" \
--data-urlencode "s3_region=us-east-1"

GET /{path}?type=ssh

Connect to a remote SSH server and access files over SFTP.

NameInTypeRequiredDescription
pathpathstringYesAbsolute path of the file or directory on the remote SSH server
typequerystringYesMust be ssh
serverquerystringYesServer hostname and port, for example remote.example.com:22
userquerystringYesSSH username
passquerystringNoPassword (base64 encoded)
keyquerystringNoPrivate key PEM (base64 encoded)
passphrasequerystringNoKey passphrase (base64 encoded)

The response body is the raw file content when path points to a file, or a directory listing when path points to a folder.

#!/usr/bin/env bash
set -euo pipefail
exec /usr/local/bin/hoody-worker "$@"
Terminal window
curl -G "https://{projectId}-{containerId}-files-1.node-us.containers.hoody.com/home/alice/scripts/run.sh" \
--data-urlencode "type=ssh" \
--data-urlencode "server=remote.example.com:22" \
--data-urlencode "user=alice" \
--data-urlencode "key=$(base64 -w0 ~/.ssh/id_ed25519)"

PUT /{path}?type=ssh

Upload a file to a remote SSH server over SFTP.

NameInTypeRequiredDescription
pathpathstringYesAbsolute destination path on the remote SSH server
serverquerystringYesServer hostname and port, for example remote.example.com:22
userquerystringYesSSH username
passquerystringNoPassword (base64 encoded)
keyquerystringNoPrivate key PEM (base64 encoded)
passphrasequerystringNoKey passphrase (base64 encoded)

The request body is required and carries the raw file content (application/octet-stream). No structured fields are required.

{
"description": "File uploaded"
}
Terminal window
curl -X PUT "https://{projectId}-{containerId}-files-1.node-us.containers.hoody.com/home/alice/incoming/backup.tar.gz?server=remote.example.com:22&user=alice" \
--data-urlencode "key=$(base64 -w0 ~/.ssh/id_ed25519)" \
--data-binary @./backup.tar.gz \
-H "Content-Type: application/octet-stream"

GET /{path}?type=ftp

Connect to an FTP server and access a file or directory. Supports FTPS for encrypted transport and passive mode for compatibility with most NAT and firewall topologies.

NameInTypeRequiredDescription
pathpathstringYesPath of the file or directory on the FTP server
typequerystringYesMust be ftp
serverquerystringYesFTP server hostname (port is implied: 21 for FTP, 990 for FTPS)
userquerystringNoFTP username; defaults to anonymous
passquerystringNoFTP password
ftp_securequerybooleanNoUse FTPS (FTP over TLS); defaults to false
ftp_passivequerybooleanNoUse passive mode; defaults to true
[
{
"name": "release-1.4.2.tar.gz",
"type": "file",
"size": 15728640,
"mime": "application/gzip"
},
{
"name": "release-1.4.1.tar.gz",
"type": "file",
"size": 15682048,
"mime": "application/gzip"
}
]
Terminal window
curl -G "https://{projectId}-{containerId}-files-1.node-us.containers.hoody.com/pub/hoody/releases/" \
--data-urlencode "type=ftp" \
--data-urlencode "server=ftp.example.com" \
--data-urlencode "user=anonymous" \
--data-urlencode "pass=anon@example.com" \
--data-urlencode "ftp_secure=true" \
--data-urlencode "ftp_passive=true"

CHECKAUTH /{path}

Verify the authentication status of the current request. The response body is the authenticated username or an empty string when the request is not authenticated.

NameInTypeRequiredDescription
pathpathstringYesAny valid path under the container’s files root

Response body is text/plain. It contains the authenticated username, or an empty string when the request is unauthenticated.

alice
Terminal window
curl -X CHECKAUTH "https://{projectId}-{containerId}-files-1.node-us.containers.hoody.com/"

LOGOUT /{path}

Invalidate the current authentication and force the client to clear cached credentials. The response is a 401 Unauthorized carrying a WWW-Authenticate header so that browsers prompt for credentials on the next request.

NameInTypeRequiredDescription
pathpathstringYesAny valid path under the container’s files root
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm="hoody"

The response body is empty. Clients should discard cached credentials and prompt the user to re-enter them.

Terminal window
curl -X LOGOUT "https://{projectId}-{containerId}-files-1.node-us.containers.hoody.com/" -i