aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/openapi.json
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/openapi.json')
-rw-r--r--apps/dav/openapi.json182
1 files changed, 164 insertions, 18 deletions
diff --git a/apps/dav/openapi.json b/apps/dav/openapi.json
index a235e3bff1d..a0df1cedd16 100644
--- a/apps/dav/openapi.json
+++ b/apps/dav/openapi.json
@@ -42,6 +42,38 @@
}
}
},
+ "CurrentOutOfOfficeData": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OutOfOfficeDataCommon"
+ },
+ {
+ "type": "object",
+ "required": [
+ "id",
+ "startDate",
+ "endDate",
+ "shortMessage"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "startDate": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "endDate": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "shortMessage": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
"OCSMeta": {
"type": "object",
"required": [
@@ -67,32 +99,46 @@
}
},
"OutOfOfficeData": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OutOfOfficeDataCommon"
+ },
+ {
+ "type": "object",
+ "required": [
+ "id",
+ "firstDay",
+ "lastDay",
+ "status"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "firstDay": {
+ "type": "string"
+ },
+ "lastDay": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "OutOfOfficeDataCommon": {
"type": "object",
"required": [
- "id",
"userId",
- "firstDay",
- "lastDay",
- "status",
"message"
],
"properties": {
- "id": {
- "type": "integer",
- "format": "int64"
- },
"userId": {
"type": "string"
},
- "firstDay": {
- "type": "string"
- },
- "lastDay": {
- "type": "string"
- },
- "status": {
- "type": "string"
- },
"message": {
"type": "string"
}
@@ -219,7 +265,7 @@
}
}
},
- "/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}": {
+ "/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}/now": {
"get": {
"operationId": "out_of_office-get-current-out-of-office-data",
"summary": "Get the currently configured out-of-office data of a user.",
@@ -277,6 +323,106 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
+ "$ref": "#/components/schemas/CurrentOutOfOfficeData"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "No out-of-office data was 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/dav/api/v1/outOfOffice/{userId}": {
+ "get": {
+ "operationId": "out_of_office-get-out-of-office",
+ "summary": "Get the configured out-of-office data of a user.",
+ "tags": [
+ "out_of_office"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "userId",
+ "in": "path",
+ "description": "The user id to get out-of-office data for.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "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": "Out-of-office data",
+ "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/OutOfOfficeData"
}
}