Skip to main content
POST
/
api
/
repos
/
{namespace}
/
{repo_name}
/
commits
/
mark_commits_as_synced
Mark commits as synced
curl --request POST \
  --url https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/mark_commits_as_synced \
  --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/mark_commits_as_synced"

payload = { "hashes": ["abc1234567890def1234567890fedcba", "84c76a5b2e9a2637f9091991475c404d"] }
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({
hashes: ['abc1234567890def1234567890fedcba', '84c76a5b2e9a2637f9091991475c404d']
})
};

fetch('https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/mark_commits_as_synced', 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/mark_commits_as_synced",
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([
'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/mark_commits_as_synced"

payload := strings.NewReader("{\n \"hashes\": [\n \"abc1234567890def1234567890fedcba\",\n \"84c76a5b2e9a2637f9091991475c404d\"\n ]\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://hub.oxen.ai/api/repos/{namespace}/{repo_name}/commits/mark_commits_as_synced")
.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/mark_commits_as_synced")

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 \"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

Authorization
string
header
required

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

Path Parameters

namespace
string
required

Namespace of the repository

repo_name
string
required

Name of the repository

Body

application/json

DEPRECATED - Deprecated no-op response echoing the submitted hashes

hashes
string[]
required

Response

Deprecated no-op response echoing the submitted hashes

status
string
required
status_message
string
required
hashes
string[]
required
oxen_version
string | null