For Workes & Pages, what is the name of the domain?
``
What is the issue or error you’re encountering
API listed in docs always throws error / API is not listed
What are the steps to reproduce the issue?
Hi,
trying to automate the process of allowing access to r2 bucket through custom domains.
The api to attach custom domain to a r2 bucket always raises error.
Error code seems to be of rate limiting, message says otherwise.
{“success”:false,“errors”:[{“code”:10040,“message”:“The JSON you provided was not well formed.”}],“messages”:,“result”:null}%
accounts/$ACCOUNT_ID/r2/buckets/$BUCKET_NAME/domains/custom - mentioned in API docs, always raises error
accounts/$ACCOUNT_ID/r2/buckets/$BUCKET_NAME/custom_domains - not in docs, works [payload matches with the one in docs]
Also the policy API for r2 is missing in docs, without this the domain doesn’t have access to r2 bucket, ability to create and attach cname
/accounts/$ACCOUNT_ID/r2/buckets/$BUCKET_NAME/policy - not in docs, works [had to mention query params, used inspect in browser to figure]
can proceed with the one that works but vary of changes that might break the working process…