curl --request PATCH \
--url https://api.brightdata.com/webarchive/destinations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credentials": {
"access_key_id": "AKIA...NEW",
"secret_access_key": "..."
}
}
'{
"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"
}{
"error_code": "invalid_destination"
}{
"error_code": "invalid_destination"
}Destinations
Update a Web Archive destination
Rename a Web Archive destination, rotate its credentials or change its IAM role or region hint with PATCH /webarchive/destinations/.
PATCH
/
webarchive
/
destinations
/
{id}
curl --request PATCH \
--url https://api.brightdata.com/webarchive/destinations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credentials": {
"access_key_id": "AKIA...NEW",
"secret_access_key": "..."
}
}
'{
"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"
}{
"error_code": "invalid_destination"
}{
"error_code": "invalid_destination"
}PATCH /webarchive/destinations/{id} changes name, credentials, role_arn or region_hint. Send at least one of these fields. Requests that use the destination don’t change: deliveries in progress pick up the new values from their next file or retry.
- A rename alone doesn’t validate.
- New
access_keys,service_account_key,shared_keyorsas_tokencredentials are validated first. On422or503, nothing is changed. assume_rolechanges are stored first and then validated, as on create. Checkvalidation.status.credentialsare replaced as a whole, with the same shape as on create.
bucket, provider, auth_mode, prefix, account, namespace and region can’t change (400 invalid_destination). Create a new destination instead.409 destination_changed means the destination was changed at the same time: retry. Update is limited to 10 requests per minute and 60 per hour.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
Send at least one field.
Response
The updated destination. Check validation.status.
Was this page helpful?