Volume Transfer
curl --request POST \
--url https://api.primeintellect.ai/api/v1/training/volumes/{name}/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "",
"entries": [
"<string>"
],
"leaseId": "<string>",
"teamId": "<string>"
}
'import requests
url = "https://api.primeintellect.ai/api/v1/training/volumes/{name}/transfer"
payload = {
"path": "",
"entries": ["<string>"],
"leaseId": "<string>",
"teamId": "<string>"
}
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({path: '', entries: ['<string>'], leaseId: '<string>', teamId: '<string>'})
};
fetch('https://api.primeintellect.ai/api/v1/training/volumes/{name}/transfer', 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.primeintellect.ai/api/v1/training/volumes/{name}/transfer",
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([
'path' => '',
'entries' => [
'<string>'
],
'leaseId' => '<string>',
'teamId' => '<string>'
]),
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.primeintellect.ai/api/v1/training/volumes/{name}/transfer"
payload := strings.NewReader("{\n \"path\": \"\",\n \"entries\": [\n \"<string>\"\n ],\n \"leaseId\": \"<string>\",\n \"teamId\": \"<string>\"\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.primeintellect.ai/api/v1/training/volumes/{name}/transfer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"path\": \"\",\n \"entries\": [\n \"<string>\"\n ],\n \"leaseId\": \"<string>\",\n \"teamId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/v1/training/volumes/{name}/transfer")
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 \"path\": \"\",\n \"entries\": [\n \"<string>\"\n ],\n \"leaseId\": \"<string>\",\n \"teamId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"via": "session",
"session": {
"id": "<string>",
"volumeName": "<string>",
"status": "<string>",
"readOnly": true,
"createdAt": "2023-11-07T05:31:56Z",
"sshConnection": "<string>",
"gateway": {
"host": "<string>",
"port": 123,
"certSha256": "<string>"
},
"hostPublicKey": "<string>",
"errorMessage": "<string>",
"phase": "<string>",
"progress": "<string>"
},
"endpoint": "<string>",
"bucket": "<string>",
"prefix": "<string>",
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"sessionToken": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"leaseId": "<string>"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}training
Volume Transfer
Where prime volumes get/put should transfer (ENG-6585). A put
needs rft:write, like every other volume write.
POST
/
api
/
v1
/
training
/
volumes
/
{name}
/
transfer
Volume Transfer
curl --request POST \
--url https://api.primeintellect.ai/api/v1/training/volumes/{name}/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "",
"entries": [
"<string>"
],
"leaseId": "<string>",
"teamId": "<string>"
}
'import requests
url = "https://api.primeintellect.ai/api/v1/training/volumes/{name}/transfer"
payload = {
"path": "",
"entries": ["<string>"],
"leaseId": "<string>",
"teamId": "<string>"
}
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({path: '', entries: ['<string>'], leaseId: '<string>', teamId: '<string>'})
};
fetch('https://api.primeintellect.ai/api/v1/training/volumes/{name}/transfer', 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.primeintellect.ai/api/v1/training/volumes/{name}/transfer",
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([
'path' => '',
'entries' => [
'<string>'
],
'leaseId' => '<string>',
'teamId' => '<string>'
]),
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.primeintellect.ai/api/v1/training/volumes/{name}/transfer"
payload := strings.NewReader("{\n \"path\": \"\",\n \"entries\": [\n \"<string>\"\n ],\n \"leaseId\": \"<string>\",\n \"teamId\": \"<string>\"\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.primeintellect.ai/api/v1/training/volumes/{name}/transfer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"path\": \"\",\n \"entries\": [\n \"<string>\"\n ],\n \"leaseId\": \"<string>\",\n \"teamId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/v1/training/volumes/{name}/transfer")
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 \"path\": \"\",\n \"entries\": [\n \"<string>\"\n ],\n \"leaseId\": \"<string>\",\n \"teamId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"via": "session",
"session": {
"id": "<string>",
"volumeName": "<string>",
"status": "<string>",
"readOnly": true,
"createdAt": "2023-11-07T05:31:56Z",
"sshConnection": "<string>",
"gateway": {
"host": "<string>",
"port": 123,
"certSha256": "<string>"
},
"hostPublicKey": "<string>",
"errorMessage": "<string>",
"phase": "<string>",
"progress": "<string>"
},
"endpoint": "<string>",
"bucket": "<string>",
"prefix": "<string>",
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"sessionToken": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"leaseId": "<string>"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Successful Response
via: session: transfer through session (the caller's live
read-write session). via: r2: transfer directly with these
prefix-scoped credentials (read-only for get, read-write for put); a
put's carry leaseId, to send on refresh and to release when done.
Available options:
session, r2 Show child attributes
Show child attributes
Was this page helpful?