WorkerWorker Domain

List Domains

GET
Lists all Worker Domains for an account.

Path parameters

account_identifierstringRequired

Query parameters

zone_namestringOptional
Name of the zone.
servicestringOptional
Worker service associated with the zone and hostname.
zone_identifierstringOptional
Identifier of the zone.
hostnamestringOptional
environmentstringOptional

Response

This endpoint returns an object
errors
list of objects
messages
list of objects
success
boolean
Whether the API call was successful
result
list of objectsOptional
GET
1curl -G https://api.cloudflare.com/client/v4/accounts/9a7806061c88ada191ed06f989cc3dac/workers/domains \
2 -H "Authorization: Bearer <token>" \
3 -d zone_name=example.com \
4 -d service=foo \
5 -d zone_identifier=593c9c94de529bbbfaac7c53ced0447d \
6 -d hostname=foo.example.com \
7 -d environment=production
200Retrieved
1{
2 "errors": [
3 {
4 "code": 1,
5 "message": "string"
6 }
7 ],
8 "messages": [
9 {
10 "code": 1,
11 "message": "string"
12 }
13 ],
14 "success": true,
15 "result": [
16 {
17 "environment": "production",
18 "hostname": "foo.example.com",
19 "id": "dbe10b4bc17c295377eabd600e1787fd",
20 "service": "foo",
21 "zone_id": "593c9c94de529bbbfaac7c53ced0447d",
22 "zone_name": "example.com"
23 }
24 ]
25}