Skip to content

Instantly share code, notes, and snippets.

@kyouheicf
Last active August 10, 2023 03:06
Show Gist options
  • Save kyouheicf/f0d90645f4e4b714f18ed644cdc3b9e1 to your computer and use it in GitHub Desktop.
Save kyouheicf/f0d90645f4e4b714f18ed644cdc3b9e1 to your computer and use it in GitHub Desktop.
export ZONE_ID='YOUR_ZONE_ID'
http -A creds "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/page_shield/scripts?order_by=last_seen_at&direction=desc&status=active,inactive,infrequent" \
| jq -r '.result[0].id' | (read id ;http -A creds GET https://api.cloudflare.com/client/v4/zones/$ZONE_ID/page_shield/scripts/$id) \
| jq -r '.result'
# Ref. HTTPie を Cloudflare API / GraphQL 用に設定する - Qiita
# https://qiita.com/khayama/items/1738c3b98e9c4108a35d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment