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
| Parameter | Type | Description |
|---|---|---|
| username | String | The Discord user's username. |
| discriminator | String | The Discord user's discriminator. |
| id | String | The Discord user's ID. |
| avatar | String | The Discord user's avatar hash. |
| locale | String | The 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:
| Parameter | Type | Description |
|---|---|---|
| id | String | The bot's ID. |
| name | String | The bot's username. |
| icon | String | The 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:
| Parameter | Type | Description |
|---|---|---|
| id | String | The server ID. |
| name | String | The server name. |
| icon | String | The 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:
| Parameter | Type | Description |
|---|---|---|
| id | String | The channel or role ID. |
| name | String | The channel or role name. |
| type | String | (Only for channels) The channel type (GuildText, GuildNews, or GuildVoice). |
| color_hex | String | (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:
| Parameter | Type | Description |
|---|---|---|
| name | String | The technical name of the module (used in API requests). |
| full_name | String | The human-readable name of the module. |
| short_description | String | A short description of the module. |
| available | Boolean | Whether the module is configurable by the user, according to their permissions. |
| image | String | The 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:
| Parameter | Type | Required | Description |
|---|---|---|---|
| module | String | false | The technical name of the module (refer to the /modules endpoint). If not specified, the output will include the logs of all modules. |
| start | String/Integer | false | The initial timestamp for the logs being fetched. Supported formats are ISO 8601 strings, or Unix Epoch Time. |
| end | String/Integer | false | The final timestamp for the logs being fetched. Supported formats are ISO 8601 strings, or Unix Epoch Time. |
| page_size | Integer | false | The number of entries to fetch in a single request (Default: 10, Maximum: 100). |
| page | Integer | false | The page to request (Default: 1). |
HTTP Response
The response contains the logs array. Each element of the array has the following parameters:
| Parameter | Type | Description |
|---|---|---|
| id | String | The unique ID of the log entry. |
| timestamp | String | The timestamp of the executed action. |
| user_id | String | The ID of the Discord user that executed the action. |
| user_name | String | The username of the Discord user that executed the action. |
| user_avatar | String | The avatar hash of the Discord user that executed the action. |
| module_name | String | The technical name of the module. |
| item_identifier | Integer | The identifier of the item being accessed or modified (if applicable). |
| event_type | String | The 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_string | String | A human-readable description of the action that was performed. |
Additionally, the following pagination-related parameters are passed in the response:
| Parameter | Type | Description |
|---|---|---|
| page | Integer | The current page being shown, for the specific query. |
| page_size | Integer | The requested page size. |
| page_max | Integer | The maximum page that can be requested, for the specific query. |