Last active
July 14, 2023 23:35
-
-
Save sonique6784/041cddb5b245f6e75bfc92ad3cbc4748 to your computer and use it in GitHub Desktop.
Gcore labs authentication with API Permanent Token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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