Skip to content

Instantly share code, notes, and snippets.

@sonique6784
Last active July 14, 2023 23:35
Show Gist options
  • Save sonique6784/041cddb5b245f6e75bfc92ad3cbc4748 to your computer and use it in GitHub Desktop.
Save sonique6784/041cddb5b245f6e75bfc92ad3cbc4748 to your computer and use it in GitHub Desktop.
Gcore labs authentication with API Permanent Token
#!/bin/bash
# Copyright 2023 Cedric Ferry.
# SPDX-License-Identifier: Apache-2.0
# Gcore labs authentication with API Permanent Token
# Make sure you set "APIKey" in the Authorization header
# Get your {TOKEN} here: https://accounts.gcore.com/profile/api-tokens
# Get your {id} here: https://cdn.gcore.com/resources/list
# Example with Purge API
curl -d "{ \"paths\": [] }" \
-H 'Authorization:APIKey {TOKEN}' \
-H "Content-Type: application/json" \
-X POST https://api.gcore.com/cdn/resources/{id}/purge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment