Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.antryk.com/llms.txt

Use this file to discover all available pages before exploring further.

Retrieve a list of objects (files and folders) from a specific directory in Antryk Storage. This endpoint allows you to fetch all files and subfolders داخل a given path within a bucket. It is commonly used to browse directories, build file explorers, or manage stored content programmatically. By defining the bucket name and directory path directly in the URL, this API follows a clean and RESTful design with no request body required.
curl --request GET \
  --url "https://storage.apis.antryk.com/api/v1/buckets/:yourBucketName/objects/:keyOrFilePath" \
  --header "x-access-key: YOUR_ACCESS_KEY" \
  --header "x-secret-key: YOUR_SECRET_KEY"
For Node.js applications, it is recommended to use the official @antryk/sdk. The SDK simplifies object listing by handling authentication, validation, and API communication internally.
This endpoint does not accept a request body. All required information such as bucket name and directory path must be passed via the URL, while authentication must be provided using headers.
This is the recommended and modern approach for retrieving objects from Antryk Storage:
  • No request body is required.
  • The bucket name and directory path are defined directly in the URL.
  • Authentication is handled via headers:
    • x-access-key
    • x-secret-key
This approach simplifies integration, improves readability, and aligns with RESTful API standards.
⚠️ The older approach (sending bucket, key, accessKey, and secretKey in the request body) may still be supported for backward compatibility, but it is strongly recommended to migrate to this new method.

Request Parameters

yourBucketName
string
required
The name of the storage bucket. This is specified directly in the URL.
keyOrFilePath
string
required
The directory path whose contents you want to retrieve. This can represent a folder or prefix inside the bucket.
x-access-key
string
required
Your Antryk access key used for authentication. You can obtain this from the Antryk Console.
x-secret-key
string
required
Your Antryk secret key used for authentication. Keep this secure and never expose it publicly.

Examples

yourBucketName
string
required
Example: dsds
keyOrFilePath
string
required
Example: tutorial/docs
x-access-key
string
required
Example: YOUR_ACCESS_KEY
x-secret-key
string
required
Example: YOUR_SECRET_KEY

Additional Notes

  • This endpoint returns both files and folders within the specified path.
  • Use / or an empty path (depending on implementation) to list root-level objects.
  • Useful for building file managers, dashboards, or content browsers.
  • Ensure the directory path is correctly structured to avoid unexpected results.
  • When using the SDK, inputs are validated before making requests, improving reliability and developer experience.

Response

Returns a JSON object containing the list of objects within the specified directory.
{
  "success": true,
  "data": [
    {
      "key": "tutorial/docs/file1.pdf",
      "size": 204800,
      "contentType": "application/pdf"
    },
    {
      "key": "tutorial/docs/image.png",
      "size": 102400,
      "contentType": "image/png"
    }
  ]
}