If you want to know what l0c4lb0t can do, you probably want to check out the feature documentation.

General

Request

All request go to http://l0c4lh057.jg-p.eu/l0c4lb0t + the path of the specific request on port 1337.

Authorization

Every request needs to be authorized. This is done by including your guild's token (which the guild owner can get with the command token) in the Authorization request header.
Your guild has two different tokens: the main token can read everything and modify everything, the readonly token only can read information. GET requests accept both tokens, POST requests, need the main token. This allows you to get information on a website in JavaScript, without exposing the token to edit or send information. But you should keep in mind, that it still exposes the token to read information and everyone can use it.

Response

The response header should always have status code 200. The response body is valid JSON. It has two main keys, status and result. The status key's value is the HTML status code and the result key contains the requested value and only exists when the status is 200.

GET

/guild

Returns the guild the authorization token belongs to.

/user/{userId}

Returns the user with the id you requested. The user has to be a member of your guild.

/customcommands

Returns all the custom commands your guild has in the format
{
    "theCommand": "The response to the command",
    "anotherCommand": "The second response"
}

/feedback

Returns the feedback for your guild in the format
[
    {
        "id": 1,
        "title": "the title",
        "content": "the content",
        "created_at": "1970-01-01T00:00:00Z",
        "creator_id": 1234567890,
        "status": 0,
        "detailed_status": "Opened",
        "last_update": "1970-01-01T00:00:00Z",
        "type": 0
    },
    { ... }, { ... }
]
Status
0Created
1Accepted
2Rejected
3Deleted
4In progress
5Implemented
Type
0Suggestion
1Issue
2Bug
10Other
As you can see, an array is returned. You can modify the request with query parameters.
NameDescriptionDefault value
offsetHow many items should be skipped0
itemsHow many items you want to get returned20 (max: 100)
deletedWhether you want to include feedback with status 3 (deleted) in the resultfalse
idThe id of the feedback you want to get. This parameter can be used up to 50 times in one request and will return the elements in the requested order. Duplicates get removed automatically.not set
When the id is set, it will only send the feedback with the requested id(s).
For example /feedback?offset=4&items=5&id=1&id=5 will only return the feedback with id 1 and 5.
/feedback?offset=5&items=10 will return 10 elements (or fewer when there aren't as many items as request) while skipping the first 5 elements. Since the deleted flag is set to false, it skips elements that are deleted while the number of returned elements is unaffected. The 5 skipped elements are not deleted either, deleted elements get completely ignored.

POST

/feedback

Parameter in request headerDescription
Feedback-userThe id of the user who sent the feedback (user has to exists) or unknown or 0
Feedback-titleThe title of the feedback (at least 3 characters long)
Feedback-contentThe description of the feedback (at least 10 characters long)
Feedback-typeThe type of the feedback, accepts the number as well as the written description (default: Other)
This endpoint returns the created feedback directly in the result object.
Is there something I missed or do you need more options? Just write me what I should add and then it will be there as soon as possible.