Clear Cache Documentation

1. Delete CSS Response by URL

Endpoint

POST /api/delete-css-response/:id

Description

Deletes a specific CSS response from the database based on the requested URL and validates the API key.

URL Parameters
  • id: The requested URL that corresponds to the CSS response to be deleted.
Query Parameters
  • api_key: A valid API key associated with a site.
Request Example
cURL:
curl -X POST "https://codefusiononline.com/api/delete-css-response/yourRequestedURL" \
            -H "Content-Type: application/json" \
            --data-urlencode "api_key=YOUR_API_KEY"
Laravel HTTP Request:
use Illuminate\Support\Facades\Http;
            
            $response = Http::withHeaders([
                'Content-Type' => 'application/json',
            ])->post('https://codefusiononline.com/api/delete-css-response/yourRequestedURL', [
                'api_key' => 'YOUR_API_KEY',
            ]);
WordPress Remote Request:
$response = wp_remote_post('https://codefusiononline.com/api/delete-css-response/yourRequestedURL', [
                'body' => [
                    'api_key' => 'YOUR_API_KEY',
                ],
            ]);
JavaScript (Fetch API):
fetch('https://codefusiononline.com/api/delete-css-response/yourRequestedURL?api_key=YOUR_API_KEY', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                }
            })
            .then(response => response.json())
            .then(data => {
                console.log(data); // Handle the response data
            })
            .catch(error => {
                console.error('Error:', error); // Handle error
            });
Response Example
{
                "message": "css_response deleted successfully"
            }
Error Responses
  • 401 Unauthorized: If the API key is missing.
  • 403 Forbidden: If the API key is invalid.
  • 500 Internal Server Error: If there's a database error.

2. Delete Site Cache by Site ID

Endpoint

POST /api/delete-site-cache/:siteId

Description

Deletes all CSS responses associated with a specific site based on its ID and validates the API key.

URL Parameters
  • siteId: The ID of the site whose cache will be deleted.
Query Parameters
  • api_key: A valid API key associated with the site.
Request Example
cURL:
curl -X POST "https://codefusiononline.com/api/delete-site-cache/YOUR_SITE_ID" \
            -H "Content-Type: application/json" \
            --data-urlencode "api_key=YOUR_API_KEY"
Laravel HTTP Request:
use Illuminate\Support\Facades\Http;
            
            $response = Http::withHeaders([
                'Content-Type' => 'application/json',
            ])->post('https://codefusiononline.com/api/delete-site-cache/YOUR_SITE_ID', [
                'api_key' => 'YOUR_API_KEY',
            ]);
WordPress Remote Request:
$response = wp_remote_post('https://codefusiononline.com/api/delete-site-cache/YOUR_SITE_ID', [
                'body' => [
                    'api_key' => 'YOUR_API_KEY',
                ],
            ]);
JavaScript (Fetch API):
fetch('https://codefusiononline.com/api/delete-site-cache/YOUR_SITE_ID?api_key=YOUR_API_KEY', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                }
            })
            .then(response => response.json())
            .then(data => {
                console.log(data); // Handle the response data
            })
            .catch(error => {
                console.error('Error:', error); // Handle error
            });
Response Example
{
                "message": "Site cache deleted successfully"
            }
Error Responses
  • 401 Unauthorized: If the API key is missing.
  • 403 Forbidden: If the API key is invalid for the specified site ID.
  • 500 Internal Server Error: If there's a database error.

Call To Action

But pain in reproach in pleasure wants to be a cillum pain eu flees no birth. Excepteur are blinding desires do not proident, are in fault who desert offices softens the soul that is labor.

Call To Action

Contact

His needs result from something escape him indeed are consectetur will

Contact Info

Praesent sapien massa, vallis a pellentesque nec, egestas non nisi. Vestibulum ante ipsum primis.

Our Location

CodeFusionOnline

Rajasthan, Bagar 333023

Phone Number

+91 8239 724704

Email Address

Get In Touch

Praesent sapien massa, vallis a pellentesque nec, egestas non nisi. Vestibulum ante ipsum primis.

Loading
Your message has been sent. Thank you!