You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextcloud-server/apps/sharing/openapi.json

3244 lines
137 KiB

{
"openapi": "3.0.3",
"info": {
"title": "sharing",
"version": "0.0.1",
"description": "TODO",
"license": {
"name": "AGPL-3.0-or-later"
}
},
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
},
"bearer_auth": {
"type": "http",
"scheme": "bearer"
}
},
"schemas": {
"Capabilities": {
"type": "object",
"properties": {
"sharing": {
"type": "object",
"required": [
"api_versions",
"source_types",
"permission_presets"
],
"properties": {
"api_versions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"v1"
]
}
},
"source_types": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SourceType"
}
},
"permission_presets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PermissionPreset"
}
}
}
}
}
},
"Icon": {
"anyOf": [
{
"$ref": "#/components/schemas/IconSVG"
},
{
"$ref": "#/components/schemas/IconURL"
}
]
},
"IconSVG": {
"type": "object",
"required": [
"svg"
],
"properties": {
"svg": {
"type": "string",
"description": "An SVG using the currentColor value for dynamic theming.",
"minLength": 1
}
}
},
"IconURL": {
"type": "object",
"required": [
"light",
"dark"
],
"properties": {
"light": {
"type": "string",
"description": "An absolute URL to an image suitable for light theme.",
"minLength": 1
},
"dark": {
"type": "string",
"description": "An absolute URL to an image suitable for dark theme.",
"minLength": 1
}
}
},
"OCSMeta": {
"type": "object",
"required": [
"status",
"statuscode"
],
"properties": {
"status": {
"type": "string"
},
"statuscode": {
"type": "integer"
},
"message": {
"type": "string"
},
"totalitems": {
"type": "string"
},
"itemsperpage": {
"type": "string"
}
}
},
"Permission": {
"type": "object",
"required": [
"class",
"source_class",
"display_name",
"hint",
"priority",
"presets",
"enabled"
],
"properties": {
"class": {
"type": "string",
"minLength": 1
},
"source_class": {
"type": "string",
"nullable": true,
"minLength": 1
},
"display_name": {
"type": "string",
"minLength": 1
},
"hint": {
"type": "string",
"nullable": true,
"minLength": 1
},
"priority": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 100
},
"presets": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"enabled": {
"type": "boolean"
}
}
},
"PermissionPreset": {
"type": "object",
"required": [
"class",
"display_name",
"hint"
],
"properties": {
"class": {
"type": "string",
"minLength": 1
},
"display_name": {
"type": "string",
"minLength": 1
},
"hint": {
"type": "string",
"nullable": true,
"minLength": 1
}
}
},
"Property": {
"type": "object",
"required": [
"class",
"display_name",
"hint",
"priority",
"required",
"advanced",
"value"
],
"properties": {
"class": {
"type": "string",
"minLength": 1
},
"display_name": {
"type": "string",
"minLength": 1
},
"hint": {
"type": "string",
"nullable": true,
"minLength": 1
},
"priority": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 100
},
"required": {
"type": "boolean"
},
"advanced": {
"type": "boolean"
},
"value": {
"type": "string",
"nullable": true
}
}
},
"PropertyBoolean": {
"allOf": [
{
"$ref": "#/components/schemas/Property"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"boolean"
]
}
}
}
]
},
"PropertyDate": {
"allOf": [
{
"$ref": "#/components/schemas/Property"
},
{
"type": "object",
"required": [
"type",
"min_date",
"max_date"
],
"properties": {
"type": {
"type": "string",
"enum": [
"date"
]
},
"min_date": {
"type": "string",
"nullable": true,
"description": "ISO 8601",
"minLength": 1
},
"max_date": {
"type": "string",
"nullable": true,
"description": "ISO 8601",
"minLength": 1
}
}
}
]
},
"PropertyEnum": {
"allOf": [
{
"$ref": "#/components/schemas/Property"
},
{
"type": "object",
"required": [
"type",
"valid_values"
],
"properties": {
"type": {
"type": "string",
"enum": [
"enum"
]
},
"valid_values": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
}
}
]
},
"PropertyPassword": {
"allOf": [
{
"$ref": "#/components/schemas/Property"
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"password"
]
}
}
}
]
},
"PropertyString": {
"allOf": [
{
"$ref": "#/components/schemas/Property"
},
{
"type": "object",
"required": [
"type",
"min_length",
"max_length"
],
"properties": {
"type": {
"type": "string",
"enum": [
"string"
]
},
"min_length": {
"type": "integer",
"format": "int64",
"nullable": true,
"minimum": 1
},
"max_length": {
"type": "integer",
"format": "int64",
"nullable": true,
"minimum": 1
}
}
}
]
},
"Recipient": {
"type": "object",
"required": [
"class",
"value",
"instance",
"display_name",
"icon",
"secret",
"initiator"
],
"properties": {
"class": {
"type": "string",
"minLength": 1
},
"value": {
"type": "string",
"minLength": 1
},
"instance": {
"type": "string",
"nullable": true,
"minLength": 1
},
"display_name": {
"type": "string",
"minLength": 1
},
"icon": {
"nullable": true,
"allOf": [
{
"$ref": "#/components/schemas/Icon"
}
]
},
"secret": {
"type": "object",
"required": [
"updatable"
],
"properties": {
"updatable": {
"type": "boolean"
},
"value": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"minLength": 1
}
}
},
"initiator": {
"nullable": true,
"allOf": [
{
"$ref": "#/components/schemas/User"
}
]
}
}
},
"Share": {
"type": "object",
"required": [
"id",
"owner",
"last_updated",
"state",
"sources",
"recipients",
"properties",
"permissions",
"permission_preset"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"owner": {
"$ref": "#/components/schemas/User"
},
"last_updated": {
"type": "string",
"description": "Unix time in milliseconds"
},
"state": {
"$ref": "#/components/schemas/State"
},
"sources": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Source"
}
},
"recipients": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Recipient"
}
},
"properties": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/PropertyDate"
},
{
"$ref": "#/components/schemas/PropertyEnum"
},
{
"$ref": "#/components/schemas/PropertyBoolean"
},
{
"$ref": "#/components/schemas/PropertyPassword"
},
{
"$ref": "#/components/schemas/PropertyString"
}
]
}
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Permission"
}
},
"permission_preset": {
"type": "string",
"nullable": true,
"minLength": 1
}
}
},
"Source": {
"type": "object",
"required": [
"class",
"value",
"display_name",
"icon"
],
"properties": {
"class": {
"type": "string",
"minLength": 1
},
"value": {
"type": "string",
"minLength": 1
},
"display_name": {
"type": "string",
"minLength": 1
},
"icon": {
"nullable": true,
"allOf": [
{
"$ref": "#/components/schemas/Icon"
}
]
}
}
},
"SourceType": {
"type": "object",
"required": [
"class"
],
"properties": {
"class": {
"type": "string",
"minLength": 1
}
}
},
"State": {
"type": "string",
"enum": [
"active",
"draft",
"deleted"
]
},
"User": {
"type": "object",
"required": [
"user_id",
"instance",
"display_name",
"icon"
],
"properties": {
"user_id": {
"type": "string",
"minLength": 1
},
"instance": {
"type": "string",
"nullable": true,
"minLength": 1
},
"display_name": {
"type": "string",
"minLength": 1
},
"icon": {
"$ref": "#/components/schemas/Icon"
}
}
}
}
},
"paths": {
"/ocs/v2.php/apps/sharing/api/v1/recipients": {
"get": {
"operationId": "api_v1-search-recipients",
"summary": "Search for recipients that can be added to a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "filterRecipientTypeClasses[]",
"in": "query",
"description": "Type classes of recipients to filter by",
"schema": {
"type": "array",
"nullable": true,
"items": {
"type": "string",
"minLength": 1
}
}
},
{
"name": "query",
"in": "query",
"description": "The query to search for",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "The maximum number of participants",
"schema": {
"type": "integer",
"format": "int64",
"default": 10,
"minimum": 1,
"maximum": 100
}
},
{
"name": "offset",
"in": "query",
"description": "The offset of the participants",
"schema": {
"type": "integer",
"format": "int64",
"default": 0,
"minimum": 0
}
},
{
"name": "id",
"in": "query",
"description": "If provided, recipients that are already part of the share will not be returned.",
"schema": {
"type": "string",
"nullable": true,
"default": null
}
},
{
"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": "Recipients 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": {
"$ref": "#/components/schemas/Recipient"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid recipient search parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share used for filtering existing recipients does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/secret": {
"get": {
"operationId": "api_v1-generate-secret",
"summary": "Generate a new secret.",
"tags": [
"api_v1"
],
"security": [
{},
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"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": "Generated secret returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share": {
"post": {
"operationId": "api_v1-create-share",
"summary": "Create a new share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"201": {
"description": "Share created successfully",
"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/Share"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share/{id}/state": {
"put": {
"operationId": "api_v1-update-share-state",
"summary": "Update the state of a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"$ref": "#/components/schemas/State",
"description": "New state of the share"
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": "Share state updated successfully",
"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/Share"
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid share state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"403": {
"description": "Updating the share state 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share/{id}/source": {
"post": {
"operationId": "api_v1-add-share-source",
"summary": "Add a new source to a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"class",
"value"
],
"properties": {
"class": {
"type": "string",
"description": "Type class of the source",
"minLength": 1
},
"value": {
"type": "string",
"description": "Value of the source",
"minLength": 1
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": "Share source added successfully",
"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/Share"
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid share source",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"403": {
"description": "Adding the share source 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
},
"delete": {
"operationId": "api_v1-remove-share-source",
"summary": "Remove an existing source from a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "class",
"in": "query",
"description": "Type class of the source",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
},
{
"name": "value",
"in": "query",
"description": "Value of the source",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
},
{
"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": "Share source removed successfully",
"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/Share"
}
}
}
}
}
}
}
},
"403": {
"description": "Removing the share source 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share/{id}/recipient": {
"post": {
"operationId": "api_v1-add-share-recipient",
"summary": "Add a new recipient to a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"class",
"value"
],
"properties": {
"class": {
"type": "string",
"description": "Type class of the recipient",
"minLength": 1
},
"value": {
"type": "string",
"description": "Value of the recipient",
"minLength": 1
},
"instance": {
"type": "string",
"nullable": true,
"description": "Instance of the recipient",
"minLength": 1
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": "Share recipient added successfully",
"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/Share"
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid share recipient",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"403": {
"description": "Adding the share recipient 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
},
"delete": {
"operationId": "api_v1-remove-share-recipient",
"summary": "Remove an existing recipient from a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "class",
"in": "query",
"description": "Type class of the recipient",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
},
{
"name": "value",
"in": "query",
"description": "Value of the recipient",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
},
{
"name": "instance",
"in": "query",
"description": "Instance of the recipient",
"schema": {
"type": "string",
"nullable": true,
"minLength": 1
}
},
{
"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": "Share recipient removed successfully",
"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/Share"
}
}
}
}
}
}
}
},
"403": {
"description": "Removing the share recipient 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share/{id}/recipient/secret": {
"put": {
"operationId": "api_v1-update-share-recipient-secret",
"summary": "Update the secret of a recipient.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"class",
"value",
"secret"
],
"properties": {
"class": {
"type": "string",
"description": "Type class of the recipient",
"minLength": 1
},
"value": {
"type": "string",
"description": "Value of the recipient",
"minLength": 1
},
"instance": {
"type": "string",
"nullable": true,
"description": "Instance of the recipient",
"minLength": 1
},
"secret": {
"type": "string",
"description": "Secret of the recipient",
"minLength": 1
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": "Share recipient secret updated successfully",
"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/Share"
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid secret",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"403": {
"description": "Updating the share recipient secret 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share/{id}/property": {
"put": {
"operationId": "api_v1-update-share-property",
"summary": "Update a property of a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"class"
],
"properties": {
"class": {
"type": "string",
"description": "Type class of the property",
"minLength": 1
},
"value": {
"type": "string",
"nullable": true,
"description": "Value of the property"
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": "Share property updated successfully",
"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/Share"
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid share property",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"403": {
"description": "Updating the share property 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share/{id}/permission": {
"put": {
"operationId": "api_v1-update-share-permission",
"summary": "Update a permission of a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"class",
"enabled"
],
"properties": {
"class": {
"type": "string",
"description": "Type class of the permission",
"minLength": 1
},
"enabled": {
"type": "boolean",
"description": "Enabled state of the permission"
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": "Share permission updated successfully",
"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/Share"
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid share permission",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"403": {
"description": "Updating the share permission 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share/{id}/permission/preset": {
"put": {
"operationId": "api_v1-select-share-permission-preset",
"summary": "Select a permission preset for a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"permissionPresetClass"
],
"properties": {
"permissionPresetClass": {
"type": "string",
"description": "New permission preset of the share",
"minLength": 1
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": "Share permission preset selected successfully",
"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/Share"
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid share permission preset",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"403": {
"description": "Selecting the share permission preset 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/share/{id}": {
"delete": {
"operationId": "api_v1-delete-share",
"summary": "Delete a share.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": {
"204": {
"description": "Share deleted"
},
"403": {
"description": "Deleting the share 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": {
"type": "string"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
},
"post": {
"operationId": "api_v1-get-share",
"summary": "Get a share.",
"tags": [
"api_v1"
],
"security": [
{},
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"secret": {
"type": "string",
"nullable": true,
"default": null,
"description": "Secret of the share"
},
"arguments": {
"type": "object",
"default": {},
"description": "Arguments for accessing the share",
"additionalProperties": {
"type": "object"
}
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of the share",
"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": "Share 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/Share"
}
}
}
}
}
}
}
},
"404": {
"description": "Share not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/sharing/api/v1/shares": {
"get": {
"operationId": "api_v1-get-shares",
"summary": "Get multiple shares.",
"tags": [
"api_v1"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "filterSourceTypeClass",
"in": "query",
"description": "Source type class to filter by.",
"schema": {
"type": "string",
"nullable": true,
"minLength": 1
}
},
{
"name": "filterSourceTypeValue",
"in": "query",
"description": "Source type value to filter by.",
"schema": {
"type": "string",
"nullable": true,
"minLength": 1
}
},
{
"name": "lastShareID",
"in": "query",
"description": "The ID of the previous share. This is used as an offset and only shares with higher IDs are returned.",
"schema": {
"type": "string",
"nullable": true
}
},
{
"name": "limit",
"in": "query",
"description": "The number of shares to return.",
"schema": {
"type": "integer",
"format": "int64",
"default": 100,
"minimum": 1,
"maximum": 100
}
},
{
"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": "Shares 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": {
"$ref": "#/components/schemas/Share"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "string"
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
}
},
"tags": []
}