/append

Append a value to an existing variable

This endpoint requires a POST request!

This endpoint is only on the BETA Version of the API and may be unstable.

Please report any & all bugs to the Support Server

Endpoint Headers:

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

Endpoint Body Parameters:

  • name - Name of the variable to set [String] (Required)

  • value - Value to be appended to the variable [String] (Required)

Examples:

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

Bot Designer for Discord

Example usage of /db/append endpoint using BDFD

$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/db/append;{
"name": "variable-name", 
"value": "string to append"
}]

$httpResult OR $httpResult[entries]
Discord.js

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

const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/db/append', {
"name": "variable-name",
"value": "string to append"
},
{
headers: {
"apikey": "<YOUR-API-KEY>"
}
}).then(res=>res.data)
})()

Possible Responses (Codes)

Code 200

API succeeded and details were fetched.

{
 status: 200,
 entries: // returns the new value of the edited variable
 }   
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