shiichan

Find Cloudflare API tokens by name in a snap!

Hey there, I'm Shiichan! Today's find is a little low-key, but if you juggle a lot of API tokens, this one quietly makes your day nicer, so let me share it.

Cloudflare Changelog developers.cloudflare.com

What was announced?

From Cloudflare's Changelog: you can now search API tokens by name. Both the dashboard and the API let you filter tokens by their name.

The story so far

Until now, if you had a lot of tokens, finding a specific one meant paging through the whole list by hand. The more tokens you had, the more tedious it got.

What changes

The account API tokens page and the user API tokens page now include a search bar, so you can type a name and filter in real time. Even in a big pile of tokens, you can spot the one you want right away.

Dive Deep

This isn't just a dashboard thing, you can do the same over the API. The /user/tokens and /accounts/{account_id}/tokens endpoints now accept a name query parameter.

GET /accounts/{account_id}/tokens?name=my-token

Pass a name like this and you get a server-side filtered result back. For how to create tokens, see Create an API token, and for account-owned tokens, check the Account API tokens guide.

Wrap-up

  • A search bar was added to both the account and user API token lists in the dashboard
  • /user/tokens and /accounts/{account_id}/tokens now support a name query parameter
  • Server-side filtering by name means no more paging, even with tons of tokens

This is a perfect little update for teams running lots of API tokens, and for developers who want to look up tokens from automation scripts!