Validate a destination again
curl --request POST \
--url https://api.brightdata.com/webarchive/destinations/{id}/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.brightdata.com/webarchive/destinations/{id}/validate"
payload = {}
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({})
};
fetch('https://api.brightdata.com/webarchive/destinations/{id}/validate', 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.brightdata.com/webarchive/destinations/{id}/validate",
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([
]),
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.brightdata.com/webarchive/destinations/{id}/validate"
payload := strings.NewReader("{}")
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.brightdata.com/webarchive/destinations/{id}/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/webarchive/destinations/{id}/validate")
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 = "{}"
response = http.request(request)
puts response.read_body{
"id": "dst_0123456789abcdef0123456789abcdef",
"customer_id": "<string>",
"name": "<string>",
"target": {
"provider": "s3",
"auth_mode": "<string>",
"bucket": "<string>",
"prefix": "<string>",
"account": "<string>",
"namespace": "<string>",
"region": "<string>",
"role_arn": "<string>",
"region_hint": "<string>"
},
"validation": {
"status": "valid",
"error_code": "<string>",
"stage": "<string>",
"checks": {},
"probe_key": "<string>",
"probe_deleted": true,
"location": {
"provider": "<string>",
"regions": [
"<string>"
],
"type": "<string>",
"source": "<string>",
"checked_at": "2023-11-07T05:31:56Z"
},
"checked_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
},
"firehose_validation": {
"status": "valid",
"error_code": "<string>",
"stage": "<string>",
"checks": {},
"probe_key": "<string>",
"probe_deleted": true,
"location": {
"provider": "<string>",
"regions": [
"<string>"
],
"type": "<string>",
"source": "<string>",
"checked_at": "2023-11-07T05:31:56Z"
},
"checked_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
},
"target_revision": 123,
"auth_revision": 123,
"next_validation_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error_code": "invalid_destination"
}{
"error_code": "invalid_destination"
}{
"error_code": "invalid_destination"
}{
"error_code": "invalid_destination"
}Destinations
Validate a Web Archive destination
Run the Web Archive destination test upload again. POST /webarchive/destinations//validate is allowed 5 minutes after a valid result, 1 minute otherwise.
POST
/
webarchive
/
destinations
/
{id}
/
validate
Validate a destination again
curl --request POST \
--url https://api.brightdata.com/webarchive/destinations/{id}/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.brightdata.com/webarchive/destinations/{id}/validate"
payload = {}
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({})
};
fetch('https://api.brightdata.com/webarchive/destinations/{id}/validate', 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.brightdata.com/webarchive/destinations/{id}/validate",
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([
]),
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.brightdata.com/webarchive/destinations/{id}/validate"
payload := strings.NewReader("{}")
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.brightdata.com/webarchive/destinations/{id}/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brightdata.com/webarchive/destinations/{id}/validate")
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 = "{}"
response = http.request(request)
puts response.read_body{
"id": "dst_0123456789abcdef0123456789abcdef",
"customer_id": "<string>",
"name": "<string>",
"target": {
"provider": "s3",
"auth_mode": "<string>",
"bucket": "<string>",
"prefix": "<string>",
"account": "<string>",
"namespace": "<string>",
"region": "<string>",
"role_arn": "<string>",
"region_hint": "<string>"
},
"validation": {
"status": "valid",
"error_code": "<string>",
"stage": "<string>",
"checks": {},
"probe_key": "<string>",
"probe_deleted": true,
"location": {
"provider": "<string>",
"regions": [
"<string>"
],
"type": "<string>",
"source": "<string>",
"checked_at": "2023-11-07T05:31:56Z"
},
"checked_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
},
"firehose_validation": {
"status": "valid",
"error_code": "<string>",
"stage": "<string>",
"checks": {},
"probe_key": "<string>",
"probe_deleted": true,
"location": {
"provider": "<string>",
"regions": [
"<string>"
],
"type": "<string>",
"source": "<string>",
"checked_at": "2023-11-07T05:31:56Z"
},
"checked_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
},
"target_revision": 123,
"auth_revision": 123,
"next_validation_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error_code": "invalid_destination"
}{
"error_code": "invalid_destination"
}{
"error_code": "invalid_destination"
}{
"error_code": "invalid_destination"
}POST /webarchive/destinations/{id}/validate runs the test upload to the bucket again and stores the result in validation. Send the body {}.
A
200 response doesn’t mean success. Check validation.status: valid means Bright Data can write to the bucket.The last validation, including the one on create, sets when the next one is allowed: 5 minutes after a
valid result, 1 minute after any other result. A validation before then, or while one is running, returns 429 destination_validation_cooldown.valid result shows as expired after 24 hours and the destination keeps working. Validate is limited to 10 requests per minute and 60 per hour.
The test uploads an object under <prefix>/.brd-destination-probe/ (5 MiB + 1 byte as a multipart upload on Amazon S3 and OCI, 1 KiB on GCS, Azure and Alibaba OSS), lists and reads it back and deletes it when the credentials allow it. validation.probe_key shows its path and validation.probe_deleted shows if it was deleted.Authorizations
Use your Bright Data API Key as a Bearer token in the Authorization header.
How to authenticate:
- Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
- Include the API Key in the Authorization header of your requests
- Format:
Authorization: Bearer YOUR_API_KEY
Example:
Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df
Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication
Path Parameters
Body
application/json
The body is of type object.
Response
The destination with the new validation result
Was this page helpful?