SimpleCloudNotifier/scnserver/swagger/swagger.yaml

2783 lines
72 KiB
YAML
Raw Normal View History

2022-11-18 21:25:40 +01:00
basePath: /
2022-11-13 19:17:07 +01:00
definitions:
2023-04-21 21:45:16 +02:00
apierr.APIError:
enum:
- -1
- 0
- 1101
- 1102
- 1103
- 1104
- 1105
- 1106
- 1121
- 1151
- 1152
- 1153
- 1152
2023-04-21 21:45:16 +02:00
- 1161
- 1171
- 1201
- 1202
- 1203
- 1204
- 1205
- 1206
- 1207
- 1208
2023-05-28 13:39:20 +02:00
- 1209
2023-04-21 21:45:16 +02:00
- 1301
- 1302
- 1303
- 1304
- 1305
- 1306
- 1307
- 1311
- 1401
- 1501
- 1511
2023-05-28 13:39:20 +02:00
- 1512
2023-04-21 21:45:16 +02:00
- 2101
- 3001
- 3002
- 9901
- 9902
- 9903
- 9904
- 9905
type: integer
x-enum-varnames:
- UNDEFINED
- NO_ERROR
- MISSING_UID
- MISSING_TOK
- MISSING_TITLE
- INVALID_PRIO
- REQ_METHOD
- INVALID_CLIENTTYPE
- PAGETOKEN_ERROR
- BINDFAIL_QUERY_PARAM
- BINDFAIL_BODY_PARAM
- BINDFAIL_URI_PARAM
- BINDFAIL_HEADER_PARAM
2023-04-21 21:45:16 +02:00
- INVALID_BODY_PARAM
- INVALID_ENUM_VALUE
- NO_TITLE
- TITLE_TOO_LONG
- CONTENT_TOO_LONG
- USR_MSG_ID_TOO_LONG
- TIMESTAMP_OUT_OF_RANGE
- SENDERNAME_TOO_LONG
- CHANNEL_TOO_LONG
- CHANNEL_DESCRIPTION_TOO_LONG
2023-05-28 13:39:20 +02:00
- CHANNEL_NAME_EMPTY
2023-04-21 21:45:16 +02:00
- USER_NOT_FOUND
- CLIENT_NOT_FOUND
- CHANNEL_NOT_FOUND
- SUBSCRIPTION_NOT_FOUND
- MESSAGE_NOT_FOUND
- SUBSCRIPTION_USER_MISMATCH
- KEY_NOT_FOUND
- USER_AUTH_FAILED
- NO_DEVICE_LINKED
- CHANNEL_ALREADY_EXISTS
- CANNOT_SELFDELETE_KEY
2023-05-28 13:39:20 +02:00
- CANNOT_SELFUPDATE_KEY
2023-04-21 21:45:16 +02:00
- QUOTA_REACHED
- FAILED_VERIFY_PRO_TOKEN
- INVALID_PRO_TOKEN
- FIREBASE_COM_FAILED
- FIREBASE_COM_ERRORED
- INTERNAL_EXCEPTION
- PANIC
- NOT_IMPLEMENTED
2022-11-18 21:25:40 +01:00
ginresp.apiError:
2022-11-13 19:17:07 +01:00
properties:
errhighlight:
type: integer
error:
type: integer
message:
type: string
success:
type: boolean
type: object
2022-11-20 01:28:32 +01:00
ginresp.compatAPIError:
properties:
errid:
type: integer
message:
type: string
success:
type: boolean
type: object
2022-11-13 19:17:07 +01:00
handler.Ack.response:
properties:
message:
type: string
new_ack:
type: integer
prev_ack:
type: integer
success:
2022-11-20 01:28:32 +01:00
type: boolean
2022-11-13 19:17:07 +01:00
type: object
2022-11-19 12:59:25 +01:00
handler.AddClient.body:
properties:
agent_model:
type: string
agent_version:
type: string
client_type:
2024-05-31 15:22:27 +02:00
$ref: '#/definitions/models.ClientType'
2022-11-19 12:59:25 +01:00
fcm_token:
type: string
name:
type: string
2022-11-20 03:06:08 +01:00
required:
- agent_model
- agent_version
- client_type
- fcm_token
2022-11-19 12:59:25 +01:00
type: object
2022-12-14 18:38:30 +01:00
handler.CreateChannel.body:
properties:
description:
type: string
2022-12-14 18:38:30 +01:00
name:
type: string
subscribe:
type: boolean
2022-12-14 18:38:30 +01:00
type: object
2022-11-20 00:19:41 +01:00
handler.CreateSubscription.body:
properties:
channel_id:
type: string
channel_internal_name:
2022-11-20 00:19:41 +01:00
type: string
2022-11-30 17:58:04 +01:00
channel_owner_user_id:
type: string
2022-11-20 00:19:41 +01:00
type: object
2022-11-18 21:25:40 +01:00
handler.CreateUser.body:
properties:
2022-11-18 23:28:37 +01:00
agent_model:
2022-11-18 21:25:40 +01:00
type: string
2022-11-18 23:28:37 +01:00
agent_version:
2022-11-18 21:25:40 +01:00
type: string
client_name:
type: string
2022-11-18 23:28:37 +01:00
client_type:
2024-05-31 15:22:27 +02:00
$ref: '#/definitions/models.ClientType'
2022-11-18 23:28:37 +01:00
fcm_token:
2022-11-18 21:25:40 +01:00
type: string
no_client:
type: boolean
2022-11-18 23:28:37 +01:00
pro_token:
2022-11-18 21:25:40 +01:00
type: string
username:
type: string
type: object
2023-04-21 21:45:16 +02:00
handler.CreateUserKey.body:
properties:
all_channels:
type: boolean
channels:
items:
type: string
type: array
name:
type: string
permissions:
type: string
required:
- name
- permissions
type: object
2022-11-13 19:17:07 +01:00
handler.DatabaseTest.response:
properties:
libVersion:
type: string
libVersionNumber:
type: integer
sourceID:
type: string
success:
type: boolean
type: object
handler.Expand.response:
properties:
data:
2022-11-20 01:28:32 +01:00
$ref: '#/definitions/models.CompatMessage'
2022-11-13 19:17:07 +01:00
message:
type: string
success:
2022-11-20 01:28:32 +01:00
type: boolean
2022-11-13 19:17:07 +01:00
type: object
handler.Health.response:
properties:
status:
type: string
type: object
handler.Info.response:
properties:
fcm_token_set:
type: boolean
is_pro:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
message:
type: string
quota:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
quota_max:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
success:
2022-11-20 01:28:32 +01:00
type: boolean
2022-11-13 19:17:07 +01:00
unack_count:
type: integer
user_id:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
user_key:
type: string
type: object
2022-11-20 00:30:30 +01:00
handler.ListChannelMessages.response:
properties:
messages:
items:
$ref: '#/definitions/models.Message'
2022-11-20 00:30:30 +01:00
type: array
next_page_token:
type: string
page_size:
type: integer
type: object
2022-11-20 00:19:41 +01:00
handler.ListChannelSubscriptions.response:
properties:
subscriptions:
items:
$ref: '#/definitions/models.Subscription'
2022-11-20 00:19:41 +01:00
type: array
type: object
handler.ListChannels.response:
properties:
channels:
items:
$ref: '#/definitions/models.ChannelWithSubscription'
2022-11-20 00:19:41 +01:00
type: array
type: object
handler.ListClients.response:
2022-11-19 12:47:23 +01:00
properties:
clients:
items:
$ref: '#/definitions/models.Client'
2022-11-19 12:47:23 +01:00
type: array
type: object
2022-11-20 00:19:41 +01:00
handler.ListMessages.response:
properties:
messages:
items:
$ref: '#/definitions/models.Message'
2022-11-20 00:19:41 +01:00
type: array
next_page_token:
type: string
page_size:
type: integer
type: object
2023-04-21 21:45:16 +02:00
handler.ListUserKeys.response:
properties:
2023-05-28 13:39:20 +02:00
keys:
2023-04-21 21:45:16 +02:00
items:
$ref: '#/definitions/models.KeyToken'
2023-04-21 21:45:16 +02:00
type: array
type: object
2022-11-20 00:19:41 +01:00
handler.ListUserSubscriptions.response:
properties:
subscriptions:
items:
$ref: '#/definitions/models.Subscription'
2022-11-20 00:19:41 +01:00
type: array
type: object
2022-11-13 19:17:07 +01:00
handler.Register.response:
properties:
is_pro:
type: boolean
2022-11-13 19:17:07 +01:00
message:
type: string
quota:
type: integer
2022-11-13 19:17:07 +01:00
quota_max:
type: integer
2022-11-13 19:17:07 +01:00
success:
type: boolean
2022-11-13 19:17:07 +01:00
user_id:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
user_key:
type: string
type: object
handler.Requery.response:
properties:
count:
type: integer
data:
items:
$ref: '#/definitions/models.CompatMessage'
type: array
message:
type: string
success:
2022-11-20 01:28:32 +01:00
type: boolean
2022-11-13 19:17:07 +01:00
type: object
2022-11-30 17:58:04 +01:00
handler.SendMessage.combined:
2022-11-19 15:13:47 +01:00
properties:
2022-11-20 03:06:08 +01:00
content:
2023-04-21 21:45:16 +02:00
type: string
2022-11-20 00:19:41 +01:00
msg_id:
type: string
2022-11-19 15:13:47 +01:00
priority:
type: integer
2022-11-20 00:19:41 +01:00
timestamp:
type: number
2022-11-20 03:06:08 +01:00
title:
type: string
2022-11-19 15:13:47 +01:00
user_id:
type: integer
user_key:
type: string
2022-11-20 00:19:41 +01:00
type: object
handler.SendMessage.response:
properties:
errhighlight:
type: integer
error:
2023-04-21 21:45:16 +02:00
$ref: '#/definitions/apierr.APIError'
is_pro:
type: boolean
message:
type: string
messagecount:
type: integer
quota:
type: integer
quota_max:
type: integer
scn_msg_id:
type: integer
success:
type: boolean
suppress_send:
type: boolean
type: object
2022-11-23 20:21:49 +01:00
handler.Sleep.response:
properties:
duration:
type: number
end:
type: string
start:
type: string
type: object
2022-11-13 19:17:07 +01:00
handler.Update.response:
properties:
is_pro:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
message:
type: string
quota:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
quota_max:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
success:
2022-11-20 01:28:32 +01:00
type: boolean
2022-11-13 19:17:07 +01:00
user_id:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
user_key:
type: string
type: object
handler.UpdateSubscription.body:
properties:
confirmed:
type: boolean
type: object
2023-05-28 13:39:20 +02:00
handler.UpdateUserKey.body:
properties:
all_channels:
type: boolean
channels:
items:
type: string
type: array
name:
type: string
permissions:
type: string
type: object
2022-11-13 19:17:07 +01:00
handler.Upgrade.response:
properties:
2022-11-20 01:28:32 +01:00
is_pro:
type: boolean
2022-11-13 19:17:07 +01:00
message:
type: string
2022-11-20 01:28:32 +01:00
quota:
type: integer
quota_max:
type: integer
2022-11-13 19:17:07 +01:00
success:
2022-11-20 01:28:32 +01:00
type: boolean
user_id:
type: integer
2022-11-13 19:17:07 +01:00
type: object
handler.UptimeKuma.body:
2023-07-31 20:04:38 +02:00
properties:
heartbeat:
properties:
localDateTime:
type: string
msg:
type: string
status:
type: integer
2023-07-31 20:04:38 +02:00
time:
type: string
timezone:
type: string
timezoneOffset:
type: string
type: object
monitor:
properties:
name:
type: string
url:
type: string
type: object
msg:
type: string
type: object
handler.UptimeKuma.response:
properties:
message_id:
type: string
type: object
2022-11-13 19:17:07 +01:00
handler.pingResponse:
properties:
info:
$ref: '#/definitions/handler.pingResponseInfo'
message:
type: string
type: object
handler.pingResponseInfo:
properties:
addr:
type: string
headers:
additionalProperties:
items:
type: string
type: array
type: object
method:
type: string
request:
type: string
uri:
type: string
type: object
models.ChannelPreview:
2024-06-12 00:35:06 +02:00
properties:
channel_id:
type: string
description_name:
type: string
display_name:
type: string
internal_name:
type: string
owner_user_id:
type: string
type: object
models.ChannelWithSubscription:
2022-11-20 00:19:41 +01:00
properties:
channel_id:
type: string
description_name:
type: string
display_name:
type: string
internal_name:
type: string
2022-11-20 00:19:41 +01:00
messages_sent:
type: integer
owner_user_id:
type: string
2022-11-20 00:19:41 +01:00
subscribe_key:
2022-11-20 21:15:06 +01:00
description: can be nil, depending on endpoint
2022-11-20 00:19:41 +01:00
type: string
subscription:
$ref: '#/definitions/models.Subscription'
2022-11-20 00:19:41 +01:00
timestamp_created:
type: string
timestamp_lastsent:
2022-11-20 00:19:41 +01:00
type: string
type: object
models.Client:
2022-11-19 12:47:23 +01:00
properties:
agent_model:
type: string
agent_version:
type: string
client_id:
type: string
2022-11-19 12:47:23 +01:00
fcm_token:
type: string
name:
type: string
2022-11-19 12:47:23 +01:00
timestamp_created:
type: string
type:
2023-04-21 21:45:16 +02:00
$ref: '#/definitions/models.ClientType'
2022-11-19 12:47:23 +01:00
user_id:
type: string
2022-11-19 12:47:23 +01:00
type: object
2023-04-21 21:45:16 +02:00
models.ClientType:
enum:
- ANDROID
- IOS
2024-05-31 15:22:27 +02:00
- LINUX
- MACOS
- WINDOWS
2023-04-21 21:45:16 +02:00
type: string
x-enum-varnames:
- ClientTypeAndroid
- ClientTypeIOS
2024-05-31 15:22:27 +02:00
- ClientTypeLinux
- ClientTypeMacOS
- ClientTypeWindows
2022-11-13 19:17:07 +01:00
models.CompatMessage:
properties:
body:
type: string
priority:
type: integer
scn_msg_id:
2022-11-20 01:28:32 +01:00
type: integer
2022-11-13 19:17:07 +01:00
timestamp:
type: integer
title:
type: string
2022-11-20 01:28:32 +01:00
trimmed:
type: boolean
2022-11-13 19:17:07 +01:00
usr_msg_id:
type: string
type: object
models.KeyToken:
2023-04-21 21:45:16 +02:00
properties:
all_channels:
type: boolean
channels:
items:
type: string
type: array
keytoken_id:
type: string
messages_sent:
type: integer
name:
type: string
owner_user_id:
type: string
permissions:
2024-06-12 00:35:06 +02:00
items:
$ref: '#/definitions/models.TokenPerm'
2024-06-12 00:35:06 +02:00
type: array
timestamp_created:
2024-06-12 00:35:06 +02:00
type: string
timestamp_lastused:
2024-06-12 00:35:06 +02:00
type: string
token:
2024-06-12 00:35:06 +02:00
type: string
type: object
models.KeyTokenPreview:
properties:
all_channels:
type: boolean
channels:
items:
type: string
type: array
keytoken_id:
type: string
name:
type: string
owner_user_id:
type: string
permissions:
type: string
type: object
models.Message:
2022-11-20 00:19:41 +01:00
properties:
channel_id:
type: string
channel_internal_name:
2022-11-20 00:19:41 +01:00
type: string
content:
type: string
message_id:
type: string
2022-11-20 00:19:41 +01:00
priority:
type: integer
sender_ip:
type: string
sender_name:
type: string
2022-11-20 00:19:41 +01:00
sender_user_id:
description: user that sent the message (this is also the owner of the channel
that contains it)
type: string
2022-11-20 00:19:41 +01:00
timestamp:
type: string
title:
type: string
trimmed:
type: boolean
used_key_id:
type: string
2022-11-20 00:19:41 +01:00
usr_message_id:
type: string
type: object
models.Subscription:
2022-11-20 00:19:41 +01:00
properties:
channel_id:
type: string
channel_internal_name:
2022-11-20 00:19:41 +01:00
type: string
channel_owner_user_id:
type: string
2022-11-20 00:19:41 +01:00
confirmed:
type: boolean
subscriber_user_id:
type: string
2022-11-20 00:19:41 +01:00
subscription_id:
type: string
2022-11-20 00:19:41 +01:00
timestamp_created:
type: string
type: object
models.TokenPerm:
enum:
- A
- CR
- CS
- UR
type: string
x-enum-comments:
PermAdmin: Edit userdata (+ includes all other permissions)
PermChannelRead: Read messages
PermChannelSend: Send messages
PermUserRead: Read userdata
x-enum-varnames:
- PermAdmin
- PermChannelRead
- PermChannelSend
- PermUserRead
models.User:
2022-11-18 21:25:40 +01:00
properties:
2022-11-20 22:18:24 +01:00
default_channel:
type: string
2023-07-31 20:04:38 +02:00
default_priority:
type: integer
2022-11-18 21:25:40 +01:00
is_pro:
type: boolean
2023-07-31 20:04:38 +02:00
max_body_size:
type: integer
max_channel_description_length:
type: integer
max_channel_name_length:
type: integer
max_sender_name_length:
type: integer
max_title_length:
type: integer
max_user_message_id_length:
type: integer
2022-11-18 21:25:40 +01:00
messages_sent:
type: integer
2022-12-14 18:38:30 +01:00
quota_max:
type: integer
quota_remaining:
type: integer
2022-11-20 00:19:41 +01:00
quota_used:
2022-11-18 21:25:40 +01:00
type: integer
timestamp_created:
type: string
timestamp_lastread:
2022-11-18 21:25:40 +01:00
type: string
timestamp_lastsent:
2022-11-18 21:25:40 +01:00
type: string
user_id:
type: string
2022-11-18 21:25:40 +01:00
username:
type: string
type: object
models.UserPreview:
properties:
user_id:
type: string
username:
type: string
type: object
models.UserWithClientsAndKeys:
2022-11-24 12:53:27 +01:00
properties:
admin_key:
type: string
clients:
items:
$ref: '#/definitions/models.Client'
2022-11-24 12:53:27 +01:00
type: array
default_channel:
type: string
2023-07-31 20:04:38 +02:00
default_priority:
type: integer
2022-11-24 12:53:27 +01:00
is_pro:
type: boolean
2023-07-31 20:04:38 +02:00
max_body_size:
type: integer
max_channel_description_length:
type: integer
max_channel_name_length:
type: integer
max_sender_name_length:
type: integer
max_title_length:
type: integer
max_user_message_id_length:
type: integer
2022-11-24 12:53:27 +01:00
messages_sent:
type: integer
2022-12-14 18:38:30 +01:00
quota_max:
type: integer
quota_remaining:
type: integer
2022-11-24 12:53:27 +01:00
quota_used:
type: integer
read_key:
type: string
send_key:
type: string
timestamp_created:
type: string
timestamp_lastread:
2022-11-24 12:53:27 +01:00
type: string
timestamp_lastsent:
2022-11-24 12:53:27 +01:00
type: string
user_id:
type: string
2022-11-24 12:53:27 +01:00
username:
type: string
type: object
2023-06-18 02:22:29 +02:00
host: simplecloudnotifier.de
2022-11-13 19:17:07 +01:00
info:
contact: {}
description: API for SCN
title: SimpleCloudNotifier API
version: "2.0"
paths:
2022-11-19 15:13:47 +01:00
/:
post:
2022-11-20 00:19:41 +01:00
description: All parameter can be set via query-parameter or the json body.
Only UserID, UserKey and Title are required
2022-11-19 15:13:47 +01:00
parameters:
- in: query
2022-11-20 00:19:41 +01:00
name: content
2022-11-19 15:13:47 +01:00
type: string
- in: query
name: msg_id
type: string
- in: query
2022-11-19 15:13:47 +01:00
name: priority
type: integer
- in: query
name: timestamp
type: number
- in: query
2022-11-20 00:19:41 +01:00
name: title
2022-11-19 15:13:47 +01:00
type: string
- in: query
name: user_id
type: integer
- in: query
name: user_key
type: string
2022-11-19 15:13:47 +01:00
- description: ' '
in: body
name: post_body
schema:
2022-11-30 17:58:04 +01:00
$ref: '#/definitions/handler.SendMessage.combined'
- in: formData
2022-11-20 21:15:06 +01:00
name: content
type: string
- in: formData
2022-11-20 21:15:06 +01:00
name: msg_id
type: string
- in: formData
2022-11-20 21:15:06 +01:00
name: priority
type: integer
- in: formData
2022-11-20 21:15:06 +01:00
name: timestamp
type: number
- in: formData
2022-11-20 21:15:06 +01:00
name: title
type: string
- in: formData
2022-11-20 21:15:06 +01:00
name: user_id
type: integer
- in: formData
name: user_key
type: string
2022-11-19 15:13:47 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.SendMessage.response'
2022-11-19 15:13:47 +01:00
"400":
description: Bad Request
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-11-21 22:52:44 +01:00
description: The user_id was not found or the user_key is wrong
2022-11-19 15:13:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-20 00:19:41 +01:00
"403":
2022-11-21 22:52:44 +01:00
description: The user has exceeded its daily quota - wait 24 hours or upgrade
your account
2022-11-19 15:13:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-11-21 22:52:44 +01:00
description: An internal server error occurred - try again later
2022-11-19 15:13:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Send a new message
2022-11-23 19:32:23 +01:00
tags:
- External
/api/ack.php:
get:
deprecated: true
operationId: compat-ack
parameters:
- description: the user_id
in: query
name: user_id
required: true
type: string
- description: the user_key
in: query
name: user_key
required: true
type: string
- description: the message id
in: query
name: scn_msg_id
required: true
type: string
- description: the user_id
in: formData
name: user_id
required: true
type: string
- description: the user_key
in: formData
name: user_key
required: true
type: string
- description: the message id
in: formData
name: scn_msg_id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Ack.response'
default:
description: ""
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.compatAPIError'
summary: Acknowledge that a message was received
tags:
- API-v1
/api/db-test:
post:
2022-11-23 19:32:23 +01:00
operationId: api-common-dbtest
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.DatabaseTest.response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Check for a working database connection
2022-11-23 19:32:23 +01:00
tags:
- Common
/api/expand.php:
get:
deprecated: true
operationId: compat-expand
parameters:
- description: The user_id
in: query
name: user_id
required: true
type: string
- description: The user_key
in: query
name: user_key
required: true
type: string
- description: The message-id
in: query
name: scn_msg_id
required: true
type: string
- description: The user_id
in: formData
name: user_id
required: true
type: string
- description: The user_key
in: formData
name: user_key
required: true
type: string
- description: The message-id
in: formData
name: scn_msg_id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Expand.response'
default:
description: ""
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.compatAPIError'
summary: Get a whole (potentially truncated) message
tags:
- API-v1
/api/health:
get:
operationId: api-common-health
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Health.response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Server Health-checks
tags:
- Common
/api/info.php:
get:
deprecated: true
operationId: compat-info
parameters:
- description: the user_id
in: query
name: user_id
required: true
type: string
- description: the user_key
in: query
name: user_key
required: true
type: string
- description: the user_id
in: formData
name: user_id
required: true
type: string
- description: the user_key
in: formData
name: user_key
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Info.response'
default:
description: ""
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.compatAPIError'
summary: Get information about the current user
tags:
- API-v1
/api/ping:
delete:
2022-11-18 21:25:40 +01:00
responses:
"200":
description: OK
schema:
2022-11-23 19:32:23 +01:00
$ref: '#/definitions/handler.pingResponse'
2022-11-18 21:25:40 +01:00
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-23 19:32:23 +01:00
summary: Simple endpoint to test connection (any http method)
tags:
- Common
2022-11-18 23:28:37 +01:00
get:
responses:
"200":
description: OK
schema:
2022-11-23 19:32:23 +01:00
$ref: '#/definitions/handler.pingResponse'
2022-11-18 23:28:37 +01:00
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-23 19:32:23 +01:00
summary: Simple endpoint to test connection (any http method)
tags:
- Common
2022-11-18 23:28:37 +01:00
patch:
responses:
"200":
description: OK
schema:
2022-11-23 19:32:23 +01:00
$ref: '#/definitions/handler.pingResponse'
"500":
description: Internal Server Error
2022-11-18 23:28:37 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-23 19:32:23 +01:00
summary: Simple endpoint to test connection (any http method)
tags:
- Common
post:
responses:
"200":
description: OK
2022-11-18 23:28:37 +01:00
schema:
2022-11-23 19:32:23 +01:00
$ref: '#/definitions/handler.pingResponse'
"500":
description: Internal Server Error
2022-11-18 23:28:37 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-23 19:32:23 +01:00
summary: Simple endpoint to test connection (any http method)
tags:
- Common
put:
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.pingResponse'
2022-11-18 23:28:37 +01:00
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-23 19:32:23 +01:00
summary: Simple endpoint to test connection (any http method)
tags:
- Common
/api/register.php:
2022-11-20 00:19:41 +01:00
get:
2022-11-23 19:32:23 +01:00
deprecated: true
operationId: compat-register
2022-11-20 00:19:41 +01:00
parameters:
2022-11-23 19:32:23 +01:00
- description: the (android) fcm token
2022-11-20 21:15:06 +01:00
in: query
2022-11-23 19:32:23 +01:00
name: fcm_token
2022-11-20 21:15:06 +01:00
required: true
type: string
2022-11-23 19:32:23 +01:00
- description: if the user is a paid account
enum:
- "true"
- "false"
in: query
name: pro
required: true
type: string
- description: the (android) IAP token
in: query
name: pro_token
required: true
type: string
- description: the (android) fcm token
in: formData
name: fcm_token
required: true
type: string
- description: if the user is a paid account
enum:
- "true"
- "false"
in: formData
name: pro
required: true
type: string
- description: the (android) IAP token
in: formData
name: pro_token
required: true
type: string
responses:
2022-11-20 00:19:41 +01:00
"200":
description: OK
schema:
$ref: '#/definitions/handler.Register.response'
default:
description: ""
2022-11-20 00:19:41 +01:00
schema:
2022-11-23 19:32:23 +01:00
$ref: '#/definitions/ginresp.compatAPIError'
summary: Register a new account
tags:
- API-v1
/api/requery.php:
get:
deprecated: true
operationId: compat-requery
parameters:
- description: the user_id
in: query
name: user_id
required: true
type: string
- description: the user_key
in: query
name: user_key
required: true
type: string
- description: the user_id
in: formData
name: user_id
required: true
type: string
- description: the user_key
in: formData
name: user_key
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Requery.response'
default:
description: ""
2022-11-20 00:19:41 +01:00
schema:
2022-11-23 19:32:23 +01:00
$ref: '#/definitions/ginresp.compatAPIError'
summary: Return all not-acknowledged messages
tags:
- API-v1
2022-11-23 20:21:49 +01:00
/api/sleep/{secs}:
post:
operationId: api-common-sleep
2022-11-23 22:12:47 +01:00
parameters:
- description: sleep delay (in seconds)
in: path
name: secs
required: true
type: number
2022-11-23 20:21:49 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Sleep.response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Return 200 after x seconds
tags:
- Common
2022-11-23 19:32:23 +01:00
/api/update.php:
get:
deprecated: true
operationId: compat-update
parameters:
- description: the user_id
in: query
name: user_id
required: true
type: string
- description: the user_key
in: query
name: user_key
required: true
type: string
- description: the (android) fcm token
in: query
name: fcm_token
required: true
type: string
- description: the user_id
in: formData
name: user_id
required: true
type: string
- description: the user_key
in: formData
name: user_key
required: true
type: string
- description: the (android) fcm token
in: formData
name: fcm_token
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Update.response'
default:
description: ""
2022-11-20 00:19:41 +01:00
schema:
2022-11-23 19:32:23 +01:00
$ref: '#/definitions/ginresp.compatAPIError'
summary: Set the fcm-token (android)
tags:
- API-v1
/api/upgrade.php:
get:
deprecated: true
operationId: compat-upgrade
parameters:
- description: the user_id
in: query
name: user_id
required: true
type: string
- description: the user_key
in: query
name: user_key
required: true
type: string
- description: if the user is a paid account
enum:
- "true"
- "false"
in: query
name: pro
required: true
type: string
- description: the (android) IAP token
in: query
name: pro_token
required: true
type: string
- description: the user_id
in: formData
name: user_id
required: true
type: string
- description: the user_key
in: formData
name: user_key
required: true
type: string
- description: if the user is a paid account
enum:
- "true"
- "false"
in: formData
name: pro
required: true
type: string
- description: the (android) IAP token
in: formData
name: pro_token
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Upgrade.response'
default:
description: ""
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.compatAPIError'
summary: Upgrade a free account to a paid account
tags:
- API-v1
/api/v2/messages:
get:
description: |-
The next_page_token is an opaque token, the special value "@start" (or empty-string) is the beginning and "@end" is the end
Simply start the pagination without a next_page_token and get the next page by calling this endpoint with the returned next_page_token of the last query
If there are no more entries the token "@end" will be returned
By default we return long messages with a trimmed body, if trimmed=false is supplied we return full messages (this reduces the max page_size)
operationId: api-messages-list
parameters:
2023-05-28 17:04:44 +02:00
- description: RFC3339
in: query
name: after
type: string
- description: RFC3339
in: query
name: before
type: string
- collectionFormat: csv
in: query
items:
type: string
name: channel
type: array
- collectionFormat: csv
in: query
items:
type: string
name: channel_id
type: array
- in: query
name: filter
type: string
- in: query
name: next_page_token
type: string
- in: query
name: page_size
type: integer
2023-05-28 17:04:44 +02:00
- collectionFormat: csv
in: query
items:
type: integer
name: priority
type: array
- collectionFormat: csv
in: query
2023-05-28 17:04:44 +02:00
items:
type: string
name: sender
type: array
- in: query
name: trimmed
type: boolean
2023-05-28 17:04:44 +02:00
- collectionFormat: csv
in: query
items:
type: string
name: used_key
type: array
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ListMessages.response'
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: List all (subscribed) messages
tags:
- API-v2
/api/v2/messages/{mid}:
delete:
description: The user must own the message and request the resource with the
ADMIN Key
operationId: api-messages-delete
parameters:
- description: MessageID
in: path
name: mid
required: true
2023-05-28 17:04:44 +02:00
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Message'
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Delete a single message
tags:
- API-v2
get:
description: |-
The user must either own the message and request the resource with the READ or ADMIN Key
Or the user must subscribe to the corresponding channel (and be confirmed) and request the resource with the READ or ADMIN Key
The returned message is never trimmed
operationId: api-messages-get
parameters:
- description: MessageID
in: path
name: mid
required: true
2023-05-28 17:04:44 +02:00
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Message'
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get a single message (untrimmed)
tags:
- API-v2
2024-06-12 00:35:06 +02:00
/api/v2/preview/channels/{cid}:
get:
operationId: api-channels-get-preview
parameters:
- description: ChannelID
in: path
name: cid
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.ChannelPreview'
2024-06-12 00:35:06 +02:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: channel not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get a single channel (similar to api-channels-get, but can be called
from anyone and only returns a subset of fields)
tags:
- API-v2
/api/v2/preview/keys/{kid}:
get:
operationId: api-tokenkeys-get-preview
parameters:
- description: TokenKeyID
in: path
name: kid
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.KeyTokenPreview'
2024-06-12 00:35:06 +02:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get a single key (similar to api-tokenkeys-get, but can be called from
anyone and only returns a subset of fields)
tags:
- API-v2
/api/v2/preview/users/{uid}:
get:
operationId: api-user-get-preview
parameters:
- description: UserID
in: path
name: uid
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.UserPreview'
2024-06-12 00:35:06 +02:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: user not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get a user (similar to api-user-get, but can be called from anyone
and only returns a subset of fields)
tags:
- API-v2
/api/v2/users:
2022-11-23 19:32:23 +01:00
post:
operationId: api-user-create
parameters:
- description: ' '
in: body
name: post_body
schema:
$ref: '#/definitions/handler.CreateUser.body'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.UserWithClientsAndKeys'
2022-11-23 19:32:23 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-23 19:32:23 +01:00
summary: Create a new user
tags:
- API-v2
/api/v2/users/{uid}:
2022-11-20 00:19:41 +01:00
get:
2022-11-23 19:32:23 +01:00
operationId: api-user-get
2022-11-20 00:19:41 +01:00
parameters:
- description: UserID
in: path
name: uid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-20 00:19:41 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.User'
2022-11-20 00:19:41 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: user not found
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-23 19:32:23 +01:00
summary: Get a user
tags:
- API-v2
patch:
2022-11-23 19:32:23 +01:00
description: The body-values are optional, only send the ones you want to update
operationId: api-user-update
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-11-23 19:32:23 +01:00
- description: Change the username (send an empty string to clear it)
in: body
2022-11-23 19:32:23 +01:00
name: username
schema:
type: string
2023-05-28 13:39:20 +02:00
- description: Send a verification of premium purchase
2022-11-23 19:32:23 +01:00
in: body
name: pro_token
schema:
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.User'
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: user not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-23 19:32:23 +01:00
summary: (Partially) update a user
tags:
- API-v2
/api/v2/users/{uid}/channels:
2022-11-20 00:30:30 +01:00
get:
description: |-
2022-11-23 19:32:23 +01:00
The possible values for 'selector' are:
- "owned" Return all channels of the user
- "subscribed" Return all channels that the user is subscribing to
- "all" Return channels that the user owns or is subscribing
2022-11-23 19:32:23 +01:00
- "subscribed_any" Return all channels that the user is subscribing to (even unconfirmed)
- "all_any" Return channels that the user owns or is subscribing (even unconfirmed)
2022-11-23 19:32:23 +01:00
operationId: api-channels-list
2022-11-20 00:30:30 +01:00
parameters:
2022-11-23 19:32:23 +01:00
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-11-23 19:32:23 +01:00
- description: 'Filter channels (default: owned)'
enum:
- owned
- subscribed
- all
- subscribed_any
- all_any
in: query
name: selector
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ListChannels.response'
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: List channels of a user (subscribed/owned/all)
2022-11-23 19:32:23 +01:00
tags:
- API-v2
2022-12-14 18:38:30 +01:00
post:
operationId: api-channels-create
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-12-14 18:38:30 +01:00
- description: ' '
in: body
name: post_body
schema:
$ref: '#/definitions/handler.CreateChannel.body'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.ChannelWithSubscription'
2022-12-14 18:38:30 +01:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"409":
description: channel already exists
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Create a new (empty) channel
tags:
- API-v2
/api/v2/users/{uid}/channels/{cid}:
2022-11-23 19:32:23 +01:00
get:
operationId: api-channels-get
parameters:
- description: UserID
in: path
name: uid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-23 19:32:23 +01:00
- description: ChannelID
in: path
name: cid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-23 19:32:23 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.ChannelWithSubscription'
2022-11-23 19:32:23 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: channel not found
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get a single channel
2022-11-23 19:32:23 +01:00
tags:
- API-v2
patch:
operationId: api-channels-update
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-11-23 19:32:23 +01:00
- description: ChannelID
in: path
name: cid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-11-23 19:32:23 +01:00
- description: Send `true` to create a new subscribe_key
in: body
name: subscribe_key
schema:
type: string
- description: Send `true` to create a new send_key
in: body
name: send_key
schema:
type: string
- description: Change the cahnnel display-name (only chnages to lowercase/uppercase
are allowed - internal_name must stay the same)
in: body
name: display_name
schema:
type: string
2022-11-23 19:32:23 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.ChannelWithSubscription'
2022-11-23 19:32:23 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: channel not found
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-23 19:32:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: (Partially) update a channel
tags:
- API-v2
/api/v2/users/{uid}/channels/{cid}/messages:
2022-11-23 19:32:23 +01:00
get:
description: |-
The next_page_token is an opaque token, the special value "@start" (or empty-string) is the beginning and "@end" is the end
Simply start the pagination without a next_page_token and get the next page by calling this endpoint with the returned next_page_token of the last query
If there are no more entries the token "@end" will be returned
By default we return long messages with a trimmed body, if trimmed=false is supplied we return full messages (this reduces the max page_size)
operationId: api-channel-messages
parameters:
- in: query
name: filter
type: string
- in: query
name: next_page_token
2022-11-23 19:32:23 +01:00
type: string
- in: query
name: page_size
2022-11-23 19:32:23 +01:00
type: integer
- in: query
name: trimmed
type: boolean
2022-11-23 22:12:47 +01:00
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-11-23 22:12:47 +01:00
- description: ChannelID
in: path
name: cid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-11-20 00:30:30 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ListChannelMessages.response'
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:30:30 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-20 00:30:30 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: channel not found
2022-11-20 00:30:30 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:30:30 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: List messages of a channel
2022-11-23 19:32:23 +01:00
tags:
- API-v2
/api/v2/users/{uid}/channels/{cid}/subscriptions:
2022-11-20 00:19:41 +01:00
get:
operationId: api-chan-subscriptions-list
parameters:
- description: UserID
in: path
name: uid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-20 00:19:41 +01:00
- description: ChannelID
in: path
name: cid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-20 00:19:41 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ListChannelSubscriptions.response'
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: channel not found
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: List all subscriptions of a channel
2022-11-23 19:32:23 +01:00
tags:
- API-v2
/api/v2/users/{uid}/clients:
get:
operationId: api-clients-list
2022-11-23 22:12:47 +01:00
parameters:
- description: UserID
in: path
name: uid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-23 22:12:47 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ListClients.response'
2022-11-23 22:12:47 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-23 22:12:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-23 22:12:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-23 22:12:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: List all clients
2022-11-23 22:12:47 +01:00
tags:
- API-v2
post:
operationId: api-clients-create
2022-11-19 12:47:23 +01:00
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
- description: ' '
in: body
name: post_body
schema:
$ref: '#/definitions/handler.AddClient.body'
2022-11-19 12:47:23 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Client'
2022-11-19 12:47:23 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-19 12:47:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-19 12:47:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-19 12:47:23 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Add a new clients
2022-11-23 19:32:23 +01:00
tags:
- API-v2
/api/v2/users/{uid}/clients/{cid}:
delete:
operationId: api-clients-delete
2022-11-19 12:59:25 +01:00
parameters:
- description: UserID
in: path
name: uid
required: true
2023-05-28 17:04:44 +02:00
type: string
- description: ClientID
in: path
name: cid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-19 12:59:25 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Client'
2022-11-19 12:59:25 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-19 12:59:25 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-19 12:59:25 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: client not found
2022-11-19 12:59:25 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-19 12:59:25 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Delete a client
2022-11-23 19:32:23 +01:00
tags:
- API-v2
2022-11-19 12:50:41 +01:00
get:
operationId: api-clients-get
parameters:
- description: UserID
in: path
name: uid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-19 12:50:41 +01:00
- description: ClientID
in: path
name: cid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-19 12:50:41 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Client'
2022-11-19 12:50:41 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-19 12:50:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-19 12:50:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: client not found
2022-11-19 12:50:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-19 12:50:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get a single client
2022-11-23 19:32:23 +01:00
tags:
- API-v2
2023-06-10 00:15:42 +02:00
patch:
description: The body-values are optional, only send the ones you want to update
operationId: api-client-update
parameters:
- description: UserID
in: path
name: uid
required: true
type: string
- description: ClientID
in: path
name: cid
required: true
type: string
- description: Change the clientname (send an empty string to clear it)
in: body
name: clientname
schema:
type: string
- description: Send a verification of premium purchase
in: body
name: pro_token
schema:
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Client'
2023-06-10 00:15:42 +02:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: client is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: client not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: (Partially) update a client
tags:
- API-v2
2023-05-28 17:04:44 +02:00
/api/v2/users/{uid}/keys:
get:
description: The request must be done with an ADMIN key, the returned keys are
without their token.
operationId: api-tokenkeys-list
parameters:
- description: UserID
in: path
name: uid
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ListUserKeys.response'
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: List keys of the user
tags:
- API-v2
post:
operationId: api-tokenkeys-create
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2023-05-28 17:04:44 +02:00
- description: ' '
in: body
name: post_body
schema:
$ref: '#/definitions/handler.CreateUserKey.body'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.KeyToken'
2023-05-28 17:04:44 +02:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Create a new key
tags:
- API-v2
/api/v2/users/{uid}/keys/{kid}:
delete:
description: Cannot be used to delete the key used in the request itself
operationId: api-tokenkeys-delete
parameters:
- description: UserID
in: path
name: uid
required: true
type: string
- description: TokenKeyID
in: path
name: kid
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.KeyToken'
2023-05-28 17:04:44 +02:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Delete a key
tags:
- API-v2
get:
description: The request must be done with an ADMIN key, the returned key does
not include its token.
operationId: api-tokenkeys-get
parameters:
- description: UserID
in: path
name: uid
required: true
type: string
- description: TokenKeyID
in: path
name: kid
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.KeyToken'
2023-05-28 17:04:44 +02:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get a single key
tags:
- API-v2
patch:
operationId: api-tokenkeys-update
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2023-05-28 17:04:44 +02:00
- description: TokenKeyID
in: path
name: kid
required: true
2023-06-10 00:15:42 +02:00
type: string
2023-05-28 17:04:44 +02:00
- description: ' '
in: body
name: post_body
schema:
$ref: '#/definitions/handler.UpdateUserKey.body'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.KeyToken'
2023-05-28 17:04:44 +02:00
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Update a key
tags:
- API-v2
/api/v2/users/{uid}/keys/current:
get:
description: Can be done with keys of any permission - the returned key does
not include its token.
operationId: api-tokenkeys-get-current
parameters:
- description: UserID
in: path
name: uid
required: true
type: string
- description: TokenKeyID
in: path
name: kid
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.KeyToken'
"400":
description: supplied values/parameters cannot be parsed / are invalid
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: user is not authorized / has missing permissions
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
description: message not found
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: internal server error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get the key currently used by this request
tags:
- API-v2
/api/v2/users/{uid}/subscriptions:
2022-11-20 00:19:41 +01:00
get:
description: |-
The possible values for 'direction' are:
- "outgoing" Subscriptions with the user as subscriber (= subscriptions he can use to read channels)
- "incoming" Subscriptions to channels of this user (= incoming subscriptions and subscription requests)
- "both" Combines "outgoing" and "incoming" (default)
The possible values for 'confirmation' are:
- "confirmed" Confirmed (active) subscriptions
- "unconfirmed" Unconfirmed (pending) subscriptions
- "all" Combines "confirmed" and "unconfirmed" (default)
The possible values for 'external' are:
- "true" Subscriptions with subscriber_user_id != channel_owner_user_id (subscriptions from other users)
- "false" Subscriptions with subscriber_user_id == channel_owner_user_id (subscriptions from this user to his own channels)
- "all" Combines "external" and "internal" (default)
The `subscriber_user_id` parameter can be used to additionally filter the subscriber_user_id (return subscribtions from a specific user)
The `channel_owner_user_id` parameter can be used to additionally filter the channel_owner_user_id (return subscribtions to a specific user)
2022-11-20 00:19:41 +01:00
operationId: api-user-subscriptions-list
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2023-05-28 13:39:20 +02:00
- description: 'Filter subscriptions (default: outgoing_all)'
enum:
- outgoing_all
- outgoing_confirmed
- outgoing_unconfirmed
- incoming_all
- incoming_confirmed
- incoming_unconfirmed
in: query
name: selector
required: true
type: string
2022-11-20 00:19:41 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ListUserSubscriptions.response'
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: List all subscriptions of a user (incoming/owned)
2022-11-23 19:32:23 +01:00
tags:
- API-v2
2022-11-20 00:19:41 +01:00
post:
description: Either [channel_owner_user_id, channel_internal_name] or [channel_id]
must be supplied in the request body
2022-11-20 00:19:41 +01:00
operationId: api-subscriptions-create
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-11-20 00:19:41 +01:00
- in: query
name: chan_subscribe_key
2022-11-20 00:19:41 +01:00
type: string
- description: ' '
in: body
name: post_data
schema:
$ref: '#/definitions/handler.CreateSubscription.body'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Subscription'
2022-11-20 00:19:41 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Create/Request a subscription
2022-11-23 19:32:23 +01:00
tags:
- API-v2
/api/v2/users/{uid}/subscriptions/{sid}:
2022-11-20 00:19:41 +01:00
delete:
operationId: api-subscriptions-delete
parameters:
- description: UserID
in: path
name: uid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-20 00:19:41 +01:00
- description: SubscriptionID
in: path
name: sid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-20 00:19:41 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Subscription'
2022-11-20 00:19:41 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: subscription not found
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Cancel (delete) subscription
2022-11-23 19:32:23 +01:00
tags:
- API-v2
2022-11-20 00:19:41 +01:00
get:
operationId: api-subscriptions-get
parameters:
- description: UserID
in: path
name: uid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-20 00:19:41 +01:00
- description: SubscriptionID
in: path
name: sid
required: true
2023-05-28 17:04:44 +02:00
type: string
2022-11-20 00:19:41 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Subscription'
2022-11-20 00:19:41 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: subscription not found
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Get a single subscription
2022-11-23 19:32:23 +01:00
tags:
- API-v2
2022-11-20 00:19:41 +01:00
patch:
operationId: api-subscriptions-update
parameters:
- description: UserID
in: path
name: uid
required: true
2023-06-10 00:15:42 +02:00
type: string
2022-11-20 00:19:41 +01:00
- description: SubscriptionID
in: path
name: sid
required: true
2023-06-10 00:15:42 +02:00
type: string
- description: ' '
in: body
name: post_data
schema:
$ref: '#/definitions/handler.UpdateSubscription.body'
2022-11-20 00:19:41 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Subscription'
2022-11-20 00:19:41 +01:00
"400":
2022-12-14 14:27:41 +01:00
description: supplied values/parameters cannot be parsed / are invalid
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-12-14 14:27:41 +01:00
description: user is not authorized / has missing permissions
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"404":
2022-12-14 14:27:41 +01:00
description: subscription not found
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-12-14 14:27:41 +01:00
description: internal server error
2022-11-20 00:19:41 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Update a subscription (e.g. confirm)
2022-11-23 19:32:23 +01:00
tags:
- API-v2
/external/v1/uptime-kuma:
post:
description: All parameter can be set via query-parameter or the json body.
Only UserID, UserKey and Title are required
parameters:
- in: query
name: channel
type: string
- in: query
name: channel_down
type: string
- in: query
name: channel_up
type: string
- example: P3TNH8mvv14fm
in: query
name: key
type: string
- in: query
name: priority
type: integer
- in: query
name: priority_down
type: integer
- in: query
name: priority_up
type: integer
- in: query
name: senderName
type: string
- example: "7725"
in: query
name: user_id
type: string
- description: ' '
in: body
name: post_body
schema:
$ref: '#/definitions/handler.UptimeKuma.body'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.UptimeKuma.response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: The user_id was not found or the user_key is wrong
schema:
$ref: '#/definitions/ginresp.apiError'
"403":
description: The user has exceeded its daily quota - wait 24 hours or upgrade
your account
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: An internal server error occurred - try again later
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Send a new message
tags:
- External
2022-11-19 15:13:47 +01:00
/send:
post:
2022-11-20 00:19:41 +01:00
description: All parameter can be set via query-parameter or the json body.
Only UserID, UserKey and Title are required
2022-11-19 15:13:47 +01:00
parameters:
- in: query
2022-11-20 00:19:41 +01:00
name: content
2022-11-19 15:13:47 +01:00
type: string
- in: query
name: msg_id
type: string
- in: query
2022-11-19 15:13:47 +01:00
name: priority
type: integer
- in: query
name: timestamp
type: number
- in: query
2022-11-20 00:19:41 +01:00
name: title
2022-11-19 15:13:47 +01:00
type: string
- in: query
name: user_id
type: integer
- in: query
name: user_key
type: string
2022-11-19 15:13:47 +01:00
- description: ' '
in: body
name: post_body
schema:
2022-11-30 17:58:04 +01:00
$ref: '#/definitions/handler.SendMessage.combined'
- in: formData
2022-11-20 21:15:06 +01:00
name: content
type: string
- in: formData
2022-11-20 21:15:06 +01:00
name: msg_id
type: string
- in: formData
2022-11-20 21:15:06 +01:00
name: priority
type: integer
- in: formData
2022-11-20 21:15:06 +01:00
name: timestamp
type: number
- in: formData
2022-11-20 21:15:06 +01:00
name: title
type: string
- in: formData
2022-11-20 21:15:06 +01:00
name: user_id
type: integer
- in: formData
name: user_key
type: string
2022-11-19 15:13:47 +01:00
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.SendMessage.response'
2022-11-19 15:13:47 +01:00
"400":
description: Bad Request
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
2022-11-21 22:52:44 +01:00
description: The user_id was not found or the user_key is wrong
2022-11-19 15:13:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
2022-11-20 00:19:41 +01:00
"403":
2022-11-21 22:52:44 +01:00
description: The user has exceeded its daily quota - wait 24 hours or upgrade
your account
2022-11-19 15:13:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
2022-11-21 22:52:44 +01:00
description: An internal server error occurred - try again later
2022-11-19 15:13:47 +01:00
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Send a new message
2022-11-23 19:32:23 +01:00
tags:
- External
2022-11-20 03:06:08 +01:00
/send.php:
post:
deprecated: true
description: All parameter can be set via query-parameter or form-data body.
Only UserID, UserKey and Title are required
parameters:
- in: query
2022-11-20 03:06:08 +01:00
name: content
type: string
- in: query
name: msg_id
type: string
- in: query
2022-11-20 03:06:08 +01:00
name: priority
type: integer
- in: query
name: timestamp
2022-11-20 03:06:08 +01:00
type: number
- in: query
2022-11-20 03:06:08 +01:00
name: title
type: string
- in: query
name: user_id
type: integer
- in: query
name: user_key
2022-11-20 03:06:08 +01:00
type: string
- in: formData
2022-11-20 03:06:08 +01:00
name: content
type: string
- in: formData
2022-11-30 17:58:04 +01:00
name: msg_id
type: string
- in: formData
2022-11-20 03:06:08 +01:00
name: priority
type: integer
- in: formData
2022-11-30 17:58:04 +01:00
name: timestamp
2022-11-20 03:06:08 +01:00
type: number
- in: formData
2022-11-20 03:06:08 +01:00
name: title
type: string
- in: formData
2022-11-30 17:58:04 +01:00
name: user_id
type: integer
- in: formData
name: user_key
2022-11-20 03:06:08 +01:00
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.SendMessage.response'
2022-11-20 03:06:08 +01:00
"400":
description: Bad Request
schema:
$ref: '#/definitions/ginresp.apiError'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/ginresp.apiError'
"403":
description: Forbidden
schema:
$ref: '#/definitions/ginresp.apiError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/ginresp.apiError'
summary: Send a new message (compatibility)
2022-11-23 19:32:23 +01:00
tags:
- External
2022-11-13 19:17:07 +01:00
swagger: "2.0"
2022-11-23 19:32:23 +01:00
tags:
- name: External
- name: API-v1
- name: API-v2
2022-11-30 17:58:04 +01:00
- name: Common