Use API to list specific CAA records?


#1

I can’t seem to get the API to list specific CAA records based on content.

Doing a listing based on type and name works as expected.

$ curl -sS "https://api.cloudflare.com/client/v4/zones/e29353815de418e9d9401d8207a61b37/dns_records?type=CAA&name=ct3.coloncolonone.net" \
>      -H "X-Auth-Email: [email protected]" \
>      -H "X-Auth-Key: ..." \
>      -H "Content-Type: application/json" \
>      | jq
{
  "result": [
    {
      "id": "b16c7b73043a4461c295c646ac4bb29a",
      "type": "CAA",
      "name": "ct3.coloncolonone.net",
      "content": "0\tissue\t\"letsencrypt.org\"",
      "proxiable": false,
      "proxied": false,
      "ttl": 1,
      "locked": false,
      "zone_id": "e29353815de418e9d9401d8207a61b37",
      "zone_name": "coloncolonone.net",
      "modified_on": "2018-08-22T15:39:43.491745Z",
      "created_on": "2018-08-22T15:39:43.491745Z",
      "meta": {
        "auto_added": false,
        "managed_by_apps": false,
        "managed_by_argo_tunnel": false
      },
      "data": {
        "flags": 0,
        "tag": "issue",
        "value": "letsencrypt.org"
      }
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "total_pages": 1,
    "count": 1,
    "total_count": 1
  },
  "success": true,
  "errors": [],
  "messages": []
}

When I to that add the content parameter I end up drawing blanks.

$ curl -sS "https://api.cloudflare.com/client/v4/zones/e29353815de418e9d9401d8207a61b37/dns_records?type=CAA&name=ct3.coloncolonone.net&content=0%09issue%09%22letsencrypt.org%22" \
>      -H "X-Auth-Email: [email protected]" \
>      -H "X-Auth-Key: ..." \
>      -H "Content-Type: application/json" \
>      | jq
{
  "result": [],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "total_pages": 0,
    "count": 0,
    "total_count": 0
  },
  "success": true,
  "errors": [],
  "messages": []
}
$

Any idea what I’m doing wrong? Something off with the url encoding?


#2

Hi @andreas,

It’s not you, it’s currently a limitation for that record type and can’t be done. I confirmed with one of the developers and created a bug ticket to track when/if/how we address that. Will update this thread if/when it is possible.

Chris