List missing commits
curl --request GET \
--url https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hashes": [
"abc1234567890def1234567890fedcba",
"84c76a5b2e9a2637f9091991475c404d"
]
}
'import requests
url = "https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing"
payload = { "hashes": ["abc1234567890def1234567890fedcba", "84c76a5b2e9a2637f9091991475c404d"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
hashes: ['abc1234567890def1234567890fedcba', '84c76a5b2e9a2637f9091991475c404d']
})
};
fetch('https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing', 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://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'hashes' => [
'abc1234567890def1234567890fedcba',
'84c76a5b2e9a2637f9091991475c404d'
]
]),
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://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing"
payload := strings.NewReader("{\n \"hashes\": [\n \"abc1234567890def1234567890fedcba\",\n \"84c76a5b2e9a2637f9091991475c404d\"\n ]\n}")
req, _ := http.NewRequest("GET", 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.get("https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hashes\": [\n \"abc1234567890def1234567890fedcba\",\n \"84c76a5b2e9a2637f9091991475c404d\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hashes\": [\n \"abc1234567890def1234567890fedcba\",\n \"84c76a5b2e9a2637f9091991475c404d\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"status_message": "<string>",
"hashes": [
"<string>"
],
"oxen_version": "<string>"
}Commits
List missing commits
From a list of commit hashes, list the ones not present on the server
GET
/
api
/
repos
/
{namespace}
/
{repo_name}
/
commits
/
missing
List missing commits
curl --request GET \
--url https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hashes": [
"abc1234567890def1234567890fedcba",
"84c76a5b2e9a2637f9091991475c404d"
]
}
'import requests
url = "https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing"
payload = { "hashes": ["abc1234567890def1234567890fedcba", "84c76a5b2e9a2637f9091991475c404d"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
hashes: ['abc1234567890def1234567890fedcba', '84c76a5b2e9a2637f9091991475c404d']
})
};
fetch('https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing', 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://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'hashes' => [
'abc1234567890def1234567890fedcba',
'84c76a5b2e9a2637f9091991475c404d'
]
]),
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://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing"
payload := strings.NewReader("{\n \"hashes\": [\n \"abc1234567890def1234567890fedcba\",\n \"84c76a5b2e9a2637f9091991475c404d\"\n ]\n}")
req, _ := http.NewRequest("GET", 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.get("https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hashes\": [\n \"abc1234567890def1234567890fedcba\",\n \"84c76a5b2e9a2637f9091991475c404d\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/missing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"hashes\": [\n \"abc1234567890def1234567890fedcba\",\n \"84c76a5b2e9a2637f9091991475c404d\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"status_message": "<string>",
"hashes": [
"<string>"
],
"oxen_version": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Namespace of the repository
Name of the repository
Body
application/json
List of commit hashes present on the client.
⌘I