Get Custom Domain Settings
client.r2.buckets.domains.custom.get(stringbucketName, stringdomain, CustomGetParams { account_id, jurisdiction } params, RequestOptionsoptions?): CustomGetResponse { domain, enabled, status, 4 more }
GET/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}
Get the configuration for a custom domain on an existing R2 bucket.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Parameters
Get Custom Domain Settings
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const custom = await client.r2.buckets.domains.custom.get(
'example-bucket',
'example-domain/custom-domain.com',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
console.log(custom.domain);{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"result": {
"domain": "prefix.example-domain.one.com",
"enabled": false,
"status": {
"ownership": "deactivated",
"ssl": "pending"
},
"ciphers": [
"string"
],
"minTLS": "1.0",
"zoneId": "36ca64a6d92827b8a6b90be344bb1bfd",
"zoneName": "example-domain.one.com"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"result": {
"domain": "prefix.example-domain.one.com",
"enabled": false,
"status": {
"ownership": "deactivated",
"ssl": "pending"
},
"ciphers": [
"string"
],
"minTLS": "1.0",
"zoneId": "36ca64a6d92827b8a6b90be344bb1bfd",
"zoneName": "example-domain.one.com"
},
"success": true
}