curl --request POST \
--url https://api.osaconnection.com/v1/esx-exports/{id}/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.osaconnection.com/v1/esx-exports/{id}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.osaconnection.com/v1/esx-exports/{id}/download', 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.osaconnection.com/v1/esx-exports/{id}/download",
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.osaconnection.com/v1/esx-exports/{id}/download"
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.osaconnection.com/v1/esx-exports/{id}/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.osaconnection.com/v1/esx-exports/{id}/download")
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{
"download_url": "https://files.example.com/esx/3f0c8a6e-5b1d-4c0e-9a77-2f6d1e4b8c90.esx?expires=1796143382&signature=9f2c7a1e",
"expires_at": "2026-12-01T16:43:02Z"
}Ask for the ESX file
Answers with a link to the export’s ESX file and when the link expires. Fetch the file from
download_url within one hour; after that, call this endpoint again for a fresh link. OSA
does not keep the file: the link is to the export provider’s storage. Send no request body.
The link is a bearer link. Fetch it with a plain GET and no Authorization header;
never send your OSA key to it. Anyone holding the link can download the file until it
expires, so do not log or share it.
What counts as a use. On a live export, the first successful call is one use of ESX
exports, charged as your plan says, whether or not the export has warnings, so look at
clean and major_warnings first. first_downloaded_at records when it was. Later calls,
including after a corrected version, return a fresh link and are not another use. Test
exports are never charged. This is a POST, not a GET, because the first call is charged.
When you can ask. The export must be ready. One that is processing or failed
returns 409 export_not_ready, and nothing is charged.
If the export provider can’t be reached, the call fails with
503 export_provider_unavailable and nothing is charged. Wait for the number of seconds in
Retry-After, then ask again.
An export of another partner, or of the other environment (test or live), returns
404 not_found.
curl --request POST \
--url https://api.osaconnection.com/v1/esx-exports/{id}/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.osaconnection.com/v1/esx-exports/{id}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.osaconnection.com/v1/esx-exports/{id}/download', 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.osaconnection.com/v1/esx-exports/{id}/download",
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.osaconnection.com/v1/esx-exports/{id}/download"
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.osaconnection.com/v1/esx-exports/{id}/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.osaconnection.com/v1/esx-exports/{id}/download")
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{
"download_url": "https://files.example.com/esx/3f0c8a6e-5b1d-4c0e-9a77-2f6d1e4b8c90.esx?expires=1796143382&signature=9f2c7a1e",
"expires_at": "2026-12-01T16:43:02Z"
}Authorizations
Send your API key as a bearer token: Authorization: Bearer osa_live_….
Keys are opaque; each belongs to exactly one partner. Keys starting with osa_test_
reach only test claims and test accounts. The scopes listed on each operation are the
permissions the key needs. A key's permissions are set when it is issued and can be
changed by OSA on request, never beyond what your plan and add-ons include.
GET /v1/me always shows the current set.
Response
A link to the ESX file, valid for one hour.
A link to the ESX file.