- Back -

Defuse

  1. Report Guide
    1. Other topics
  2. HTTP API
    1. Version 0

HTTP API

Disclaimer: The current version 0 API may change without warning. The website located at bunnynabbit.com may become offline for many reasons with varying lengths of time, so please check for errors and resend reports when possible.

Some reported assets may need further information so check the main page under the API's identity and respond to assets waiting on the review section with a rewritten comment. This case rarely happens so you only need to check infrequently.

Privacy Policy

Version 0

Everything here uses JSON for both input and output bodies. At the moment, any identity is allowed to use the API but this may get restricted later. It is recommended to contact me before implementing the APIs with your games, real-time handlers or clientside scripts.

I encourage the API to be used for the following purposes:

If you are using the submit API to automatically send reports from games with any reason, please provide a comment that includes information for members to notice assets that were automatically submitted.

POST: https://bunnynabbit.com/v0/submit

Important: In your game, please make sure that your inputs for asset IDs only accept digits. If you don't, players can hide asset IDs and cause Defuse to reject reports as invalid.

// Request JSON
{
    "assetId": 1000, //  Required. Integers only
    "comment": "Submitted by a user in my awesome game", //  Required. Can be an empty string.
    "identity": "xxxxxxxxxxxxxxx" // Required. Find yours at https://bunnynabbit.com/app/defuse/settings/
}
// Response JSON
{
    "message": "Submitted asset is now under review" // At the moment, assume that all messages mean that your report is accepted. Unless the data is formatted incorrectly.
}
// Example JavaScript (XMLHttpRequest) usage

const identity = "Add your identity string" // Find yours at https://bunnynabbit.com/app/defuse/settings/

const xhttp = new XMLHttpRequest()
xhttp.open("POST", "https://bunnynabbit.com/v0/submit/", true)
xhttp.setRequestHeader("Content-type", "application/json")

xhttp.send(JSON.stringify({
    assetId: parseInt(location.pathname.split("/")[2]),
    comment: "Report created by my awesome game",
    identity: identity
}))

xhttp.onreadystatechange = function () {
    if (this.readyState == 4 && this.status == 200) {
        console.log(`Message: ${JSON.parse(this.responseText).message}`)
    }
}

Games and sample code using this API

Simple browser userscript that submits assets to Defuse inside of the Roblox website