curl --request GET \
--url https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/downloadimport requests
url = "https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/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.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>""<string>"{
"success": true,
"error": "<string>",
"code": "<string>"
}{
"success": true,
"error": "<string>",
"code": "<string>"
}{
"success": true,
"error": "<string>",
"code": "<string>"
}"<string>"{
"success": true,
"error": "<string>",
"code": "<string>"
}{
"success": true,
"error": "<string>",
"code": "<string>"
}{
"success": true,
"error": "<string>",
"code": "<string>",
"status": "<string>"
}Download a finished export
Downloads the archive produced by an export. The link is the one the export request returned, signature and expiry included, so it needs no token of its own. Request it verbatim rather than rebuilding it.
The export is still being prepared when the link is first handed to
you, so the first requests answer 503 and carry a short JSON reply
instead of an archive. Always pass --fail and --retry. Without
them, curl saves that JSON reply into your output file and reports
success, and you are left with a small text file named like a backup:
curl --fail --retry 30 -o backup.sql.gz "$URL"
--fail stops the reply body being saved when the answer is not an
archive, and --retry makes curl wait for the interval in the
Retry-After header and ask again until the archive is ready. Compare
the file you saved against the X-Export-SHA256 header before you rely
on it.
curl --request GET \
--url https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/downloadimport requests
url = "https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/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.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pivocloud.com/api/v1/dbs/{id}/exports/{eid}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>""<string>"{
"success": true,
"error": "<string>",
"code": "<string>"
}{
"success": true,
"error": "<string>",
"code": "<string>"
}{
"success": true,
"error": "<string>",
"code": "<string>"
}"<string>"{
"success": true,
"error": "<string>",
"code": "<string>"
}{
"success": true,
"error": "<string>",
"code": "<string>"
}{
"success": true,
"error": "<string>",
"code": "<string>",
"status": "<string>"
}Path Parameters
The identifier of the database the export belongs to.
The identifier of the export to download.
Query Parameters
The moment the link stops working, as a Unix timestamp in seconds. It is part of what the signature covers. Use the value the export request returned.
The signature that authorises this download. Use the value the export request returned.
Response
The export archive, gzip compressed.
The response is of type file.