Skip to content

Instantly share code, notes, and snippets.

@Daniele122898
Last active March 16, 2018 07:10
Show Gist options
  • Select an option

  • Save Daniele122898/0f5c299b979ebc5a8c3c2407fc5a1f6e to your computer and use it in GitHub Desktop.

Select an option

Save Daniele122898/0f5c299b979ebc5a8c3c2407fc5a1f6e to your computer and use it in GitHub Desktop.
Official Docs of the Project-Aegis API

Project-Aegis

Base URL http://api.project-aegis.pw/api/blacklist

Token

Token type: Bearer

Token gets generated on your first login into the dashboard and can be viewed and regenerated in the dashboard user settings or via API call.

Data

All data received from the API is expected to be json. Everything else instantly returns an error. All data returned is also json.

Error Handling

Error detection should be done via status codes of the response, not via content. It should always contain an error json object though that contains an error message.

Dashboard

All of these things can be done via the Dashboard as well. Especially viewing Guild info if its not an automated process is highly recommended via Dashboard.

Guild Endpoint

Base URL Addition /guild

Guild Info

Endpoint /info/:id

Method GET

Parameters Description
id Guild ID to search for

Return

Fast and Slim info about Guild for quick decisions.

Return Type Description
id string Guild ID
securityLevel int Security Level of Guild
reportCount int How many Reports the Guild has
checked bool Was the Guild checked by Moderators and the Security Level thus set

Example

URL: http://api.project-aegis.pw/api/blacklist/guild/info/286474230634381312

{
    "id": "286474230634381312",
    "securityLevel": 0,
    "reportCount": 2,
    "checked": false
}

Guild Info Long

Endpoint /infolong/:id

Method GET

Parameters Description
id Guild ID to search for

Return

Long info about Guild.

Return Type Description
id string Guild ID
securityLevel int Security Level of Guild
reportCount int How many Reports the Guild has
checked bool Was the Guild checked by Moderators and the Security Level thus set
reports Reports[] All Reports on the Guild. (Saved as unrendered Markdown)
Reports
Return Type Description
id int Report ID
guildId string Guild ID. Mostly left blank...
userId string User ID that submitted the report
text string Actual report reason
date int64 Date in Unix
closed bool True if the report was checked by Mods. False otherwise

Example

URL: http://api.project-aegis.pw/api/blacklist/guild/infolong/286474230634381312

{
    "id": "286474230634381312",
    "securityLevel": 0,
    "reportCount": 2,
    "checked": false,
    "reports": [
        {
            "id": 1,
            "guildId": "",
            "userId": "192750776005689344",
            "text": "spamming my bots plz help HERE TOO -- EDIT -- Some other reason with nice logs and fancy markdown",
            "date": 1521042740,
            "closed": false
        },
        {
            ^...
        }
    ]
}

Report Guild

Endpoint /report/:id

Method POST

Parameters Description
id Guild ID to Report

Body

Parameter Type Description
reason string Reason with proof for the report. Supports markdown (highly recommended).

Example

URL: http://api.project-aegis.pw/api/blacklist/guild/report/286474230634381312 With Body:

{
    "reason": "Some reason in here. Must be long enough and can't be above 1'000 Characters. Preferrably markdown"
}

Return

{
	"status":"Report Added or Updated"
}

User Endpoint

Base URL Addition /user

Request new Token

Endpoint /requestToken/:id

Method POST

Parameters Description
id User ID to regenerate Token

Body

Parameter Type Description
token string Current Token

Example

URL: http://api.project-aegis.pw/api/blacklist/user/requestToken/192750776005689344 With Body:

{
    "token": "YOUR_TOKEN_HERE"
}

Return

Return Type Description
oldToken string Your old Token
newToken string Your new Token

Example

{
    "oldToken": "YOUR_OLD_TOKEN",
    "newToken": "YOUR_NEW_TOKEN"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment