Resolve workbench input URLs
curl --request POST \
--url https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/workbench/references/resolve \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"<string>"
]
}
'import requests
url = "https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/workbench/references/resolve"
payload = { "urls": ["<string>"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({urls: ['<string>']})
};
fetch('https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/workbench/references/resolve', 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}/workbench/references/resolve",
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([
'urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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}/workbench/references/resolve"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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}/workbench/references/resolve")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/workbench/references/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"references": [
{
"resolved_url": "<string>",
"status": "live",
"url": "<string>"
}
],
"status": "success"
}{}{}API Reference
Resolve workbench input URLs
Turns input URLs a client saved earlier into URLs that load now. A branch or workspace URL into oxen/context/ or oxen/outputs/ that the v3 workbench migration left dead is re-pointed at a commit from before the migration that holds the file. Each URL is checked against the caller’s read access on its own repo; a URL into a repo the caller cannot read comes back unknown without being looked up.
POST
/
api
/
repos
/
{namespace}
/
{repo_name}
/
workbench
/
references
/
resolve
Resolve workbench input URLs
curl --request POST \
--url https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/workbench/references/resolve \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"<string>"
]
}
'import requests
url = "https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/workbench/references/resolve"
payload = { "urls": ["<string>"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({urls: ['<string>']})
};
fetch('https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/workbench/references/resolve', 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}/workbench/references/resolve",
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([
'urls' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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}/workbench/references/resolve"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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}/workbench/references/resolve")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/workbench/references/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"references": [
{
"resolved_url": "<string>",
"status": "live",
"url": "<string>"
}
],
"status": "success"
}{}{}Body
application/json
URLs to resolve
Input URLs to resolve, such as those a saved form draft holds.
Maximum array length:
100