curl --request POST \
--url https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
"repository_id": 123456789,
"full_name": "example-org/training",
"branch": "main",
"folder": "training"
}
'import requests
url = "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github"
payload = {
"connection_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
"repository_id": 123456789,
"full_name": "example-org/training",
"branch": "main",
"folder": "training"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection_id: 'dddddddd-dddd-4ddd-8ddd-dddddddddddd',
repository_id: 123456789,
full_name: 'example-org/training',
branch: 'main',
folder: 'training'
})
};
fetch('https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'connection_id' => 'dddddddd-dddd-4ddd-8ddd-dddddddddddd',
'repository_id' => 123456789,
'full_name' => 'example-org/training',
'branch' => 'main',
'folder' => 'training'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github"
payload := strings.NewReader("{\n \"connection_id\": \"dddddddd-dddd-4ddd-8ddd-dddddddddddd\",\n \"repository_id\": 123456789,\n \"full_name\": \"example-org/training\",\n \"branch\": \"main\",\n \"folder\": \"training\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"dddddddd-dddd-4ddd-8ddd-dddddddddddd\",\n \"repository_id\": 123456789,\n \"full_name\": \"example-org/training\",\n \"branch\": \"main\",\n \"folder\": \"training\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"dddddddd-dddd-4ddd-8ddd-dddddddddddd\",\n \"repository_id\": 123456789,\n \"full_name\": \"example-org/training\",\n \"branch\": \"main\",\n \"folder\": \"training\"\n}"
response = http.request(request)
puts response.read_body{
"id": "77777777-7777-4777-8777-777777777777",
"source_drive_id": null,
"name": "training-data",
"status": "active",
"size_bytes": 0,
"file_count": 0,
"file_tree_status": "ready",
"content_epoch": 0,
"source": {
"status": "ready",
"region": "us-central1",
"read_only": false,
"github_repositories": [
{
"folder": "training",
"full_name": "example-org/training",
"branch": "main",
"connection_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
"sync": {
"state": "queued",
"requested_at": "2026-10-14T12:00:00Z"
}
}
]
},
"file_capabilities": {
"state": "ready",
"can_upload": true,
"message": null
},
"active_mount": null,
"active_mounts": [],
"created_at": "2026-10-01T12:00:00Z",
"updated_at": "2026-10-14T12:00:00Z"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "storage_github_connection_not_found",
"message": "Ornn has no GitHub account linked for this. Connect GitHub in Account settings, then try again."
}
}{
"detail": {
"code": "storage_github_folder_taken",
"message": "This volume already has a folder with that name. Choose another name."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}Pull a repository into a volume
Queues a pull of one branch into a new folder on the volume and returns the volume. The pull runs in the background. Poll Get a volume and read source.github_repositories for the folder until sync.state is ready or failed. The folder must not already contain files. A volume runs one pull or sync at a time.
curl --request POST \
--url https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
"repository_id": 123456789,
"full_name": "example-org/training",
"branch": "main",
"folder": "training"
}
'import requests
url = "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github"
payload = {
"connection_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
"repository_id": 123456789,
"full_name": "example-org/training",
"branch": "main",
"folder": "training"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection_id: 'dddddddd-dddd-4ddd-8ddd-dddddddddddd',
repository_id: 123456789,
full_name: 'example-org/training',
branch: 'main',
folder: 'training'
})
};
fetch('https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'connection_id' => 'dddddddd-dddd-4ddd-8ddd-dddddddddddd',
'repository_id' => 123456789,
'full_name' => 'example-org/training',
'branch' => 'main',
'folder' => 'training'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github"
payload := strings.NewReader("{\n \"connection_id\": \"dddddddd-dddd-4ddd-8ddd-dddddddddddd\",\n \"repository_id\": 123456789,\n \"full_name\": \"example-org/training\",\n \"branch\": \"main\",\n \"folder\": \"training\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"dddddddd-dddd-4ddd-8ddd-dddddddddddd\",\n \"repository_id\": 123456789,\n \"full_name\": \"example-org/training\",\n \"branch\": \"main\",\n \"folder\": \"training\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"dddddddd-dddd-4ddd-8ddd-dddddddddddd\",\n \"repository_id\": 123456789,\n \"full_name\": \"example-org/training\",\n \"branch\": \"main\",\n \"folder\": \"training\"\n}"
response = http.request(request)
puts response.read_body{
"id": "77777777-7777-4777-8777-777777777777",
"source_drive_id": null,
"name": "training-data",
"status": "active",
"size_bytes": 0,
"file_count": 0,
"file_tree_status": "ready",
"content_epoch": 0,
"source": {
"status": "ready",
"region": "us-central1",
"read_only": false,
"github_repositories": [
{
"folder": "training",
"full_name": "example-org/training",
"branch": "main",
"connection_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
"sync": {
"state": "queued",
"requested_at": "2026-10-14T12:00:00Z"
}
}
]
},
"file_capabilities": {
"state": "ready",
"can_upload": true,
"message": null
},
"active_mount": null,
"active_mounts": [],
"created_at": "2026-10-01T12:00:00Z",
"updated_at": "2026-10-14T12:00:00Z"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "storage_github_connection_not_found",
"message": "Ornn has no GitHub account linked for this. Connect GitHub in Account settings, then try again."
}
}{
"detail": {
"code": "storage_github_folder_taken",
"message": "This volume already has a folder with that name. Choose another name."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
Volume ID.
Body
Response
The pull is queued. The volume is returned with the new repository entry.
A volume. Responses can include additional fields; ignore fields you do not recognize.
active for a usable volume.
The volume this one was duplicated from.
Measured size. It can lag writes from mounted machines.
A preview of recently updated files. Use List volume files for a complete listing.
Increases whenever the volume's files change.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The volume's mount on one VM or Bare Metal node.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?