Skip to main content
POST
/
{namespace}
/
{repo_name}
/
workspaces
/
{workspace_id}
/
files
/
batch
/
{directory}
Stage files to workspace
curl --request POST \
  --url https://hub.oxen.ai/{namespace}/{repo_name}/workspaces/{workspace_id}/files/batch/{directory} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "path": "images/train/dog.jpg"
  }
]
'
{
  "status": "<string>",
  "status_message": "<string>",
  "oxen_version": "<string>",
  "err_files": [
    {
      "error": "<string>",
      "hash": "<string>",
      "path": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

namespace
string
required

The namespace of the repository

repo_name
string
required

The name of the repository

workspace_id
string
required

The UUID of the workspace

directory
string
required

The directory to stage the files into

Body

application/json

List of files and their pre-calculated hashes (must exist in version store).

hash
string
required
path
string
required

Response

Files staged successfully

status
string
required
status_message
string
required
oxen_version
string | null
err_files
object[]