2023-10-28 18:32:48 +03:00
|
|
|
{
|
|
|
|
"openapi": "3.0.3",
|
|
|
|
"info": {
|
|
|
|
"title": "notifications-full",
|
|
|
|
"version": "0.0.1",
|
|
|
|
"description": "This app provides a backend and frontend for the notification API available in Nextcloud.",
|
|
|
|
"license": {
|
|
|
|
"name": "agpl"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"components": {
|
|
|
|
"securitySchemes": {
|
|
|
|
"basic_auth": {
|
|
|
|
"type": "http",
|
|
|
|
"scheme": "basic"
|
|
|
|
},
|
|
|
|
"bearer_auth": {
|
|
|
|
"type": "http",
|
|
|
|
"scheme": "bearer"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"schemas": {
|
|
|
|
"Capabilities": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"notifications"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"notifications": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs-endpoints",
|
|
|
|
"push",
|
|
|
|
"admin-notifications"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs-endpoints": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"push": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"admin-notifications": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"Notification": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"notification_id",
|
|
|
|
"app",
|
|
|
|
"user",
|
|
|
|
"datetime",
|
|
|
|
"object_type",
|
|
|
|
"object_id",
|
|
|
|
"subject",
|
|
|
|
"message",
|
|
|
|
"link",
|
|
|
|
"actions"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"notification_id": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
},
|
|
|
|
"app": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"user": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"datetime": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"object_type": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"object_id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"subject": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"link": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"actions": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/components/schemas/NotificationAction"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"subjectRich": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"subjectRichParameters": {
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
2024-07-23 10:07:29 +03:00
|
|
|
"$ref": "#/components/schemas/RichObjectParameter"
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"messageRich": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"messageRichParameters": {
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
2024-07-23 10:07:29 +03:00
|
|
|
"$ref": "#/components/schemas/RichObjectParameter"
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"icon": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"shouldNotify": {
|
|
|
|
"type": "boolean"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"NotificationAction": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"label",
|
|
|
|
"link",
|
|
|
|
"type",
|
|
|
|
"primary"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"label": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"link": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"type": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"primary": {
|
|
|
|
"type": "boolean"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"OCSMeta": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"status",
|
|
|
|
"statuscode"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"status": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"statuscode": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"totalitems": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"itemsperpage": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"PushDevice": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"publicKey",
|
|
|
|
"deviceIdentifier",
|
|
|
|
"signature"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"publicKey": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"deviceIdentifier": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"signature": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
2024-07-23 10:07:29 +03:00
|
|
|
},
|
|
|
|
"RichObjectParameter": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"type",
|
|
|
|
"id",
|
|
|
|
"name"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"type": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"server": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"link": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"call-type": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"one2one",
|
|
|
|
"group",
|
|
|
|
"public"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"icon-url": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"message-id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"boardname": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"stackname": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"size": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"path": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"mimetype": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"preview-available": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"yes",
|
|
|
|
"no"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"mtime": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"latitude": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"longitude": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"description": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"thumb": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"website": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"visibility": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"0",
|
|
|
|
"1"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"assignable": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"0",
|
|
|
|
"1"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"conversation": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"etag": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"permissions": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"width": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"height": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"paths": {
|
|
|
|
"/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications": {
|
|
|
|
"get": {
|
|
|
|
"operationId": "endpoint-list-notifications",
|
|
|
|
"summary": "Get all notifications",
|
|
|
|
"tags": [
|
|
|
|
"endpoint"
|
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"description": "Version of the API to use",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v1",
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "Notifications returned",
|
|
|
|
"headers": {
|
|
|
|
"X-Nextcloud-User-Status": {
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/components/schemas/Notification"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"204": {
|
|
|
|
"description": "No app uses notifications",
|
|
|
|
"headers": {
|
|
|
|
"X-Nextcloud-User-Status": {
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"delete": {
|
|
|
|
"operationId": "endpoint-delete-all-notifications",
|
|
|
|
"summary": "Delete all notifications",
|
|
|
|
"tags": [
|
|
|
|
"endpoint"
|
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v1",
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "All notifications deleted successfully",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"403": {
|
|
|
|
"description": "Deleting notification for impersonated user is not allowed",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"nullable": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications/{id}": {
|
|
|
|
"get": {
|
|
|
|
"operationId": "endpoint-get-notification",
|
|
|
|
"summary": "Get a notification",
|
|
|
|
"tags": [
|
|
|
|
"endpoint"
|
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"description": "Version of the API to use",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v1",
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"description": "ID of the notification",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "Notification returned",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"$ref": "#/components/schemas/Notification"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"404": {
|
|
|
|
"description": "Notification not found",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"nullable": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"delete": {
|
|
|
|
"operationId": "endpoint-delete-notification",
|
|
|
|
"summary": "Delete a notification",
|
|
|
|
"tags": [
|
|
|
|
"endpoint"
|
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v1",
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"description": "ID of the notification",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "Notification deleted successfully",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"403": {
|
|
|
|
"description": "Deleting notification for impersonated user is not allowed",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"nullable": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"404": {
|
|
|
|
"description": "Notification not found",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"nullable": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/ocs/v2.php/apps/notifications/api/{apiVersion}/notifications/exists": {
|
|
|
|
"post": {
|
|
|
|
"operationId": "endpoint-confirm-ids-for-user",
|
|
|
|
"summary": "Check if notification IDs exist",
|
|
|
|
"tags": [
|
|
|
|
"endpoint"
|
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
2024-07-23 10:07:29 +03:00
|
|
|
"requestBody": {
|
|
|
|
"required": true,
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ids"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ids": {
|
|
|
|
"type": "array",
|
|
|
|
"description": "IDs of the notifications to check",
|
|
|
|
"items": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
2024-07-23 10:07:29 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
2023-10-28 18:32:48 +03:00
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"description": "Version of the API to use",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v1",
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "Existing notification IDs returned",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Too many notification IDs requested",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/ocs/v2.php/apps/notifications/api/{apiVersion}/settings": {
|
|
|
|
"post": {
|
|
|
|
"operationId": "settings-personal",
|
|
|
|
"summary": "Update personal notification settings",
|
|
|
|
"tags": [
|
|
|
|
"settings"
|
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
2024-07-23 10:07:29 +03:00
|
|
|
"requestBody": {
|
|
|
|
"required": true,
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"batchSetting",
|
|
|
|
"soundNotification",
|
|
|
|
"soundTalk"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"batchSetting": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64",
|
|
|
|
"description": "How often E-mails about missed notifications should be sent (hourly: 1; every three hours: 2; daily: 3; weekly: 4)"
|
|
|
|
},
|
|
|
|
"soundNotification": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Enable sound for notifications ('yes' or 'no')"
|
|
|
|
},
|
|
|
|
"soundTalk": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Enable sound for Talk notifications ('yes' or 'no')"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
2024-07-23 10:07:29 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
2023-10-28 18:32:48 +03:00
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "Personal settings updated",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"/ocs/v2.php/apps/notifications/api/{apiVersion}/admin_notifications/{userId}": {
|
2023-10-28 18:32:48 +03:00
|
|
|
"post": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"operationId": "api-generate-notification",
|
2024-07-23 10:07:29 +03:00
|
|
|
"summary": "Generate a notification for a user (deprecated, use v3 instead)",
|
2024-01-24 12:34:53 +03:00
|
|
|
"description": "This endpoint requires admin access",
|
2024-07-23 10:07:29 +03:00
|
|
|
"deprecated": true,
|
2023-10-28 18:32:48 +03:00
|
|
|
"tags": [
|
2024-01-24 12:34:53 +03:00
|
|
|
"api"
|
2023-10-28 18:32:48 +03:00
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
2024-07-23 10:07:29 +03:00
|
|
|
"requestBody": {
|
|
|
|
"required": true,
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"shortMessage"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"shortMessage": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Subject of the notification"
|
|
|
|
},
|
|
|
|
"longMessage": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "",
|
|
|
|
"description": "Message of the notification"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
2024-07-23 10:07:29 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
2023-10-28 18:32:48 +03:00
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
2024-01-24 12:34:53 +03:00
|
|
|
"v1",
|
2023-10-28 18:32:48 +03:00
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
{
|
|
|
|
"name": "userId",
|
|
|
|
"in": "path",
|
|
|
|
"description": "ID of the user",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2023-10-28 18:32:48 +03:00
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"description": "Notification generated successfully",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"data": {}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"400": {
|
|
|
|
"description": "Generating notification is not possible",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"nullable": true
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"404": {
|
|
|
|
"description": "User not found",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"nullable": true
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"500": {
|
|
|
|
"description": "",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"data": {
|
|
|
|
"nullable": true
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-24 12:34:53 +03:00
|
|
|
}
|
|
|
|
},
|
2024-07-23 10:07:29 +03:00
|
|
|
"/ocs/v2.php/apps/notifications/api/{apiVersion3}/admin_notifications/{userId}": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"post": {
|
2024-07-23 10:07:29 +03:00
|
|
|
"operationId": "api-generate-notification-v3",
|
|
|
|
"summary": "Generate a notification with rich object parameters for a user",
|
2024-01-24 12:34:53 +03:00
|
|
|
"description": "This endpoint requires admin access",
|
2023-10-28 18:32:48 +03:00
|
|
|
"tags": [
|
2024-07-23 10:07:29 +03:00
|
|
|
"api"
|
2023-10-28 18:32:48 +03:00
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
2024-07-23 10:07:29 +03:00
|
|
|
"requestBody": {
|
|
|
|
"required": false,
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"subject": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "",
|
|
|
|
"description": "Subject of the notification"
|
|
|
|
},
|
|
|
|
"message": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "",
|
|
|
|
"description": "Message of the notification"
|
|
|
|
},
|
|
|
|
"subjectParameters": {
|
|
|
|
"type": "object",
|
2024-08-21 12:14:10 +03:00
|
|
|
"default": {},
|
2024-07-23 10:07:29 +03:00
|
|
|
"description": "Rich objects to fill the subject placeholders, {@see \\OCP\\RichObjectStrings\\Definitions}",
|
|
|
|
"additionalProperties": {
|
|
|
|
"$ref": "#/components/schemas/RichObjectParameter"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"messageParameters": {
|
|
|
|
"type": "object",
|
2024-08-21 12:14:10 +03:00
|
|
|
"default": {},
|
2024-07-23 10:07:29 +03:00
|
|
|
"description": "Rich objects to fill the message placeholders, {@see \\OCP\\RichObjectStrings\\Definitions}",
|
|
|
|
"additionalProperties": {
|
|
|
|
"$ref": "#/components/schemas/RichObjectParameter"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-10-28 18:32:48 +03:00
|
|
|
"parameters": [
|
2024-01-24 12:34:53 +03:00
|
|
|
{
|
2024-07-23 10:07:29 +03:00
|
|
|
"name": "apiVersion3",
|
|
|
|
"in": "path",
|
2024-01-24 12:34:53 +03:00
|
|
|
"required": true,
|
|
|
|
"schema": {
|
2024-07-23 10:07:29 +03:00
|
|
|
"type": "string",
|
|
|
|
"pattern": "^(v3)$"
|
2024-01-24 12:34:53 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2024-07-23 10:07:29 +03:00
|
|
|
"name": "userId",
|
|
|
|
"in": "path",
|
|
|
|
"description": "ID of the user",
|
2024-01-24 12:34:53 +03:00
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2024-07-23 10:07:29 +03:00
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
2024-01-24 12:34:53 +03:00
|
|
|
"required": true,
|
|
|
|
"schema": {
|
2024-07-23 10:07:29 +03:00
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "Notification generated successfully, returned id is the notification ID for future delete requests",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"id"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-24 12:34:53 +03:00
|
|
|
}
|
|
|
|
},
|
2024-07-23 10:07:29 +03:00
|
|
|
"400": {
|
|
|
|
"description": "Provided data was invalid, check error field of the response of log file for details",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"error"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"error": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/ocs/v2.php/apps/notifications/api/{apiVersion}/settings/admin": {
|
|
|
|
"post": {
|
|
|
|
"operationId": "settings-admin",
|
|
|
|
"summary": "Update default notification settings for new users",
|
|
|
|
"description": "This endpoint requires admin access",
|
|
|
|
"tags": [
|
|
|
|
"settings"
|
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"requestBody": {
|
|
|
|
"required": true,
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"batchSetting",
|
|
|
|
"soundNotification",
|
|
|
|
"soundTalk"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"batchSetting": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64",
|
|
|
|
"description": "How often E-mails about missed notifications should be sent (hourly: 1; every three hours: 2; daily: 3; weekly: 4)"
|
|
|
|
},
|
|
|
|
"soundNotification": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Enable sound for notifications ('yes' or 'no')"
|
|
|
|
},
|
|
|
|
"soundTalk": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Enable sound for Talk notifications ('yes' or 'no')"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
2023-10-28 18:32:48 +03:00
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"description": "Admin settings updated",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-24 12:34:53 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/ocs/v2.php/apps/notifications/api/{apiVersion}/push": {
|
|
|
|
"post": {
|
|
|
|
"operationId": "push-register-device",
|
|
|
|
"summary": "Register device for push notifications",
|
|
|
|
"tags": [
|
|
|
|
"push"
|
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
2023-10-28 18:32:48 +03:00
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
2024-07-23 10:07:29 +03:00
|
|
|
"requestBody": {
|
|
|
|
"required": true,
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"pushTokenHash",
|
|
|
|
"devicePublicKey",
|
|
|
|
"proxyServer"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"pushTokenHash": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Hash of the push token"
|
|
|
|
},
|
|
|
|
"devicePublicKey": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Public key of the device"
|
|
|
|
},
|
|
|
|
"proxyServer": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "Proxy server to be used"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-24 12:34:53 +03:00
|
|
|
}
|
2024-07-23 10:07:29 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"parameters": [
|
2024-01-24 12:34:53 +03:00
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "Device was already registered",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"data": {
|
|
|
|
"$ref": "#/components/schemas/PushDevice"
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"201": {
|
|
|
|
"description": "Device registered successfully",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"data": {
|
|
|
|
"$ref": "#/components/schemas/PushDevice"
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"description": "Registering device is not possible",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"message"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-24 12:34:53 +03:00
|
|
|
},
|
|
|
|
"401": {
|
|
|
|
"description": "Missing permissions to register device",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
2024-01-24 12:34:53 +03:00
|
|
|
},
|
|
|
|
"delete": {
|
|
|
|
"operationId": "push-remove-device",
|
|
|
|
"summary": "Remove a device from push notifications",
|
2023-10-28 18:32:48 +03:00
|
|
|
"tags": [
|
2024-01-24 12:34:53 +03:00
|
|
|
"push"
|
2023-10-28 18:32:48 +03:00
|
|
|
],
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"bearer_auth": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"basic_auth": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "apiVersion",
|
|
|
|
"in": "path",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"v2"
|
|
|
|
],
|
|
|
|
"default": "v2"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "OCS-APIRequest",
|
|
|
|
"in": "header",
|
|
|
|
"description": "Required to be true for the API request to pass",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"description": "No device registered",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"202": {
|
|
|
|
"description": "Device removed successfully",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"data": {}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"401": {
|
|
|
|
"description": "Missing permissions to remove device",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"data": {}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-01-24 12:34:53 +03:00
|
|
|
"400": {
|
|
|
|
"description": "Removing device is not possible",
|
2023-10-28 18:32:48 +03:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"ocs"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"ocs": {
|
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"meta",
|
|
|
|
"data"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"meta": {
|
|
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
|
|
},
|
|
|
|
"data": {
|
2024-01-24 12:34:53 +03:00
|
|
|
"type": "object",
|
|
|
|
"required": [
|
|
|
|
"message"
|
|
|
|
],
|
|
|
|
"properties": {
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
2023-10-28 18:32:48 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tags": []
|
2024-07-23 10:07:29 +03:00
|
|
|
}
|