1 of 1 Servers
DiscordWebsiteVPS Dashboard
1 of 1 Servers
1 of 1 Servers
  • Welcome to 1 of 1 Servers
  • 1 of 1 Knowledge Base
    • Customer Guides
      • Adding Developer Access
      • Connect to VPS via Visual Studio Code
      • Dedicated Server vs VPS
      • Product Addons
      • Server Transfers Guide for FiveM
      • What is a CDN | Proxy Cache
    • Networking Guides
      • Basic Network Troubleshoot
      • CloudFlare Proxy
        • Setup
        • DNS Settings
      • Disable UDP for RDP
      • How to run Wireshark
      • How to run Windows MTR
      • Opening your Windows Ports
      • Remote Desktop Connection
      • Speed Tests
      • SQL Issues
    • Troubleshooting Error Codes
      • Remote Desktop Connection Errors
      • VPS Server Errors
  • 1OF1 Set Up Guides
    • API
      • CDN API
      • DDoS Shield API
    • CDN | Proxy Cache
      • CDN | Proxy Cache Setup Guide
    • Dedicated Servers
      • Dedicated Server Setup Guide
        • After Purchase
        • Link Your Discord
        • Manage Your Dedicated Server
    • Graffana Logging
  • VPS Servers
    • VPS Setup Guide
      • After Purchase
      • Link Your Discord
      • Deploy your Operating System
      • Getting Your VPS Login Details
      • Remote Desktop & SSH Guides
        • Logging into Remote Desktop
        • Logging into VPS with Linux OS
          • Creating SSH Key for VPS Install
    • VPS Upgrade or Downgrade
  • 1OF1 Dashboards
    • Dedicated Dashboard
      • Client Area
      • Sever Management and Information
      • My Account
      • Logs
    • DDoS Dashboard
      • IP Management
      • Creating Rules
        • Creating Presets
      • Creating a Webhook
    • Game Server Dashboard
      • Login Creation & Linking Discord
      • System
        • Console
        • Server Details
        • SFTP Details
        • Audit Log
      • Management
        • File Manager
        • Database
        • Backups
        • Subusers
        • Allocations
      • Configuration
        • Startup Parameters
        • Schedules
        • Advanced
      • Tools
        • Modpack Manager
        • Plugin Manager
    • VPS Dashboard
      • Customer Area
      • Server Management
      • Media
      • Password Reset & VNC
      • Network
      • Storage
      • Backups
      • Sharing
  • 1OF1 Game Guides
    • FiveM
      • Car Pack Installation
      • Clothing Installation
      • Common Errors Troubleshoot
        • CURL 56 ERROR
        • CURL 28 ERROR
        • "Fetching server variables..."
        • "Downloading server manifest..."
        • “...are you allowing UDP Packets?”
        • Thread Hitch Warnings
      • External pma-voice server
      • External Zumble/Rust Mumble Server
      • FiveM Convars Definitions
        • FiveM Cities | Opinion Article
          • Population
          • Donations
          • Developing
          • Staff Members
          • Departments
        • MLO Installation
        • Two Servers in One
      • SQL Backup
    • Game Server Guides
  • 1OF1 IN THE COMMUNITY
    • Giveaways
    • 1OF1 Merch
    • Donations
    • Fivemerr
    • Project Sloth
    • Guilda Bot
    • NextV Codes
  • 1OF1 Discounts & Partners
    • Project Sloth
    • Snipe Scripts
    • UZStore
  • Kreativ Signs
Powered by GitBook
On this page
  1. 1OF1 Set Up Guides
  2. API

CDN API

Sure! Here's a well-formatted version of your API documentation for GitBook:


CDN Cache Clearing API

Authentication

To authenticate your API requests, include your token in the Authorization header using the Bearer scheme:

Authorization: Bearer YOUR_API_TOKEN

⚠️ Important: Keep your token secure and never share it publicly. You can regenerate your token at any time from the dashboard.


Endpoint

POST /api/v1/cdn/clear-cache

Clears the cache for a specified CDN domain.

Request Body

{
  "domain": "example.1of1cdn.com"
}
  • domain (string, required): The CDN domain for which the cache should be cleared.

Response

  • Success (200 OK)

"Cache cleared"

Usage Examples

cURL

curl -X POST https://shield.1of1servers.com/api/v1/cdn/clear-cache \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "example.1of1cdn.com"
  }'

JavaScript (Fetch)

const response = await fetch('https://shield.1of1servers.com/api/v1/cdn/clear-cache', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    domain: 'example.1of1cdn.com'
  })
});

const result = await response.text();
console.log(result);

JavaScript (Axios)

import axios from 'axios';

const response = await axios.post(
  'https://shield.1of1servers.com/api/v1/cdn/clear-cache',
  {
    domain: 'example.1of1cdn.com'
  },
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    }
  }
);

const result = response.data;
console.log(result);
PreviousAPINextDDoS Shield API

Last updated 28 days ago