Skip to main content
GiselleBot GiselleBot

General Endpoints

These endpoints are used to access the Discord user's and available bots' information.

Note

For the General Endpoints, the base URL for the API gateway endpoints is https://gateway.cycloptux.com/api/v1.

Get User Info

HTTP Request Example

GET /user HTTP/1.1
User-Agent: <YOUR_USER_AGENT>
Host: gateway.cycloptux.com
Accept: application/json
Authorization: <ACCESS_TOKEN>

HTTP Response Example

HTTP/1.1 200 OK
Content-Type: application/json

{
    "username": "cycloptux",
    "discriminator": "1543",
    "id": "220081163660689408",
    "avatar": "f245375afcc268bcf1d388a5cd59fb77",
    "locale": "en-US"
}

This endpoint retrieves basic information about the logged Discord user.

HTTP Request

GET https://gateway.cycloptux.com/api/v1/user

HTTP Response

ParameterTypeDescription
usernameStringThe Discord user's username.
discriminatorStringThe Discord user's discriminator.
idStringThe Discord user's ID.
avatarStringThe Discord user's avatar hash.
localeStringThe Discord user's chosen language option.

Get Available Bots

HTTP Request Example

GET /bots HTTP/1.1
User-Agent: <YOUR_USER_AGENT>
Host: gateway.cycloptux.com
Accept: application/json
Authorization: <ACCESS_TOKEN>

HTTP Response Example

HTTP/1.1 200 OK
Content-Type: application/json

{
    "bots": [
        {
            "id": "356831787445387285",
            "name": "GiselleBot",
            "icon": "45ba76c8b8f1671d3afdd86406e1ff36"
        }
    ]
}

This endpoint retrieves the list of available bots for the Discord user. The bots array can have [0..N] cardinality. The id attribute of a bot must be used in place of :appClientId in subsequent requests when interacting with the specific bot.

HTTP Request

GET https://gateway.cycloptux.com/api/v1/bots

HTTP Response

The response contains the bots array. Each element of the array has the following parameters:

ParameterTypeDescription
idStringThe bot's ID.
nameStringThe bot's username.
iconStringThe bot's icon hash.

Get Available Servers

HTTP Request Example

GET /bots/356831787445387285/servers HTTP/1.1
User-Agent: <YOUR_USER_AGENT>
Host: gateway.cycloptux.com
Accept: application/json
Authorization: <ACCESS_TOKEN>

HTTP Response Example

HTTP/1.1 200 OK
Content-Type: application/json

{
    "servers": [
        {
            "id": "533372744130363392",
            "name": "GiselleBot Support Center",
            "icon": "96c07853504ab639eae57202115f1654"
        }
    ]
}

This endpoint retrieves the list of available servers for a specific bot. The servers array can have [1..N] cardinality.

HTTP Request

GET https://gateway.cycloptux.com/api/v1/bots/:appClientId/servers

HTTP Response

The response contains the servers array. Each element of the array has the following parameters:

ParameterTypeDescription
idStringThe server ID.
nameStringThe server name.
iconStringThe server icon hash.

Get a Specific Server

HTTP Request Example

GET /bots/356831787445387285/servers/533372744130363392 HTTP/1.1
User-Agent: <YOUR_USER_AGENT>
Host: gateway.cycloptux.com
Accept: application/json
Authorization: <ACCESS_TOKEN>

HTTP Response Example

HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": "533372744130363392",
    "name": "GiselleBot Support Center",
    "icon": "96c07853504ab639eae57202115f1654",
    "channels": [
        {
            "type": "GuildNews",
            "id": "534172002550939648",
            "name": "announcements"
        },
        ...
    ],
    "roles": [
        ...
        {
            "id": "533372744130363392",
            "name": "@everyone",
            "color_hex": "#7289da"
        }
    ]
}

This endpoint retrieves the info about a specific server.

HTTP Request

GET https://gateway.cycloptux.com/api/v1/bots/:appClientId/servers/:serverId

HTTP Response

The response contains the same parameters shown on the previous endpoint, with the addition of the channels and roles arrays. Each element of those arrays has the following parameters:

ParameterTypeDescription
idStringThe channel or role ID.
nameStringThe channel or role name.
typeString(Only for channels) The channel type (GuildText, GuildNews, or GuildVoice).
color_hexString(Only for roles) The role color, as a hexadecimal string.

