2022-11-13 19:17:07 +01:00
{
"swagger" : "2.0" ,
"info" : {
"description" : "API for SCN" ,
"title" : "SimpleCloudNotifier API" ,
"contact" : { } ,
"version" : "2.0"
} ,
2023-06-18 02:22:29 +02:00
"host" : "simplecloudnotifier.de" ,
2022-11-18 21:25:40 +01:00
"basePath" : "/" ,
2022-11-13 19:17:07 +01:00
"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-23 19:32:23 +01:00
"tags" : [
"External"
] ,
2022-11-19 15:13:47 +01:00
"summary" : "Send a new message" ,
"parameters" : [
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "test" ,
2022-11-20 00:19:41 +01:00
"name" : "channel" ,
"in" : "query"
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "This is a message" ,
2022-11-20 00:19:41 +01:00
"name" : "content" ,
2022-11-19 15:13:47 +01:00
"in" : "query"
} ,
2023-04-21 21:45:16 +02:00
{
"type" : "string" ,
"example" : "P3TNH8mvv14fm" ,
"name" : "key" ,
"in" : "query"
} ,
2022-11-30 16:46:14 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "db8b0e6a-a08c-4646" ,
2022-11-30 16:46:14 +01:00
"name" : "msg_id" ,
"in" : "query"
} ,
2022-11-19 15:13:47 +01:00
{
2022-11-30 17:58:04 +01:00
"enum" : [
0 ,
1 ,
2
] ,
2022-11-19 15:13:47 +01:00
"type" : "integer" ,
2022-11-30 17:58:04 +01:00
"example" : 1 ,
2022-11-19 15:13:47 +01:00
"name" : "priority" ,
"in" : "query"
} ,
{
2022-11-30 16:46:14 +01:00
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "example-server" ,
2022-11-30 16:46:14 +01:00
"name" : "sender_name" ,
2022-11-19 15:13:47 +01:00
"in" : "query"
} ,
2022-11-29 11:07:15 +01:00
{
2022-11-30 16:46:14 +01:00
"type" : "number" ,
2022-11-30 17:58:04 +01:00
"example" : 1669824037 ,
2022-11-30 16:46:14 +01:00
"name" : "timestamp" ,
2022-11-29 11:07:15 +01:00
"in" : "query"
} ,
2022-11-19 15:13:47 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "Hello World" ,
2022-11-20 00:19:41 +01:00
"name" : "title" ,
"in" : "query"
} ,
{
2023-01-14 00:48:51 +01:00
"type" : "string" ,
"example" : "7725" ,
2022-11-30 16:46:14 +01:00
"name" : "user_id" ,
2022-11-19 15:13:47 +01:00
"in" : "query"
} ,
{
"description" : " " ,
"name" : "post_body" ,
"in" : "body" ,
"schema" : {
2022-11-30 17:58:04 +01:00
"$ref" : "#/definitions/handler.SendMessage.combined"
2022-11-19 15:13:47 +01:00
}
2022-11-20 21:15:06 +01:00
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "test" ,
2022-11-20 21:15:06 +01:00
"name" : "channel" ,
"in" : "formData"
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "This is a message" ,
2022-11-20 21:15:06 +01:00
"name" : "content" ,
"in" : "formData"
} ,
2023-04-21 21:45:16 +02:00
{
"type" : "string" ,
"example" : "P3TNH8mvv14fm" ,
"name" : "key" ,
"in" : "formData"
} ,
2022-11-20 21:15:06 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "db8b0e6a-a08c-4646" ,
2022-11-20 21:15:06 +01:00
"name" : "msg_id" ,
"in" : "formData"
} ,
{
2022-11-30 17:58:04 +01:00
"enum" : [
0 ,
1 ,
2
] ,
2022-11-20 21:15:06 +01:00
"type" : "integer" ,
2022-11-30 17:58:04 +01:00
"example" : 1 ,
2022-11-20 21:15:06 +01:00
"name" : "priority" ,
"in" : "formData"
} ,
2022-11-29 11:07:15 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "example-server" ,
2022-11-29 11:07:15 +01:00
"name" : "sender_name" ,
"in" : "formData"
} ,
2022-11-20 21:15:06 +01:00
{
"type" : "number" ,
2022-11-30 17:58:04 +01:00
"example" : 1669824037 ,
2022-11-20 21:15:06 +01:00
"name" : "timestamp" ,
"in" : "formData"
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "Hello World" ,
2022-11-20 21:15:06 +01:00
"name" : "title" ,
"in" : "formData"
} ,
{
2023-01-14 00:48:51 +01:00
"type" : "string" ,
"example" : "7725" ,
2022-11-20 21:15:06 +01:00
"name" : "user_id" ,
"in" : "formData"
2022-11-19 15:13:47 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-01-16 18:53:22 +01:00
"$ref" : "#/definitions/handler.SendMessage.response"
2022-11-20 00:19:41 +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-20 00:19:41 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"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-20 00:19:41 +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-20 00:19:41 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
} ,
2022-11-23 19:32:23 +01:00
"/api/ack.php" : {
"get" : {
"tags" : [
"API-v1"
] ,
"summary" : "Acknowledge that a message was received" ,
"operationId" : "compat-ack" ,
"deprecated" : true ,
"parameters" : [
{
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the message id" ,
"name" : "scn_msg_id" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the message id" ,
"name" : "scn_msg_id" ,
"in" : "formData" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2023-01-16 18:53:22 +01:00
"schema" : {
"$ref" : "#/definitions/handler.Ack.response"
}
} ,
"default" : {
"description" : "" ,
2022-11-23 19:32:23 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.compatAPIError"
}
}
}
}
} ,
"/api/db-test" : {
2022-11-25 22:42:21 +01:00
"post" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"Common"
] ,
2022-12-22 17:29:59 +01:00
"summary" : "Check for a working database connection" ,
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"
}
}
}
}
} ,
"/api/expand.php" : {
"get" : {
"tags" : [
"API-v1"
] ,
"summary" : "Get a whole (potentially truncated) message" ,
"operationId" : "compat-expand" ,
"deprecated" : true ,
"parameters" : [
{
"type" : "string" ,
"description" : "The user_id" ,
"name" : "user_id" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "The user_key" ,
"name" : "user_key" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "The message-id" ,
"name" : "scn_msg_id" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "The user_id" ,
"name" : "user_id" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "The user_key" ,
"name" : "user_key" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "The message-id" ,
"name" : "scn_msg_id" ,
"in" : "formData" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2023-01-16 18:53:22 +01:00
"schema" : {
"$ref" : "#/definitions/handler.Expand.response"
}
} ,
"default" : {
"description" : "" ,
2022-11-23 19:32:23 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.compatAPIError"
}
}
}
}
} ,
"/api/health" : {
"get" : {
"tags" : [
"Common"
] ,
"summary" : "Server Health-checks" ,
"operationId" : "api-common-health" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.Health.response"
}
} ,
"500" : {
"description" : "Internal Server Error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
} ,
"/api/info.php" : {
"get" : {
"tags" : [
"API-v1"
] ,
"summary" : "Get information about the current user" ,
"operationId" : "compat-info" ,
"deprecated" : true ,
"parameters" : [
{
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "formData" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2023-01-16 18:53:22 +01:00
"schema" : {
"$ref" : "#/definitions/handler.Info.response"
}
} ,
"default" : {
"description" : "" ,
2022-11-23 19:32:23 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.compatAPIError"
}
}
}
}
} ,
"/api/ping" : {
"get" : {
"tags" : [
"Common"
2022-11-20 00:19:41 +01:00
] ,
2022-11-23 19:32:23 +01:00
"summary" : "Simple endpoint to test connection (any http method)" ,
2022-11-20 00:19:41 +01:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/handler.pingResponse"
2022-11-20 00:19:41 +01:00
}
} ,
2022-11-23 19:32:23 +01:00
"500" : {
"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
}
}
} ,
"put" : {
"tags" : [
"Common"
] ,
"summary" : "Simple endpoint to test connection (any http method)" ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.pingResponse"
}
2022-11-20 00:19:41 +01:00
} ,
"500" : {
"description" : "Internal Server Error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
2022-11-23 19:32:23 +01:00
} ,
"post" : {
"tags" : [
"Common"
2022-11-20 00:19:41 +01:00
] ,
2022-11-23 19:32:23 +01:00
"summary" : "Simple endpoint to test connection (any http method)" ,
2022-11-20 00:19:41 +01:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/handler.pingResponse"
2022-11-20 00:19:41 +01:00
}
} ,
2022-11-23 19:32:23 +01:00
"500" : {
"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
}
}
} ,
"delete" : {
"tags" : [
"Common"
] ,
"summary" : "Simple endpoint to test connection (any http method)" ,
"responses" : {
"200" : {
"description" : "OK" ,
2022-11-20 00:19:41 +01:00
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/handler.pingResponse"
2022-11-20 00:19:41 +01:00
}
} ,
"500" : {
"description" : "Internal Server Error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
} ,
"patch" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"Common"
2022-11-20 00:19:41 +01:00
] ,
2022-11-23 19:32:23 +01:00
"summary" : "Simple endpoint to test connection (any http method)" ,
2022-11-20 00:19:41 +01:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/handler.pingResponse"
2022-11-20 00:19:41 +01:00
}
} ,
"500" : {
"description" : "Internal Server Error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
} ,
2022-11-23 19:32:23 +01:00
"/api/register.php" : {
2022-11-20 00:19:41 +01:00
"get" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v1"
] ,
"summary" : "Register a new account" ,
"operationId" : "compat-register" ,
"deprecated" : true ,
2022-11-20 00:19:41 +01:00
"parameters" : [
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
"description" : "the (android) fcm token" ,
"name" : "fcm_token" ,
"in" : "query" ,
2022-11-20 00:19:41 +01:00
"required" : true
2022-11-20 21:15:06 +01:00
} ,
{
"enum" : [
2022-11-23 19:32:23 +01:00
"true" ,
"false"
2022-11-20 21:15:06 +01:00
] ,
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "if the user is a paid account" ,
"name" : "pro" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the (android) IAP token" ,
"name" : "pro_token" ,
2022-11-20 21:15:06 +01:00
"in" : "query" ,
"required" : true
2022-11-23 19:32:23 +01:00
} ,
{
"type" : "string" ,
"description" : "the (android) fcm token" ,
"name" : "fcm_token" ,
"in" : "formData" ,
"required" : true
} ,
{
"enum" : [
"true" ,
"false"
] ,
"type" : "string" ,
"description" : "if the user is a paid account" ,
"name" : "pro" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the (android) IAP token" ,
"name" : "pro_token" ,
"in" : "formData" ,
"required" : true
2022-11-20 00:19:41 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2023-01-16 18:53:22 +01:00
"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"
2022-11-20 00:19:41 +01:00
}
}
}
}
} ,
2022-11-23 19:32:23 +01:00
"/api/requery.php" : {
2022-11-20 00:19:41 +01:00
"get" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v1"
] ,
"summary" : "Return all not-acknowledged messages" ,
"operationId" : "compat-requery" ,
"deprecated" : true ,
2022-11-20 00:19:41 +01:00
"parameters" : [
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "query" ,
2022-11-20 00:19:41 +01:00
"required" : true
} ,
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "formData" ,
2022-11-20 00:19:41 +01:00
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2023-01-16 18:53:22 +01:00
"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"
2022-11-20 00:19:41 +01:00
}
}
}
2022-11-23 19:32:23 +01:00
}
} ,
2022-11-23 20:21:49 +01:00
"/api/sleep/{secs}" : {
"post" : {
"tags" : [
"Common"
] ,
"summary" : "Return 200 after x seconds" ,
"operationId" : "api-common-sleep" ,
2022-11-23 22:12:47 +01:00
"parameters" : [
{
"type" : "number" ,
"description" : "sleep delay (in seconds)" ,
"name" : "secs" ,
"in" : "path" ,
"required" : true
}
] ,
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"
}
}
}
}
} ,
2022-11-23 19:32:23 +01:00
"/api/update.php" : {
"get" : {
"tags" : [
"API-v1"
] ,
"summary" : "Set the fcm-token (android)" ,
"operationId" : "compat-update" ,
"deprecated" : true ,
2022-11-20 21:35:08 +01:00
"parameters" : [
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "query" ,
"required" : true
2022-11-20 21:35:08 +01:00
} ,
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "query" ,
2022-11-20 21:35:08 +01:00
"required" : true
} ,
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
"description" : "the (android) fcm token" ,
"name" : "fcm_token" ,
"in" : "query" ,
"required" : true
2022-11-20 21:35:08 +01:00
} ,
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the (android) fcm token" ,
"name" : "fcm_token" ,
"in" : "formData" ,
"required" : true
2022-11-20 21:35:08 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2023-01-16 18:53:22 +01:00
"schema" : {
"$ref" : "#/definitions/handler.Update.response"
}
} ,
"default" : {
"description" : "" ,
2022-11-20 21:35:08 +01:00
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/ginresp.compatAPIError"
2022-11-20 21:35:08 +01:00
}
}
}
2022-11-20 00:19:41 +01:00
}
} ,
2022-11-23 19:32:23 +01:00
"/api/upgrade.php" : {
2022-11-20 00:30:30 +01:00
"get" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v1"
] ,
"summary" : "Upgrade a free account to a paid account" ,
"operationId" : "compat-upgrade" ,
"deprecated" : true ,
2022-11-20 00:30:30 +01:00
"parameters" : [
{
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "query" ,
"required" : true
2022-11-20 00:30:30 +01:00
} ,
{
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "query" ,
"required" : true
2022-11-20 00:30:30 +01:00
} ,
{
2022-11-23 19:32:23 +01:00
"enum" : [
"true" ,
"false"
] ,
"type" : "string" ,
"description" : "if the user is a paid account" ,
"name" : "pro" ,
"in" : "query" ,
"required" : true
2022-11-20 00:30:30 +01:00
} ,
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
"description" : "the (android) IAP token" ,
"name" : "pro_token" ,
"in" : "query" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_id" ,
"name" : "user_id" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the user_key" ,
"name" : "user_key" ,
"in" : "formData" ,
"required" : true
} ,
{
"enum" : [
"true" ,
"false"
] ,
"type" : "string" ,
"description" : "if the user is a paid account" ,
"name" : "pro" ,
"in" : "formData" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "the (android) IAP token" ,
"name" : "pro_token" ,
"in" : "formData" ,
"required" : true
2022-11-20 00:30:30 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2023-01-16 18:53:22 +01:00
"schema" : {
"$ref" : "#/definitions/handler.Upgrade.response"
}
} ,
"default" : {
"description" : "" ,
2022-11-20 00:30:30 +01:00
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/ginresp.compatAPIError"
2022-11-20 00:30:30 +01:00
}
2022-11-23 19:32:23 +01:00
}
}
}
} ,
2023-02-03 22:51:03 +01:00
"/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\nSimply 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\nIf there are no more entries the token \"@end\" will be returned\nBy default we return long messages with a trimmed body, if trimmed=false is supplied we return full messages (this reduces the max page_size)" ,
"tags" : [
"API-v2"
] ,
"summary" : "List all (subscribed) messages" ,
"operationId" : "api-messages-list" ,
"parameters" : [
2023-05-28 17:04:44 +02:00
{
"type" : "string" ,
"description" : "RFC3339" ,
"name" : "after" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "RFC3339" ,
"name" : "before" ,
"in" : "query"
} ,
{
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "csv" ,
"name" : "channel" ,
"in" : "query"
} ,
{
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "csv" ,
"name" : "channel_id" ,
"in" : "query"
} ,
2023-02-03 22:51:03 +01:00
{
"type" : "string" ,
"name" : "filter" ,
"in" : "query"
} ,
{
"type" : "string" ,
"name" : "next_page_token" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"name" : "page_size" ,
"in" : "query"
} ,
2023-05-28 17:04:44 +02:00
{
"type" : "array" ,
"items" : {
"type" : "integer"
} ,
"collectionFormat" : "csv" ,
"name" : "priority" ,
"in" : "query"
} ,
{
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "csv" ,
"name" : "sender" ,
"in" : "query"
} ,
2023-02-03 22:51:03 +01:00
{
"type" : "boolean" ,
"name" : "trimmed" ,
"in" : "query"
2023-05-28 17:04:44 +02:00
} ,
{
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "csv" ,
"name" : "used_key" ,
"in" : "query"
2023-02-03 22:51:03 +01:00
}
] ,
"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"
}
}
}
}
} ,
"/api/v2/messages/{mid}" : {
"delete" : {
"description" : "The user must own the message and request the resource with the ADMIN Key" ,
"tags" : [
"API-v2"
] ,
"summary" : "Delete a single message" ,
"operationId" : "api-messages-delete" ,
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2023-02-03 22:51:03 +01:00
"description" : "MessageID" ,
"name" : "mid" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/models.MessageJSON"
}
} ,
"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"
}
}
}
} ,
"patch" : {
"description" : "The user must either own the message and request the resource with the READ or ADMIN Key\nOr the user must subscribe to the corresponding channel (and be confirmed) and request the resource with the READ or ADMIN Key\nThe returned message is never trimmed" ,
"tags" : [
"API-v2"
] ,
"summary" : "Get a single message (untrimmed)" ,
"operationId" : "api-messages-get" ,
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2023-02-03 22:51:03 +01:00
"description" : "MessageID" ,
"name" : "mid" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/models.MessageJSON"
}
} ,
"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"
}
}
}
}
} ,
"/api/v2/users" : {
2022-11-23 19:32:23 +01:00
"post" : {
"tags" : [
"API-v2"
] ,
"summary" : "Create a new user" ,
"operationId" : "api-user-create" ,
"parameters" : [
{
"description" : " " ,
"name" : "post_body" ,
"in" : "body" ,
2022-11-20 00:30:30 +01:00
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/handler.CreateUser.body"
2022-11-20 00:30:30 +01:00
}
2022-11-23 19:32:23 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
2022-11-20 00:30:30 +01:00
"schema" : {
2023-04-21 21:45:16 +02:00
"$ref" : "#/definitions/models.UserJSONWithClientsAndKeys"
}
} ,
"400" : {
"description" : "supplied values/parameters cannot be parsed / are invalid" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"500" : {
"description" : "internal server error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
} ,
2023-05-28 17:04:44 +02:00
"/api/v2/users/{uid}" : {
2023-04-21 21:45:16 +02:00
"get" : {
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Get a user" ,
"operationId" : "api-user-get" ,
2023-04-21 21:45:16 +02:00
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2023-04-21 21:45:16 +02:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.UserJSON"
2023-04-21 21:45:16 +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" : {
2023-05-28 17:04:44 +02:00
"description" : "user not found" ,
2023-04-21 21:45:16 +02:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"500" : {
"description" : "internal server error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
} ,
2023-05-28 17:04:44 +02:00
"patch" : {
"description" : "The body-values are optional, only send the ones you want to update" ,
2023-04-21 21:45:16 +02:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "(Partially) update a user" ,
"operationId" : "api-user-update" ,
2023-04-21 21:45:16 +02:00
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2023-04-21 21:45:16 +02:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
2023-05-28 17:04:44 +02:00
"description" : "Change the username (send an empty string to clear it)" ,
"name" : "username" ,
2023-04-21 21:45:16 +02:00
"in" : "body" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"type" : "string"
}
} ,
{
"description" : "Send a verification of premium purchase" ,
"name" : "pro_token" ,
"in" : "body" ,
"schema" : {
"type" : "string"
2023-04-21 21:45:16 +02:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.UserJSON"
2023-04-21 21:45:16 +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" : {
2023-05-28 17:04:44 +02:00
"description" : "user not found" ,
2023-04-21 21:45:16 +02:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"500" : {
"description" : "internal server error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
} ,
2023-05-28 17:04:44 +02:00
"/api/v2/users/{uid}/channels" : {
2023-04-21 21:45:16 +02:00
"get" : {
2023-05-28 17:04:44 +02:00
"description" : "The possible values for 'selector' are:\n- \"owned\" Return all channels of the user\n- \"subscribed\" Return all channels that the user is subscribing to\n- \"all\" Return channels that the user owns or is subscribing\n- \"subscribed_any\" Return all channels that the user is subscribing to (even unconfirmed)\n- \"all_any\" Return channels that the user owns or is subscribing (even unconfirmed)" ,
2023-04-21 21:45:16 +02:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "List channels of a user (subscribed/owned/all)" ,
"operationId" : "api-channels-list" ,
2023-04-21 21:45:16 +02:00
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2023-04-21 21:45:16 +02:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
2023-05-28 17:04:44 +02:00
{
"enum" : [
"owned" ,
"subscribed" ,
"all" ,
"subscribed_any" ,
"all_any"
] ,
"type" : "string" ,
"description" : "Filter channels (default: owned)" ,
"name" : "selector" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/handler.ListChannels.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"
}
}
}
} ,
"post" : {
"tags" : [
"API-v2"
] ,
"summary" : "Create a new (empty) channel" ,
"operationId" : "api-channels-create" ,
"parameters" : [
2023-04-21 21:45:16 +02:00
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2023-05-28 17:04:44 +02:00
"description" : "UserID" ,
"name" : "uid" ,
2023-04-21 21:45:16 +02:00
"in" : "path" ,
"required" : true
2023-05-28 17:04:44 +02:00
} ,
{
"description" : " " ,
"name" : "post_body" ,
"in" : "body" ,
"schema" : {
"$ref" : "#/definitions/handler.CreateChannel.body"
}
2023-04-21 21:45:16 +02:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.ChannelWithSubscriptionJSON"
2023-04-21 21:45:16 +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"
}
} ,
2023-05-28 17:04:44 +02:00
"409" : {
"description" : "channel already exists" ,
2023-04-21 21:45:16 +02:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"500" : {
"description" : "internal server error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
2023-05-28 17:04:44 +02:00
}
} ,
"/api/v2/users/{uid}/channels/{cid}" : {
"get" : {
2023-04-21 21:45:16 +02:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Get a single channel" ,
"operationId" : "api-channels-get" ,
2023-04-21 21:45:16 +02:00
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2023-04-21 21:45:16 +02:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
"description" : "ChannelID" ,
"name" : "cid" ,
2023-04-21 21:45:16 +02:00
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.ChannelWithSubscriptionJSON"
2023-04-21 21:45:16 +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" : {
2023-05-28 17:04:44 +02:00
"description" : "channel not found" ,
2023-04-21 21:45:16 +02:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"500" : {
"description" : "internal server error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
} ,
"patch" : {
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "(Partially) update a channel" ,
"operationId" : "api-channels-update" ,
2023-04-21 21:45:16 +02:00
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2023-04-21 21:45:16 +02:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2023-05-28 17:04:44 +02:00
"description" : "ChannelID" ,
"name" : "cid" ,
2023-04-21 21:45:16 +02:00
"in" : "path" ,
"required" : true
2023-05-28 13:39:20 +02:00
} ,
{
2023-05-28 17:04:44 +02:00
"description" : "Send `true` to create a new subscribe_key" ,
"name" : "subscribe_key" ,
2023-05-28 13:39:20 +02:00
"in" : "body" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"type" : "string"
}
} ,
{
"description" : "Send `true` to create a new send_key" ,
"name" : "send_key" ,
"in" : "body" ,
"schema" : {
"type" : "string"
}
} ,
{
"description" : "Change the cahnnel display-name (only chnages to lowercase/uppercase are allowed - internal_name must stay the same)" ,
"name" : "display_name" ,
"in" : "body" ,
"schema" : {
"type" : "string"
2023-05-28 13:39:20 +02:00
}
2023-04-21 21:45:16 +02:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.ChannelWithSubscriptionJSON"
2022-11-20 00:30:30 +01:00
}
} ,
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:30:30 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
2023-04-21 21:45:16 +02:00
"401" : {
"description" : "user is not authorized / has missing permissions" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"404" : {
2023-05-28 17:04:44 +02:00
"description" : "channel not found" ,
2023-04-21 21:45:16 +02:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
2022-11-20 00:30:30 +01:00
"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"
}
}
}
}
} ,
2023-05-28 17:04:44 +02:00
"/api/v2/users/{uid}/channels/{cid}/messages" : {
2022-11-20 00:19:41 +01:00
"get" : {
2023-05-28 17:04:44 +02:00
"description" : "The next_page_token is an opaque token, the special value \"@start\" (or empty-string) is the beginning and \"@end\" is the end\nSimply 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\nIf there are no more entries the token \"@end\" will be returned\nBy default we return long messages with a trimmed body, if trimmed=false is supplied we return full messages (this reduces the max page_size)" ,
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "List messages of a channel" ,
"operationId" : "api-channel-messages" ,
2022-11-20 00:19:41 +01:00
"parameters" : [
2023-05-28 17:04:44 +02:00
{
"type" : "string" ,
"name" : "filter" ,
"in" : "query"
} ,
{
"type" : "string" ,
"name" : "next_page_token" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"name" : "page_size" ,
"in" : "query"
} ,
{
"type" : "boolean" ,
"name" : "trimmed" ,
"in" : "query"
} ,
2022-11-20 00:19:41 +01:00
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2022-11-20 00:19:41 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
2023-05-28 17:04:44 +02:00
} ,
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2023-05-28 17:04:44 +02:00
"description" : "ChannelID" ,
"name" : "cid" ,
"in" : "path" ,
"required" : true
2022-11-20 00:19:41 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/handler.ListChannelMessages.response"
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" : {
2023-05-28 17:04:44 +02: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"
}
}
}
2023-05-28 17:04:44 +02:00
}
} ,
"/api/v2/users/{uid}/channels/{cid}/subscriptions" : {
"get" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "List all subscriptions of a channel" ,
"operationId" : "api-chan-subscriptions-list" ,
2022-11-20 00:19:41 +01:00
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-20 00:19:41 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
2022-11-23 19:32:23 +01:00
} ,
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
"description" : "ChannelID" ,
"name" : "cid" ,
"in" : "path" ,
"required" : true
2022-11-20 00:19:41 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/handler.ListChannelSubscriptions.response"
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" : {
2023-05-28 17:04:44 +02: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"
}
}
}
2022-11-23 19:32:23 +01:00
}
} ,
2023-05-28 17:04:44 +02:00
"/api/v2/users/{uid}/clients" : {
2022-11-23 19:32:23 +01:00
"get" : {
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "List all clients" ,
"operationId" : "api-clients-list" ,
2022-11-23 19:32:23 +01:00
"parameters" : [
{
"type" : "string" ,
2023-05-28 17:04:44 +02:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
2022-11-20 00:19:41 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/handler.ListClients.response"
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"
}
}
}
2022-12-21 18:14:13 +01:00
} ,
2022-12-14 18:38:30 +01:00
"post" : {
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Add a new clients" ,
"operationId" : "api-clients-create" ,
2022-12-14 18:38:30 +01:00
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2022-12-14 18:38:30 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : " " ,
"name" : "post_body" ,
"in" : "body" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/handler.AddClient.body"
2022-12-14 18:38:30 +01:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.ClientJSON"
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"
}
} ,
"500" : {
"description" : "internal server error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
} ,
2023-05-28 17:04:44 +02:00
"/api/v2/users/{uid}/clients/{cid}" : {
2022-11-20 00:19:41 +01:00
"get" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Get a single client" ,
"operationId" : "api-clients-get" ,
2022-11-20 00:19:41 +01:00
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-20 00:19:41 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
"description" : "ClientID" ,
2022-11-20 00:19:41 +01:00
"name" : "cid" ,
"in" : "path" ,
"required" : true
2022-11-18 21:25:40 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.ClientJSON"
2022-11-18 21:25:40 +01:00
}
} ,
"400" : {
2022-12-14 14:27:41 +01:00
"description" : "supplied values/parameters cannot be parsed / are invalid" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
2022-11-20 00:19:41 +01:00
"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" : {
2023-05-28 17:04:44 +02:00
"description" : "client not found" ,
2022-11-20 00:19:41 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
2022-11-18 21:25:40 +01:00
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
2022-11-23 19:32:23 +01:00
} ,
2023-05-28 17:04:44 +02:00
"delete" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Delete a client" ,
"operationId" : "api-clients-delete" ,
2022-11-18 23:28:37 +01:00
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-18 23:28:37 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
2022-11-23 19:32:23 +01:00
} ,
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
"description" : "ClientID" ,
2022-11-23 19:32:23 +01:00
"name" : "cid" ,
"in" : "path" ,
"required" : true
2022-11-18 23:28:37 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.ClientJSON"
2022-11-18 23:28:37 +01:00
}
} ,
"400" : {
2022-12-14 14:27:41 +01:00
"description" : "supplied values/parameters cannot be parsed / are invalid" ,
2022-11-18 23:28:37 +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-18 23:28:37 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"404" : {
2023-05-28 17:04:44 +02:00
"description" : "client not found" ,
2022-11-18 23:28:37 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 23:28:37 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
2023-06-10 00:15:42 +02:00
} ,
"patch" : {
"description" : "The body-values are optional, only send the ones you want to update" ,
"tags" : [
"API-v2"
] ,
"summary" : "(Partially) update a client" ,
"operationId" : "api-client-update" ,
"parameters" : [
{
"type" : "string" ,
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
"description" : "ClientID" ,
"name" : "cid" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "Change the clientname (send an empty string to clear it)" ,
"name" : "clientname" ,
"in" : "body" ,
"schema" : {
"type" : "string"
}
} ,
{
"description" : "Send a verification of premium purchase" ,
"name" : "pro_token" ,
"in" : "body" ,
"schema" : {
"type" : "string"
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"$ref" : "#/definitions/models.ClientJSON"
}
} ,
"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"
}
}
}
2022-11-23 19:32:23 +01:00
}
} ,
2023-05-28 17:04:44 +02:00
"/api/v2/users/{uid}/keys" : {
2022-11-23 19:32:23 +01:00
"get" : {
2023-05-28 17:04:44 +02:00
"description" : "The request must be done with an ADMIN key, the returned keys are without their token." ,
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "List keys of the user" ,
"operationId" : "api-tokenkeys-list" ,
2022-11-18 23:28:37 +01:00
"parameters" : [
2022-11-20 00:19:41 +01:00
{
2022-11-23 19:32:23 +01:00
"type" : "string" ,
2022-11-23 22:12:47 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
2022-11-18 23:28:37 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/handler.ListUserKeys.response"
2022-11-18 23:28:37 +01:00
}
} ,
"400" : {
2022-12-14 14:27:41 +01:00
"description" : "supplied values/parameters cannot be parsed / are invalid" ,
2022-11-18 23:28:37 +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-18 23:28:37 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"404" : {
2023-05-28 17:04:44 +02:00
"description" : "message not found" ,
2022-11-18 23:28:37 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 23:28:37 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
2023-05-28 17:04:44 +02:00
} ,
"post" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Create a new key" ,
"operationId" : "api-tokenkeys-create" ,
2022-11-19 12:47:23 +01:00
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2022-11-19 12:47:23 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
2022-11-20 00:19:41 +01:00
} ,
{
2023-05-28 17:04:44 +02:00
"description" : " " ,
"name" : "post_body" ,
"in" : "body" ,
"schema" : {
"$ref" : "#/definitions/handler.CreateUserKey.body"
}
2022-11-19 12:47:23 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.KeyTokenJSON"
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"
}
} ,
"404" : {
2023-05-28 17:04:44 +02:00
"description" : "message not found" ,
2022-11-19 12:47:23 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
2022-11-19 12:50:41 +01:00
}
} ,
"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"
}
}
}
2022-11-23 19:32:23 +01:00
}
} ,
2023-05-28 17:04:44 +02:00
"/api/v2/users/{uid}/keys/{kid}" : {
2022-11-23 19:32:23 +01:00
"get" : {
2023-05-28 17:04:44 +02:00
"description" : "The request must be done with an ADMIN key, the returned key does not include its token." ,
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Get a single key" ,
"operationId" : "api-tokenkeys-get" ,
2022-11-19 12:59:25 +01:00
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-19 12:59:25 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
2022-11-23 22:12:47 +01:00
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
"description" : "TokenKeyID" ,
"name" : "kid" ,
2022-11-23 22:12:47 +01:00
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.KeyTokenJSON"
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"
}
} ,
2023-05-28 17:04:44 +02:00
"404" : {
"description" : "message not found" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
2022-11-23 22:12:47 +01:00
"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"
}
}
}
2023-05-28 17:04:44 +02:00
} ,
"delete" : {
"description" : "Cannot be used to delete the key used in the request itself" ,
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Delete a key" ,
"operationId" : "api-tokenkeys-delete" ,
2022-11-19 12:50:41 +01:00
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-19 12:50:41 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
"description" : "TokenKeyID" ,
"name" : "kid" ,
2022-11-19 12:50:41 +01:00
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.KeyTokenJSON"
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" : {
2023-05-28 17:04:44 +02:00
"description" : "message not found" ,
2022-11-19 12:50:41 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
2022-11-19 12:47:23 +01:00
}
} ,
"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"
}
}
}
2022-11-30 16:46:14 +01:00
} ,
2023-05-28 17:04:44 +02:00
"patch" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
2022-11-13 19:17:07 +01:00
] ,
2023-05-28 17:04:44 +02:00
"summary" : "Update a key" ,
"operationId" : "api-tokenkeys-update" ,
2022-11-23 19:32:23 +01:00
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
2022-11-20 13:18:09 +01:00
"required" : true
} ,
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2023-05-28 17:04:44 +02:00
"description" : "TokenKeyID" ,
"name" : "kid" ,
2022-11-23 19:32:23 +01:00
"in" : "path" ,
2022-11-20 13:18:09 +01:00
"required" : true
2023-05-28 17:04:44 +02:00
} ,
{
"description" : " " ,
"name" : "post_body" ,
"in" : "body" ,
"schema" : {
"$ref" : "#/definitions/handler.UpdateUserKey.body"
}
2022-11-13 19:17:07 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-05-28 17:04:44 +02:00
"$ref" : "#/definitions/models.KeyTokenJSON"
2022-11-13 19:17:07 +01:00
}
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-18 21:25:40 +01:00
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/ginresp.apiError"
2022-11-18 21:25:40 +01:00
}
} ,
2022-11-23 19:32:23 +01:00
"401" : {
2022-12-14 14:27:41 +01:00
"description" : "user is not authorized / has missing permissions" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
2022-11-23 19:32:23 +01:00
} ,
"404" : {
2023-05-28 17:04:44 +02:00
"description" : "message not found" ,
2022-11-18 21:25:40 +01:00
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/ginresp.apiError"
2022-11-18 21:25:40 +01:00
}
} ,
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
2022-11-13 19:17:07 +01:00
}
}
} ,
2023-02-03 22:51:03 +01:00
"/api/v2/users/{uid}/subscriptions" : {
2022-11-18 21:25:40 +01:00
"get" : {
2022-12-22 17:29:59 +01:00
"description" : "The possible values for 'selector' are:\n- \"outgoing_all\" All subscriptions (confirmed/unconfirmed) with the user as subscriber (= subscriptions he can use to read channels)\n- \"outgoing_confirmed\" Confirmed subscriptions with the user as subscriber\n- \"outgoing_unconfirmed\" Unconfirmed (Pending) subscriptions with the user as subscriber\n- \"incoming_all\" All subscriptions (confirmed/unconfirmed) from other users to channels of this user (= incoming subscriptions and subscription requests)\n- \"incoming_confirmed\" Confirmed subscriptions from other users to channels of this user\n- \"incoming_unconfirmed\" Unconfirmed subscriptions from other users to channels of this user (= requests)" ,
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2022-12-21 18:14:13 +01:00
"summary" : "List all subscriptions of a user (incoming/owned)" ,
2022-11-23 19:32:23 +01:00
"operationId" : "api-user-subscriptions-list" ,
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
2022-12-21 18:14:13 +01:00
} ,
{
"enum" : [
2022-12-22 17:29:59 +01:00
"outgoing_all" ,
"outgoing_confirmed" ,
"outgoing_unconfirmed" ,
2022-12-21 18:14:13 +01:00
"incoming_all" ,
"incoming_confirmed" ,
"incoming_unconfirmed"
] ,
"type" : "string" ,
2023-05-28 13:39:20 +02:00
"description" : "Filter subscriptions (default: outgoing_all)" ,
2022-12-21 18:14:13 +01:00
"name" : "selector" ,
"in" : "query" ,
"required" : true
2022-11-23 19:32:23 +01:00
}
] ,
2022-11-18 21:25:40 +01:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-11-23 19:32:23 +01:00
"$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-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"
2022-11-18 21:25:40 +01:00
}
} ,
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
} ,
2022-11-23 19:32:23 +01:00
"post" : {
2022-12-22 12:43:40 +01:00
"description" : "Either [channel_owner_user_id, channel_internal_name] or [channel_id] must be supplied in the request body" ,
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
2022-12-22 12:43:40 +01:00
"summary" : "Create/Request a subscription" ,
2022-11-23 19:32:23 +01:00
"operationId" : "api-subscriptions-create" ,
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
"type" : "string" ,
2022-11-30 16:46:14 +01:00
"name" : "chan_subscribe_key" ,
2022-11-23 19:32:23 +01:00
"in" : "query"
} ,
{
"description" : " " ,
"name" : "post_data" ,
"in" : "body" ,
"schema" : {
"$ref" : "#/definitions/handler.CreateSubscription.body"
}
}
] ,
2022-11-18 21:25:40 +01:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/models.SubscriptionJSON"
}
} ,
"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"
2022-11-18 21:25:40 +01:00
}
} ,
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
2022-11-23 19:32:23 +01:00
}
} ,
2023-02-03 22:51:03 +01:00
"/api/v2/users/{uid}/subscriptions/{sid}" : {
2022-11-23 19:32:23 +01:00
"get" : {
"tags" : [
"API-v2"
] ,
"summary" : "Get a single subscription" ,
"operationId" : "api-subscriptions-get" ,
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "SubscriptionID" ,
"name" : "sid" ,
"in" : "path" ,
"required" : true
}
] ,
2022-11-18 21:25:40 +01:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/models.SubscriptionJSON"
}
} ,
"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" : "subscription not found" ,
2022-11-23 19:32:23 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
2022-11-18 21:25:40 +01:00
}
} ,
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
} ,
"delete" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
"summary" : "Cancel (delete) subscription" ,
"operationId" : "api-subscriptions-delete" ,
"parameters" : [
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
2023-05-28 17:04:44 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "SubscriptionID" ,
"name" : "sid" ,
"in" : "path" ,
"required" : true
}
] ,
2022-11-18 21:25:40 +01:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/models.SubscriptionJSON"
}
} ,
"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" : "subscription not found" ,
2022-11-23 19:32:23 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
2022-11-18 21:25:40 +01:00
}
} ,
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
} ,
"patch" : {
2022-11-23 19:32:23 +01:00
"tags" : [
"API-v2"
] ,
"summary" : "Update a subscription (e.g. confirm)" ,
"operationId" : "api-subscriptions-update" ,
"parameters" : [
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "UserID" ,
"name" : "uid" ,
"in" : "path" ,
"required" : true
} ,
{
2023-06-10 00:15:42 +02:00
"type" : "string" ,
2022-11-23 19:32:23 +01:00
"description" : "SubscriptionID" ,
"name" : "sid" ,
"in" : "path" ,
"required" : true
2022-12-22 17:29:59 +01:00
} ,
{
"description" : " " ,
"name" : "post_data" ,
"in" : "body" ,
"schema" : {
"$ref" : "#/definitions/handler.UpdateSubscription.body"
}
2022-11-23 19:32:23 +01:00
}
] ,
2022-11-18 21:25:40 +01:00
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-11-23 19:32:23 +01:00
"$ref" : "#/definitions/models.SubscriptionJSON"
}
} ,
"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" : "subscription not found" ,
2022-11-23 19:32:23 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
2022-11-18 21:25:40 +01:00
}
} ,
"500" : {
2022-12-14 14:27:41 +01:00
"description" : "internal server error" ,
2022-11-18 21:25:40 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
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-23 19:32:23 +01:00
"tags" : [
"External"
] ,
2022-11-19 15:13:47 +01:00
"summary" : "Send a new message" ,
"parameters" : [
2022-11-20 00:19:41 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "test" ,
2022-11-20 00:19:41 +01:00
"name" : "channel" ,
2022-11-19 15:13:47 +01:00
"in" : "query"
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "This is a message" ,
2022-11-20 00:19:41 +01:00
"name" : "content" ,
2022-11-19 15:13:47 +01:00
"in" : "query"
} ,
2023-04-21 21:45:16 +02:00
{
"type" : "string" ,
"example" : "P3TNH8mvv14fm" ,
"name" : "key" ,
"in" : "query"
} ,
2022-11-30 16:46:14 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "db8b0e6a-a08c-4646" ,
2022-11-30 16:46:14 +01:00
"name" : "msg_id" ,
"in" : "query"
} ,
2022-11-19 15:13:47 +01:00
{
2022-11-30 17:58:04 +01:00
"enum" : [
0 ,
1 ,
2
] ,
2022-11-19 15:13:47 +01:00
"type" : "integer" ,
2022-11-30 17:58:04 +01:00
"example" : 1 ,
2022-11-19 15:13:47 +01:00
"name" : "priority" ,
"in" : "query"
} ,
{
2022-11-30 16:46:14 +01:00
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "example-server" ,
2022-11-30 16:46:14 +01:00
"name" : "sender_name" ,
2022-11-19 15:13:47 +01:00
"in" : "query"
} ,
2022-11-29 11:07:15 +01:00
{
2022-11-30 16:46:14 +01:00
"type" : "number" ,
2022-11-30 17:58:04 +01:00
"example" : 1669824037 ,
2022-11-30 16:46:14 +01:00
"name" : "timestamp" ,
2022-11-29 11:07:15 +01:00
"in" : "query"
} ,
2022-11-19 15:13:47 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "Hello World" ,
2022-11-20 00:19:41 +01:00
"name" : "title" ,
"in" : "query"
} ,
{
2023-01-14 00:48:51 +01:00
"type" : "string" ,
"example" : "7725" ,
2022-11-30 16:46:14 +01:00
"name" : "user_id" ,
2022-11-19 15:13:47 +01:00
"in" : "query"
} ,
{
"description" : " " ,
"name" : "post_body" ,
"in" : "body" ,
"schema" : {
2022-11-30 17:58:04 +01:00
"$ref" : "#/definitions/handler.SendMessage.combined"
2022-11-19 15:13:47 +01:00
}
2022-11-20 21:15:06 +01:00
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "test" ,
2022-11-20 21:15:06 +01:00
"name" : "channel" ,
"in" : "formData"
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "This is a message" ,
2022-11-20 21:15:06 +01:00
"name" : "content" ,
"in" : "formData"
} ,
2023-04-21 21:45:16 +02:00
{
"type" : "string" ,
"example" : "P3TNH8mvv14fm" ,
"name" : "key" ,
"in" : "formData"
} ,
2022-11-20 21:15:06 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "db8b0e6a-a08c-4646" ,
2022-11-20 21:15:06 +01:00
"name" : "msg_id" ,
"in" : "formData"
} ,
{
2022-11-30 17:58:04 +01:00
"enum" : [
0 ,
1 ,
2
] ,
2022-11-20 21:15:06 +01:00
"type" : "integer" ,
2022-11-30 17:58:04 +01:00
"example" : 1 ,
2022-11-20 21:15:06 +01:00
"name" : "priority" ,
"in" : "formData"
} ,
2022-11-29 11:07:15 +01:00
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "example-server" ,
2022-11-29 11:07:15 +01:00
"name" : "sender_name" ,
"in" : "formData"
} ,
2022-11-20 21:15:06 +01:00
{
"type" : "number" ,
2022-11-30 17:58:04 +01:00
"example" : 1669824037 ,
2022-11-20 21:15:06 +01:00
"name" : "timestamp" ,
"in" : "formData"
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"example" : "Hello World" ,
2022-11-20 21:15:06 +01:00
"name" : "title" ,
"in" : "formData"
} ,
{
2023-01-14 00:48:51 +01:00
"type" : "string" ,
"example" : "7725" ,
2022-11-20 21:15:06 +01:00
"name" : "user_id" ,
"in" : "formData"
2022-11-19 15:13:47 +01:00
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-01-16 18:53:22 +01:00
"$ref" : "#/definitions/handler.SendMessage.response"
2022-11-20 03:06:08 +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-20 03:06:08 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"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-20 03:06:08 +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-20 03:06:08 +01:00
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
} ,
"/send.php" : {
"post" : {
"description" : "All parameter can be set via query-parameter or form-data body. Only UserID, UserKey and Title are required" ,
2022-11-23 19:32:23 +01:00
"tags" : [
"External"
] ,
2022-11-20 03:06:08 +01:00
"summary" : "Send a new message (compatibility)" ,
"deprecated" : true ,
"parameters" : [
{
"type" : "string" ,
"name" : "content" ,
"in" : "query"
} ,
2022-11-30 16:46:14 +01:00
{
"type" : "string" ,
"name" : "msg_id" ,
"in" : "query"
} ,
2022-11-20 03:06:08 +01:00
{
"type" : "integer" ,
"name" : "priority" ,
"in" : "query"
} ,
{
"type" : "number" ,
2022-11-30 16:46:14 +01:00
"name" : "timestamp" ,
2022-11-20 03:06:08 +01:00
"in" : "query"
} ,
{
"type" : "string" ,
"name" : "title" ,
"in" : "query"
} ,
{
"type" : "integer" ,
2022-11-30 16:46:14 +01:00
"name" : "user_id" ,
2022-11-20 03:06:08 +01:00
"in" : "query"
} ,
{
"type" : "string" ,
2022-11-30 16:46:14 +01:00
"name" : "user_key" ,
2022-11-20 03:06:08 +01:00
"in" : "query"
} ,
{
"type" : "string" ,
"name" : "content" ,
"in" : "formData"
} ,
2022-11-30 17:58:04 +01:00
{
"type" : "string" ,
"name" : "msg_id" ,
"in" : "formData"
} ,
2022-11-20 03:06:08 +01:00
{
"type" : "integer" ,
"name" : "priority" ,
"in" : "formData"
} ,
{
"type" : "number" ,
2022-11-30 17:58:04 +01:00
"name" : "timestamp" ,
2022-11-20 03:06:08 +01:00
"in" : "formData"
} ,
{
"type" : "string" ,
"name" : "title" ,
"in" : "formData"
} ,
{
"type" : "integer" ,
2022-11-30 17:58:04 +01:00
"name" : "user_id" ,
2022-11-20 03:06:08 +01:00
"in" : "formData"
} ,
{
"type" : "string" ,
2022-11-30 17:58:04 +01:00
"name" : "user_key" ,
2022-11-20 03:06:08 +01:00
"in" : "formData"
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2023-01-16 18:53:22 +01:00
"$ref" : "#/definitions/handler.SendMessageCompat.response"
2022-11-19 15:13:47 +01:00
}
} ,
"400" : {
"description" : "Bad Request" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
"401" : {
"description" : "Unauthorized" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
2022-11-20 00:19:41 +01:00
"403" : {
"description" : "Forbidden" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
} ,
2022-11-19 15:13:47 +01:00
"500" : {
"description" : "Internal Server Error" ,
"schema" : {
"$ref" : "#/definitions/ginresp.apiError"
}
}
}
}
2022-11-18 21:25:40 +01:00
}
} ,
"definitions" : {
2023-04-21 21:45:16 +02:00
"apierr.APIError" : {
"type" : "integer" ,
"enum" : [
-1 ,
0 ,
1101 ,
1102 ,
1103 ,
1104 ,
1105 ,
1106 ,
1121 ,
1151 ,
1152 ,
1153 ,
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
] ,
"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" ,
"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
"type" : "object" ,
"properties" : {
"errhighlight" : {
"type" : "integer"
} ,
"error" : {
"type" : "integer"
} ,
"message" : {
"type" : "string"
} ,
"success" : {
"type" : "boolean"
}
}
} ,
2022-11-20 01:28:32 +01:00
"ginresp.compatAPIError" : {
"type" : "object" ,
"properties" : {
"errid" : {
"type" : "integer"
} ,
"message" : {
"type" : "string"
} ,
"success" : {
"type" : "boolean"
}
}
} ,
2022-11-13 19:17:07 +01:00
"handler.Ack.response" : {
"type" : "object" ,
"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
}
}
} ,
2022-11-19 12:59:25 +01:00
"handler.AddClient.body" : {
"type" : "object" ,
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
"properties" : {
"agent_model" : {
"type" : "string"
} ,
"agent_version" : {
"type" : "string"
} ,
"client_type" : {
"type" : "string"
} ,
"fcm_token" : {
"type" : "string"
}
}
} ,
2022-12-14 18:38:30 +01:00
"handler.CreateChannel.body" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
2022-12-21 18:14:13 +01:00
} ,
"subscribe" : {
"type" : "boolean"
2022-12-14 18:38:30 +01:00
}
}
} ,
2022-11-20 00:19:41 +01:00
"handler.CreateSubscription.body" : {
"type" : "object" ,
"properties" : {
2022-12-22 12:43:40 +01:00
"channel_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-12-22 12:43:40 +01:00
} ,
"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" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
}
}
} ,
2022-11-18 21:25:40 +01:00
"handler.CreateUser.body" : {
"type" : "object" ,
"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"
} ,
2022-11-18 23:28:37 +01:00
"client_type" : {
2022-11-18 21:25:40 +01:00
"type" : "string"
} ,
2022-11-18 23:28:37 +01:00
"fcm_token" : {
2022-11-18 21:25:40 +01:00
"type" : "string"
} ,
2022-11-25 22:42:21 +01:00
"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"
}
}
} ,
2023-04-21 21:45:16 +02:00
"handler.CreateUserKey.body" : {
"type" : "object" ,
"required" : [
"all_channels" ,
"channels" ,
"name" ,
"permissions"
] ,
"properties" : {
"all_channels" : {
"type" : "boolean"
} ,
"channels" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"name" : {
"type" : "string"
} ,
"permissions" : {
"type" : "string"
}
}
} ,
2022-11-13 19:17:07 +01:00
"handler.DatabaseTest.response" : {
"type" : "object" ,
"properties" : {
"libVersion" : {
"type" : "string"
} ,
"libVersionNumber" : {
"type" : "integer"
} ,
"sourceID" : {
"type" : "string"
} ,
"success" : {
"type" : "boolean"
}
}
} ,
"handler.Expand.response" : {
"type" : "object" ,
"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
}
}
} ,
"handler.Health.response" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string"
}
}
} ,
"handler.Info.response" : {
"type" : "object" ,
"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"
}
}
} ,
2022-11-20 00:30:30 +01:00
"handler.ListChannelMessages.response" : {
"type" : "object" ,
"properties" : {
"messages" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/models.MessageJSON"
}
} ,
"next_page_token" : {
"type" : "string"
} ,
"page_size" : {
"type" : "integer"
}
}
} ,
2022-11-20 00:19:41 +01:00
"handler.ListChannelSubscriptions.response" : {
"type" : "object" ,
"properties" : {
"subscriptions" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/models.SubscriptionJSON"
}
}
}
} ,
"handler.ListChannels.response" : {
"type" : "object" ,
"properties" : {
"channels" : {
"type" : "array" ,
"items" : {
2022-12-21 18:14:13 +01:00
"$ref" : "#/definitions/models.ChannelWithSubscriptionJSON"
2022-11-20 00:19:41 +01:00
}
}
}
} ,
"handler.ListClients.response" : {
2022-11-19 12:47:23 +01:00
"type" : "object" ,
"properties" : {
"clients" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/models.ClientJSON"
}
}
}
} ,
2022-11-20 00:19:41 +01:00
"handler.ListMessages.response" : {
"type" : "object" ,
"properties" : {
"messages" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/models.MessageJSON"
}
} ,
"next_page_token" : {
"type" : "string"
} ,
"page_size" : {
"type" : "integer"
}
}
} ,
2023-04-21 21:45:16 +02:00
"handler.ListUserKeys.response" : {
"type" : "object" ,
"properties" : {
2023-05-28 13:39:20 +02:00
"keys" : {
2023-04-21 21:45:16 +02:00
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/models.KeyTokenJSON"
}
}
}
} ,
2022-11-20 00:19:41 +01:00
"handler.ListUserSubscriptions.response" : {
"type" : "object" ,
"properties" : {
"subscriptions" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/models.SubscriptionJSON"
}
}
}
} ,
2022-11-13 19:17:07 +01:00
"handler.Register.response" : {
"type" : "object" ,
"properties" : {
"is_pro" : {
2023-02-03 22:51:03 +01:00
"type" : "boolean"
2022-11-13 19:17:07 +01:00
} ,
"message" : {
"type" : "string"
} ,
"quota" : {
2022-11-13 22:31:28 +01:00
"type" : "integer"
2022-11-13 19:17:07 +01:00
} ,
"quota_max" : {
2022-11-13 22:31:28 +01:00
"type" : "integer"
2022-11-13 19:17:07 +01:00
} ,
"success" : {
2022-11-13 22:31:28 +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"
}
}
} ,
"handler.Requery.response" : {
"type" : "object" ,
"properties" : {
"count" : {
"type" : "integer"
} ,
"data" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/models.CompatMessage"
}
} ,
"message" : {
"type" : "string"
} ,
"success" : {
2022-11-20 01:28:32 +01:00
"type" : "boolean"
2022-11-13 19:17:07 +01:00
}
}
} ,
2022-11-30 17:58:04 +01:00
"handler.SendMessage.combined" : {
2022-11-19 15:13:47 +01:00
"type" : "object" ,
"properties" : {
2022-11-20 00:19:41 +01:00
"channel" : {
2022-11-30 17:58:04 +01:00
"type" : "string" ,
"example" : "test"
2022-11-20 00:19:41 +01:00
} ,
2022-11-20 03:06:08 +01:00
"content" : {
2022-11-30 17:58:04 +01:00
"type" : "string" ,
"example" : "This is a message"
2022-11-19 15:13:47 +01:00
} ,
2023-04-21 21:45:16 +02:00
"key" : {
"type" : "string" ,
"example" : "P3TNH8mvv14fm"
} ,
2022-11-20 00:19:41 +01:00
"msg_id" : {
2022-11-30 17:58:04 +01:00
"type" : "string" ,
"example" : "db8b0e6a-a08c-4646"
2022-11-20 00:19:41 +01:00
} ,
2022-11-19 15:13:47 +01:00
"priority" : {
2022-11-30 17:58:04 +01:00
"type" : "integer" ,
"enum" : [
0 ,
1 ,
2
] ,
"example" : 1
2022-11-19 15:13:47 +01:00
} ,
2022-11-29 11:07:15 +01:00
"sender_name" : {
2022-11-30 17:58:04 +01:00
"type" : "string" ,
"example" : "example-server"
2022-11-29 11:07:15 +01:00
} ,
2022-11-20 00:19:41 +01:00
"timestamp" : {
2022-11-30 17:58:04 +01:00
"type" : "number" ,
"example" : 1669824037
2022-11-20 00:19:41 +01:00
} ,
2022-11-20 03:06:08 +01:00
"title" : {
2022-11-30 17:58:04 +01:00
"type" : "string" ,
"example" : "Hello World"
2022-11-19 15:13:47 +01:00
} ,
2022-11-20 03:06:08 +01:00
"user_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string" ,
"example" : "7725"
2022-11-19 15:13:47 +01:00
}
}
} ,
2023-01-16 18:53:22 +01:00
"handler.SendMessage.response" : {
"type" : "object" ,
"properties" : {
"errhighlight" : {
"type" : "integer"
} ,
"error" : {
2023-04-21 21:45:16 +02:00
"$ref" : "#/definitions/apierr.APIError"
2023-01-16 18:53:22 +01:00
} ,
"is_pro" : {
"type" : "boolean"
} ,
"message" : {
"type" : "string"
} ,
"messagecount" : {
"type" : "integer"
} ,
"quota" : {
"type" : "integer"
} ,
"quota_max" : {
"type" : "integer"
} ,
"scn_msg_id" : {
"type" : "string"
} ,
"success" : {
"type" : "boolean"
} ,
"suppress_send" : {
"type" : "boolean"
}
}
} ,
"handler.SendMessageCompat.response" : {
"type" : "object" ,
"properties" : {
"errhighlight" : {
"type" : "integer"
} ,
"error" : {
2023-04-21 21:45:16 +02:00
"$ref" : "#/definitions/apierr.APIError"
2023-01-16 18:53:22 +01:00
} ,
"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"
}
}
} ,
2022-11-23 20:21:49 +01:00
"handler.Sleep.response" : {
"type" : "object" ,
"properties" : {
"duration" : {
"type" : "number"
} ,
"end" : {
"type" : "string"
} ,
"start" : {
"type" : "string"
}
}
} ,
2022-11-13 19:17:07 +01:00
"handler.Update.response" : {
"type" : "object" ,
"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"
2022-11-18 23:28:37 +01:00
}
}
} ,
2022-12-22 17:29:59 +01:00
"handler.UpdateSubscription.body" : {
"type" : "object" ,
"properties" : {
"confirmed" : {
"type" : "boolean"
}
}
} ,
2023-05-28 13:39:20 +02:00
"handler.UpdateUserKey.body" : {
"type" : "object" ,
"properties" : {
"all_channels" : {
"type" : "boolean"
} ,
"channels" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"name" : {
"type" : "string"
} ,
"permissions" : {
"type" : "string"
}
}
} ,
2022-11-13 19:17:07 +01:00
"handler.Upgrade.response" : {
"type" : "object" ,
"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
}
}
} ,
"handler.pingResponse" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/definitions/handler.pingResponseInfo"
} ,
"message" : {
"type" : "string"
}
}
} ,
"handler.pingResponseInfo" : {
"type" : "object" ,
"properties" : {
"addr" : {
"type" : "string"
} ,
"headers" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
} ,
"method" : {
"type" : "string"
} ,
"request" : {
"type" : "string"
} ,
"uri" : {
"type" : "string"
}
}
} ,
2022-12-21 18:14:13 +01:00
"models.ChannelWithSubscriptionJSON" : {
2022-11-20 00:19:41 +01:00
"type" : "object" ,
"properties" : {
"channel_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
2023-01-13 12:43:20 +01:00
"description_name" : {
"type" : "string"
} ,
2022-12-22 11:22:36 +01:00
"display_name" : {
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
2022-12-22 11:22:36 +01:00
"internal_name" : {
2022-11-20 00:19:41 +01:00
"type" : "string"
} ,
2022-12-22 11:22:36 +01:00
"messages_sent" : {
"type" : "integer"
} ,
2022-11-20 00:19:41 +01:00
"owner_user_id" : {
2023-01-14 00:48:51 +01:00
"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"
} ,
2022-12-21 18:14:13 +01:00
"subscription" : {
"$ref" : "#/definitions/models.SubscriptionJSON"
} ,
2022-11-20 00:19:41 +01:00
"timestamp_created" : {
"type" : "string"
} ,
2022-12-07 23:32:58 +01:00
"timestamp_lastsent" : {
2022-11-20 00:19:41 +01:00
"type" : "string"
}
}
} ,
2022-11-19 12:47:23 +01:00
"models.ClientJSON" : {
"type" : "object" ,
"properties" : {
"agent_model" : {
"type" : "string"
} ,
"agent_version" : {
"type" : "string"
} ,
"client_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-19 12:47:23 +01:00
} ,
"fcm_token" : {
"type" : "string"
} ,
"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" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-19 12:47:23 +01:00
}
}
} ,
2023-04-21 21:45:16 +02:00
"models.ClientType" : {
"type" : "string" ,
"enum" : [
"ANDROID" ,
"IOS"
] ,
"x-enum-varnames" : [
"ClientTypeAndroid" ,
"ClientTypeIOS"
]
} ,
2022-11-13 19:17:07 +01:00
"models.CompatMessage" : {
"type" : "object" ,
"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"
}
}
} ,
2023-04-21 21:45:16 +02:00
"models.KeyTokenJSON" : {
"type" : "object" ,
"properties" : {
"all_channels" : {
"type" : "boolean"
} ,
"channels" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"keytoken_id" : {
"type" : "string"
} ,
"messages_sent" : {
"type" : "integer"
} ,
"name" : {
"type" : "string"
} ,
"owner_user_id" : {
"type" : "string"
} ,
"permissions" : {
"type" : "string"
} ,
"timestamp_created" : {
"type" : "string"
} ,
"timestamp_lastused" : {
"type" : "string"
}
}
} ,
2022-11-20 00:19:41 +01:00
"models.MessageJSON" : {
"type" : "object" ,
"properties" : {
"channel_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
2022-12-22 11:22:36 +01:00
"channel_internal_name" : {
2022-11-20 00:19:41 +01:00
"type" : "string"
} ,
2022-12-07 22:11:44 +01:00
"content" : {
"type" : "string"
} ,
2023-01-14 00:48:51 +01:00
"message_id" : {
"type" : "string"
} ,
2022-11-20 00:19:41 +01:00
"owner_user_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
"priority" : {
"type" : "integer"
} ,
2022-11-29 11:07:15 +01:00
"sender_ip" : {
"type" : "string"
} ,
"sender_name" : {
"type" : "string"
} ,
2022-11-20 00:19:41 +01:00
"sender_user_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
"timestamp" : {
"type" : "string"
} ,
"title" : {
"type" : "string"
} ,
"trimmed" : {
"type" : "boolean"
} ,
2023-05-28 13:39:20 +02:00
"used_key_id" : {
"type" : "string"
} ,
2022-11-20 00:19:41 +01:00
"usr_message_id" : {
2022-11-13 19:17:07 +01:00
"type" : "string"
}
}
2022-11-18 21:25:40 +01:00
} ,
2022-11-20 00:19:41 +01:00
"models.SubscriptionJSON" : {
"type" : "object" ,
"properties" : {
"channel_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
2022-12-22 11:22:36 +01:00
"channel_internal_name" : {
2022-11-20 00:19:41 +01:00
"type" : "string"
} ,
"channel_owner_user_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
"confirmed" : {
"type" : "boolean"
} ,
"subscriber_user_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
"subscription_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-20 00:19:41 +01:00
} ,
"timestamp_created" : {
"type" : "string"
}
}
} ,
2022-11-18 21:25:40 +01:00
"models.UserJSON" : {
"type" : "object" ,
"properties" : {
2022-11-20 22:18:24 +01:00
"default_channel" : {
"type" : "string"
} ,
2022-11-18 21:25:40 +01:00
"is_pro" : {
"type" : "boolean"
} ,
"messages_sent" : {
"type" : "integer"
} ,
2022-12-14 18:38:30 +01:00
"quota_max" : {
2022-11-18 21:25:40 +01:00
"type" : "integer"
2022-11-24 12:53:27 +01:00
} ,
2022-12-14 18:38:30 +01:00
"quota_remaining" : {
"type" : "integer"
} ,
"quota_used" : {
"type" : "integer"
2022-11-24 12:53:27 +01:00
} ,
"timestamp_created" : {
"type" : "string"
} ,
2022-12-07 23:32:58 +01:00
"timestamp_lastread" : {
2022-11-24 12:53:27 +01:00
"type" : "string"
} ,
2022-12-07 23:32:58 +01:00
"timestamp_lastsent" : {
2022-11-24 12:53:27 +01:00
"type" : "string"
} ,
"user_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-24 12:53:27 +01:00
} ,
"username" : {
"type" : "string"
}
}
} ,
2023-04-21 21:45:16 +02:00
"models.UserJSONWithClientsAndKeys" : {
2022-11-24 12:53:27 +01:00
"type" : "object" ,
"properties" : {
"admin_key" : {
"type" : "string"
} ,
"clients" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/models.ClientJSON"
}
} ,
"default_channel" : {
"type" : "string"
} ,
"is_pro" : {
"type" : "boolean"
} ,
"messages_sent" : {
"type" : "integer"
} ,
2022-12-14 18:38:30 +01:00
"quota_max" : {
2022-11-24 12:53:27 +01:00
"type" : "integer"
2022-11-18 21:25:40 +01:00
} ,
2022-12-14 18:38:30 +01:00
"quota_remaining" : {
"type" : "integer"
} ,
"quota_used" : {
"type" : "integer"
2022-11-20 00:19:41 +01:00
} ,
2022-11-18 21:25:40 +01:00
"read_key" : {
"type" : "string"
} ,
"send_key" : {
"type" : "string"
} ,
"timestamp_created" : {
"type" : "string"
} ,
2022-12-07 23:32:58 +01:00
"timestamp_lastread" : {
2022-11-18 21:25:40 +01:00
"type" : "string"
} ,
2022-12-07 23:32:58 +01:00
"timestamp_lastsent" : {
2022-11-18 21:25:40 +01:00
"type" : "string"
} ,
"user_id" : {
2023-01-14 00:48:51 +01:00
"type" : "string"
2022-11-18 21:25:40 +01:00
} ,
"username" : {
"type" : "string"
}
}
2022-11-13 19:17:07 +01:00
}
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"
2022-11-23 19:32:23 +01:00
}
]
2022-11-13 19:17:07 +01:00
}