POST /api/delete-css-response/:id
Deletes a specific CSS response from the database based on the requested URL and validates the API key.
id
: The requested URL that corresponds to the CSS response to be deleted.api_key
: A valid API key associated with a site.curl -X POST "https://codefusiononline.com/api/delete-css-response/yourRequestedURL" \
-H "Content-Type: application/json" \
--data-urlencode "api_key=YOUR_API_KEY"
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',
]);
$response = wp_remote_post('https://codefusiononline.com/api/delete-css-response/yourRequestedURL', [
'body' => [
'api_key' => 'YOUR_API_KEY',
],
]);
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
});
{
"message": "css_response deleted successfully"
}
POST /api/delete-site-cache/:siteId
Deletes all CSS responses associated with a specific site based on its ID and validates the API key.
siteId
: The ID of the site whose cache will be deleted.api_key
: A valid API key associated with the site.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"
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',
]);
$response = wp_remote_post('https://codefusiononline.com/api/delete-site-cache/YOUR_SITE_ID', [
'body' => [
'api_key' => 'YOUR_API_KEY',
],
]);
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
});
{
"message": "Site cache deleted successfully"
}