The base URL for all endpoints is: https://dnf.fail/api
List All Mirrors (READ)
Retrieve a list of all current mirrors associated with your API token.
GET
/mirrors
Fetches all of your site's current mirror URLs.
Successful Response (200 OK):
JSON
{
"message": "Mirrors retrieved successfully",
"mirrors": [
{
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"url": "http://mirror-one.onion",
"captcha_required": false,
"signature": "This is a signed message for mirror one."
},
{
"id": "b2c3d4e5-f6a7-8901-2345-67890abcdef1",
"url": "http://mirror-two-requires-captcha.onion",
"captcha_required": true,
"signature": ""
}
]
}
Add New Mirrors (CREATE)
Add one or more new mirror URLs to your existing list. Duplicates will be ignored.
POST
/mirrors
Submits new mirror URLs to be added.
Request Body:
The request body must contain a `mirrors` key with an array of mirror objects. The `id` is generated by the server and should be omitted.
JSON
{
"mirrors": [
{
"url": "http://newmirror1.onion",
"captcha_required": false,
"signature": "Optional signed message."
},
{
"url": "http://newmirror2.onion",
"captcha_required": true,
"signature": ""
}
]
}
Successful Response (201 Created):
JSON
{
"message": "Mirrors added successfully",
"mirrors": [
// ... existing mirrors ...
{
"id": "c3d4e5f6-a7b8-9012-3456-7890abcdef12",
"url": "http://newmirror1.onion",
"captcha_required": false,
"signature": "Optional signed message."
},
{
"id": "d4e5f6a7-b8c9-0123-4567-890abcdef123",
"url": "http://newmirror2.onion",
"captcha_required": true,
"signature": ""
}
]
}
Replace All Mirrors (UPDATE)
Replace your entire list of mirrors with a new one.
PUT
/mirrors
Replaces the entire mirror list with the one provided.
Request Body:
Provide the complete new list of mirrors. An `id` will be generated for any mirror that does not have one.
JSON
{
"mirrors": [
{
"url": "http://onlymirror.onion",
"captcha_required": true,
"signature": "This is the only mirror now."
}
]
}
Successful Response (200 OK):
JSON
{
"message": "Mirrors replaced successfully",
"mirrors": [
{
"id": "e5f6a7b8-c9d0-1234-5678-90abcdef1234",
"url": "http://onlymirror.onion",
"captcha_required": true,
"signature": "This is the only mirror now."
}
]
}
Delete Specific Mirrors (DELETE)
Remove one or more specific mirrors from your list using their unique IDs.
DELETE
/mirrors
Removes the specified mirrors from your list by their ID.
Request Body:
Provide an array of mirror IDs you wish to delete.
JSON
{
"ids": [
"a1b2c3d4-e5f6-7890-1234-567890abcdef"
]
}
Successful Response (200 OK):
JSON
{
"message": "Mirrors deleted successfully",
"mirrors": [
// ... remaining mirrors ...
]
}