Files

Upload files

Upload files via multipart form and commit them. Use files[] for directory uploads, or file for a single full-path upload. For backward compatibility, file also uploads into the target directory when {resource} already resolves to a directory.

put/api/repos/{namespace}/{repo_name}/file/{resource}

Request

Path parameters

namespacestring required

Namespace of the repository

repo_namestring required

Name of the repository

resourcestring required

Path of the directory to add files in (including branch)

Request body multipart/form-data

emailstring nullable
filestring binary nullable

Deprecated: use files[] instead.

filesstring[] required
messagestring nullable
namestring nullable

Example request

{
  "email": "bessie@oxen.ai",
  "files[]": [
    "<binary data>"
  ],
  "message": "Adding a picture of a cow",
  "name": "bessie"
}

Response

Files committed successfully

oxen_versionstring nullable
statusstring required
status_messagestring required

Example response

{
  "commit": {
    "author": "ox",
    "email": "ox@example.com",
    "id": "a1b2c3d4e5f67890abcdef1234567890",
    "message": "Refactor data loading pipeline.",
    "parent_ids": [
      "f1e2d3c4b5a67890fedcba9876543210"
    ],
    "timestamp": "2025-01-01T10:00:00Z"
  },
  "status": "success",
  "status_message": "resource_found"
}

Changes

No recorded changes to this operation across all 1 revision of this API.