Get Available Modules

HTTP Request Example

GET /bots/356831787445387285/servers/533372744130363392/modules HTTP/1.1
User-Agent: <YOUR_USER_AGENT>
Host: gateway.cycloptux.com
Accept: application/json
Authorization: <ACCESS_TOKEN>

HTTP Response Example

HTTP/1.1 200 OK
Content-Type: application/json

{
    "modules": [
        {
            "name": "forms",
            "full_name": "Forms Builder",
            "short_description": "",
            "available": true,
            "image": "https://d1fn5var44w6sn.cloudfront.net/module_icons/forms.png"
        },
        ...
    ]
}

This endpoint retrieves the list of available modules for the selected server.

HTTP Request

GET https://gateway.cycloptux.com/api/v1/bots/:appClientId/servers/:serverId/modules

HTTP Response

The response contains the modules array. Each element of the array has the following parameters:

ParameterTypeDescription
nameStringThe technical name of the module (used in API requests).
full_nameStringThe human-readable name of the module.
short_descriptionStringA short description of the module.
availableBooleanWhether the module is configurable by the user, according to their permissions.
imageStringThe module icon URL.

Get the Server Audit Logs

HTTP Request Example

POST /bots/356831787445387285/servers/533372744130363392/logs HTTP/1.1
User-Agent: <YOUR_USER_AGENT>
Host: gateway.cycloptux.com
Accept: application/json
Authorization: <ACCESS_TOKEN>

{ "module": "forms" }

HTTP Response Example

HTTP/1.1 200 OK
Content-Type: application/json

{
    "logs": [
        {
            "id": "600a0b4dbb0267534f10abed",
            "timestamp": "2021-01-21T23:16:29.033Z",
            "user_id": "220081163660689408",
            "user_name": "cycloptux#1543",
            "user_avatar": "f245375afcc268bcf1d388a5cd59fb77",
            "module_name": "forms",
            "item_identifier": 2,
            "event_type": "PATCH",
            "event_string": "[cycloptux#1543](220081163660689408) updated an item with identifier 2 in the forms module."
        },
        ...
    ],
    "page": 1,
    "page_size": 10,
    "page_max": 6
}

This endpoint retrieves the technical audit logs for the selected server. The access to this endpoint requires the Discord user to have "View Audit Logs" permissions in the corresponding server.

Note

The audit logs refer to logs generated by the bot, not the ones tracked natively by Discord.

HTTP Request

GET https://gateway.cycloptux.com/api/v1/bots/:appClientId/servers/:serverId/logs

Audit logs entries fetched through this endpoint are paginated.

Supported query parameters:

ParameterTypeRequiredDescription
moduleStringfalseThe technical name of the module (refer to the /modules endpoint). If not specified, the output will include the logs of all modules.
startString/IntegerfalseThe initial timestamp for the logs being fetched. Supported formats are ISO 8601 strings, or Unix Epoch Time.
endString/IntegerfalseThe final timestamp for the logs being fetched. Supported formats are ISO 8601 strings, or Unix Epoch Time.
page_sizeIntegerfalseThe number of entries to fetch in a single request (Default: 10, Maximum: 100).
pageIntegerfalseThe page to request (Default: 1).

HTTP Response

The response contains the logs array. Each element of the array has the following parameters:

ParameterTypeDescription
idStringThe unique ID of the log entry.
timestampStringThe timestamp of the executed action.
user_idStringThe ID of the Discord user that executed the action.
user_nameStringThe username of the Discord user that executed the action.
user_avatarStringThe avatar hash of the Discord user that executed the action.
module_nameStringThe technical name of the module.
item_identifierIntegerThe identifier of the item being accessed or modified (if applicable).
event_typeStringThe type of the action that was performed. Possible values of this parameter are GET (item read/accessed), PUSH (item created/added), PATCH (item updated), DELETE (item cancelled/removed).
event_stringStringA human-readable description of the action that was performed.

Additionally, the following pagination-related parameters are passed in the response:

ParameterTypeDescription
pageIntegerThe current page being shown, for the specific query.
page_sizeIntegerThe requested page size.
page_maxIntegerThe maximum page that can be requested, for the specific query.