curl --request POST \
--url https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync', 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/{folder}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/{folder}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"source_drive_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"size_bytes": 123,
"file_count": 123,
"file_tree": [
{}
],
"file_tree_status": "<string>",
"content_epoch": 123,
"source": {
"status": "<string>",
"region": "<string>",
"read_only": true,
"github_repositories": [
{
"folder": "<string>",
"full_name": "<string>",
"branch": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sync": {
"state": "<string>",
"step": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"commit_sha": "<string>",
"error": "<string>"
}
}
]
},
"file_capabilities": {
"state": "<string>",
"can_upload": true,
"message": "<string>"
},
"active_mount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"drive_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reservation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"virtual_machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mount_path": "<string>",
"access": "<string>",
"state": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"active_mounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"drive_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reservation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"virtual_machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mount_path": "<string>",
"access": "<string>",
"state": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "storage_github_sync_in_progress",
"message": "A repository on this volume is syncing. Wait for it to finish, then try again."
}
}{
"code": "<string>",
"detail": "<string>"
}Sync a repository
Queues a pull of the latest commit of the folder’s branch into the same folder and returns the volume. A sync can replace or delete repository files while the volume is mounted. Poll Get a volume until the folder’s sync.state is ready or failed.
curl --request POST \
--url https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync', 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/{folder}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/{folder}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/drives/{drive_id}/github/{folder}/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"source_drive_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"size_bytes": 123,
"file_count": 123,
"file_tree": [
{}
],
"file_tree_status": "<string>",
"content_epoch": 123,
"source": {
"status": "<string>",
"region": "<string>",
"read_only": true,
"github_repositories": [
{
"folder": "<string>",
"full_name": "<string>",
"branch": "<string>",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sync": {
"state": "<string>",
"step": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"commit_sha": "<string>",
"error": "<string>"
}
}
]
},
"file_capabilities": {
"state": "<string>",
"can_upload": true,
"message": "<string>"
},
"active_mount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"drive_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reservation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"virtual_machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mount_path": "<string>",
"access": "<string>",
"state": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"active_mounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"drive_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reservation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"virtual_machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mount_path": "<string>",
"access": "<string>",
"state": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "storage_github_sync_in_progress",
"message": "A repository on this volume is syncing. Wait for it to finish, then try again."
}
}{
"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.
The repository folder on the volume.
Response
The sync is queued.
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?