Difference between revisions of "API"
m (→User Related: Friendly Link Titles) |
m (→Network Related: Fix Server and TrustedFP links) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
=== General === | === General === | ||
− | * [[API:Status]] | + | * [[API:Status|Status]] |
=== User Related === | === User Related === | ||
* [[API:User/Info|User/Info]] | * [[API:User/Info|User/Info]] | ||
* [[API:User/Update|User/Update]] | * [[API:User/Update|User/Update]] | ||
− | * [[API:User/Network|User/Network]] | + | * [[API:User/Network/Add|User/Network/Add]] |
− | * [[API:User/Whitelist|User/Whitelist]] | + | * [[API:User/Network/Delete|User/Network/Delete]] |
+ | * [[API:User/Whitelist/Add|User/Whitelist/Add]] | ||
+ | * [[API:User/Whitelist/Clear|User/Whitelist/Clear]] | ||
+ | * [[API:User/Whitelist/Delete|User/Whitelist/Delete]] | ||
=== Network Related === | === Network Related === | ||
− | * [[API:Network/Info]] | + | * [[API:Network/Info|Network/Info]] |
− | * [[API:Network/Update]] | + | * [[API:Network/Update|Network/Update]] |
− | * [[API:Network/Server]] | + | * [[API:Network/Server/Add|Network/Server/Add]] |
− | * [[API:Network/TrustedFP]] | + | * [[API:Network/Server/Delete|Network/Server/Delete]] |
+ | * [[API:Network/TrustedFP/Add|Network/TrustedFP/Add]] | ||
+ | * [[API:Network/TrustedFP/Delete|Network/TrustedFP/Delete]] | ||
== Usage == | == Usage == |
Latest revision as of 19:40, 22 April 2020
API
This module provides an API that returns data from the bouncer in JSON format
Functions
The API comes with a number of functions that can be used to both retrieve and update information, these are as follows:
General
User Related
- User/Info
- User/Update
- User/Network/Add
- User/Network/Delete
- User/Whitelist/Add
- User/Whitelist/Clear
- User/Whitelist/Delete
Network Related
- Network/Info
- Network/Update
- Network/Server/Add
- Network/Server/Delete
- Network/TrustedFP/Add
- Network/TrustedFP/Delete
Usage
Obtaining an API Key
To obtain a key, you will need to login your bouncer using IRC. Once logged in, you need to issue the following command:
/msg *api generate
This will generate an API key for you to use. Please note that you will need to save your API key as once generated, it will not be displayed to you again. Should you lose your API key, you will need to use generate again to generate a new one.
Sending a Request
All requests to the API must be sent using HTTP POST to https://api.bnc4free.com/ along with a minimum of the below required variables:
Variable | Description | Example Value |
---|---|---|
server | This is the name of the server you wish to query (normally the server your account is on | Apple |
username | This is the username you use normally to login to the bouncer | TestyTest |
key | The generated API key | d681883383bcf7963427b1629d0b9963cf6335b5 |
The function name from API Functions should also be appended to the URI (E.g https://api.bnc4free.com/status)
Example Response
If your API query has been successful, you should receive a successful response which will look like the below:
{ "status":"online", "uptime":"2h 38m 32s", "version":"fBNC - https://bnc4free.com" }
Source: https://api.bnc4free.com/status