/deleteAll

Delete all variables matching a query OR wipe your Datebase

Endpoint Headers:

  • apikey - Your Api Auth Key [String] (Required)

Endpoint URL Parameters

  • query - Retrieves entries based off if the provided string is within their names [String] (Optional)

Examples:

Data API version required. Must replace <version> with either release or beta.

Bot Designer for Discord

Example usage of /db/deleteAll endpoint using BDFD

$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/db/deleteAll]


$httpResult OR $httpResult[entries]

OR

$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpGet[https://bdfddata.rickyjs.xyz/<version>/db/deleteAll?query=<SEARCH-QUERY>]

$httpResult OR $httpResult[entries]
Discord.js

Example usage of /db/deleteAll endpoint using Discord.js

const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/db/deleteAll', {
headers: {
"apikey": "<YOUR-API-KEY>"
}
}).then(res=>res.data)
})()

OR

const axios = require('axios');
(async () => {
return await axios.get('https://bdfddata.rickyjs.xyz/<version>/db/deleteAll?query=<SEARCH-QUERY>', {
headers: {
"apikey": "<YOUR-API-KEY>"
}
}).then(res=>res.data)
})()

Possible Responses (Codes)

Code 200 (Query Not Used)

API succeeded and details were fetched.

{
 status: 200,
 entries: true // returns 'true' if successfully deleted, else returns 'false'
 }   
Code 200 (Query Used)

API succeeded and details were fetched.

{
 status: 200,
 entries: [ { age: 'true' }, { 'age-1': 'true' } ],  // ?query=age
 // returns name of entries and 'true' if successfully deleted, else returns 'false'
 }   
Code 400

An error occurred that stopped execution.

{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
Code 424

Origin Database Unavailable

  status: 424,
  error: 'An error occurred while contacting our Database. Please contact the BDFDDaya API Support Team if this issue persists.'
}

Last updated