From 6dd7b328e4113097bbdfb59e1a65c4bdaa4a32a7 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 11 Apr 2026 16:42:44 +0200 Subject: [PATCH 1/3] Add open extensions management endpoints Added endpoints for managing open extensions on DriveItems, including listing, retrieving, creating, updating, and deleting extensions. --- api/openapi-spec/v1.0.yaml | 261 +++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index da69c85..c31d53c 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -2027,6 +2027,227 @@ paths: default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation + '/v1beta1/drives/{drive-id}/items/{item-id}/extensions': + get: + tags: + - driveItem.extensions + summary: List all extensions on a DriveItem + operationId: ListExtensions + description: | + Get the collection of open extensions on the specified DriveItem. + + Each extension is identified by its `extensionName`, which follows a reverse DNS naming convention + (e.g. `com.example.myApp`). + parameters: + - name: drive-id + in: path + description: "key: id of drive" + required: true + schema: + type: string + example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668 + x-ms-docs-key-type: drive + - name: item-id + in: path + description: "key: id of item" + required: true + schema: + type: string + example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id + x-ms-docs-key-type: item + responses: + "200": + description: Retrieved extensions + content: + application/json: + schema: + title: Collection of openTypeExtensions + type: object + properties: + value: + type: array + items: + $ref: '#/components/schemas/openTypeExtension' + examples: + list extensions: + value: + value: + - extensionName: "com.example.project" + status: "reviewed" + assignee: "alice" + - extensionName: "eu.opencloud.workflow" + step: "approval" + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + '/v1beta1/drives/{drive-id}/items/{item-id}/extensions/{extensionName}': + get: + tags: + - driveItem.extensions + summary: Get an extension by name + operationId: GetExtension + description: | + Get a specific open extension identified by the extension name. + parameters: + - name: drive-id + in: path + description: "key: id of drive" + required: true + schema: + type: string + example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668 + x-ms-docs-key-type: drive + - name: item-id + in: path + description: "key: id of item" + required: true + schema: + type: string + example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id + x-ms-docs-key-type: item + - name: extensionName + in: path + description: "The unique name of the extension, using reverse DNS notation (e.g. com.example.myApp)" + required: true + schema: + type: string + example: com.example.project + responses: + "200": + description: Retrieved extension + content: + application/json: + schema: + $ref: '#/components/schemas/openTypeExtension' + examples: + get extension: + value: + extensionName: "com.example.project" + status: "reviewed" + assignee: "alice" + priority: 3 + "404": + description: Extension not found + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + put: + tags: + - driveItem.extensions + summary: Create or update an extension + operationId: UpsertExtension + description: | + Create or update an open extension on the specified DriveItem. + + If the extension does not exist, it is created. If it already exists, the provided properties + are merged with the existing data: + + * Properties included in the request body are added or updated. + * Properties set to `null` are removed from the extension. + * Properties not included in the request body remain unchanged. + + The extension name should follow reverse DNS naming conventions (e.g. `com.example.myApp`) + to avoid collisions between applications. + parameters: + - name: drive-id + in: path + description: "key: id of drive" + required: true + schema: + type: string + example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668 + x-ms-docs-key-type: drive + - name: item-id + in: path + description: "key: id of item" + required: true + schema: + type: string + example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id + x-ms-docs-key-type: item + - name: extensionName + in: path + description: "The unique name of the extension, using reverse DNS notation (e.g. com.example.myApp)" + required: true + schema: + type: string + example: com.example.project + requestBody: + description: Extension properties to set. Use `null` values to remove individual properties. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/openTypeExtensionUpdate' + examples: + create extension: + value: + status: "reviewed" + assignee: "alice" + priority: 3 + update single property: + value: + status: "approved" + remove a property: + value: + priority: null + responses: + "200": + description: Extension updated + content: + application/json: + schema: + $ref: '#/components/schemas/openTypeExtension' + "201": + description: Extension created + content: + application/json: + schema: + $ref: '#/components/schemas/openTypeExtension' + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation + delete: + tags: + - driveItem.extensions + summary: Delete an extension + operationId: DeleteExtension + description: | + Delete an open extension from the specified DriveItem. + + This removes the extension and all its properties. + parameters: + - name: drive-id + in: path + description: "key: id of drive" + required: true + schema: + type: string + example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668 + x-ms-docs-key-type: drive + - name: item-id + in: path + description: "key: id of item" + required: true + schema: + type: string + example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id + x-ms-docs-key-type: item + - name: extensionName + in: path + description: "The unique name of the extension, using reverse DNS notation (e.g. com.example.myApp)" + required: true + schema: + type: string + example: com.example.project + responses: + "204": + description: Extension deleted + "404": + description: Extension not found + default: + $ref: '#/components/responses/error' + x-ms-docs-operation-type: operation '/v1.0/drives/{drive-id}/root': get: tags: @@ -4921,6 +5142,12 @@ components: '@UI.Hidden': description: Properties or facets (see UI.Facet) annotated with this term will not be rendered if the annotation evaluates to true. Users can set this to hide permissions. type: boolean + extensions: + description: The collection of open extensions defined for this DriveItem. Nullable. Returned only on `$expand`. + type: array + items: + $ref: '#/components/schemas/openTypeExtension' + readOnly: true sharingLinkType: type: string enum: [ internal, view, upload, edit, createOnly, blocksDownload ] @@ -5487,6 +5714,40 @@ components: password: type: string description: Password. It may require a password policy. + openTypeExtension: + type: object + description: | + Represents an open extension on a DriveItem, providing a flexible way to attach + untyped custom data to a resource. + + Extensions are identified by their `extensionName`, which should follow reverse DNS + naming conventions (e.g. `com.example.myApp`) to avoid collisions between applications. + properties: + extensionName: + type: string + description: | + The unique identifier of the extension. Use reverse DNS naming conventions + (e.g. `com.example.myApp`). + readOnly: true + additionalProperties: true + example: + extensionName: "com.example.project" + status: "reviewed" + assignee: "alice" + priority: 3 + openTypeExtensionUpdate: + type: object + description: | + Properties to set or remove on an open extension. + + * Properties included in the request body are added or updated. + * Properties set to `null` are removed from the extension. + * Properties not included in the request body remain unchanged. + additionalProperties: + nullable: true + example: + status: "approved" + priority: null audio: type: object description: | From 4f2d9783415e5e0b5c065166ce4727b18a22fc1d Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 11 Apr 2026 18:35:45 +0200 Subject: [PATCH 2/3] fix: copilot review findings --- api/openapi-spec/v1.0.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index c31d53c..0818d80 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -1206,6 +1206,18 @@ paths: type: string example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id x-ms-docs-key-type: item + - name: $expand + in: query + description: Expand related entities + style: form + explode: false + schema: + uniqueItems: true + type: array + items: + enum: + - extensions + type: string responses: "200": description: Retrieved driveItem @@ -2127,7 +2139,7 @@ paths: assignee: "alice" priority: 3 "404": - description: Extension not found + $ref: '#/components/responses/error' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation @@ -2173,7 +2185,11 @@ paths: type: string example: com.example.project requestBody: - description: Extension properties to set. Use `null` values to remove individual properties. + description: | + Extension properties to set. Use `null` values to remove individual properties. + + The `extensionName` is derived from the URL path parameter and must not be included + in the request body. If present, it will be ignored. required: true content: application/json: @@ -2244,7 +2260,7 @@ paths: "204": description: Extension deleted "404": - description: Extension not found + $ref: '#/components/responses/error' default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation From d0030a420ca302e57296499cd7d498b2d1aabfb2 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 11 Apr 2026 19:07:51 +0200 Subject: [PATCH 3/3] fix: copilot review findings --- api/openapi-spec/v1.0.yaml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/api/openapi-spec/v1.0.yaml b/api/openapi-spec/v1.0.yaml index 0818d80..24794d0 100644 --- a/api/openapi-spec/v1.0.yaml +++ b/api/openapi-spec/v1.0.yaml @@ -2068,7 +2068,7 @@ paths: example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id x-ms-docs-key-type: item responses: - "200": + '200': description: Retrieved extensions content: application/json: @@ -2092,7 +2092,7 @@ paths: default: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation - '/v1beta1/drives/{drive-id}/items/{item-id}/extensions/{extensionName}': + '/v1beta1/drives/{drive-id}/items/{item-id}/extensions/{extension-name}': get: tags: - driveItem.extensions @@ -2117,7 +2117,7 @@ paths: type: string example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id x-ms-docs-key-type: item - - name: extensionName + - name: extension-name in: path description: "The unique name of the extension, using reverse DNS notation (e.g. com.example.myApp)" required: true @@ -2125,7 +2125,7 @@ paths: type: string example: com.example.project responses: - "200": + '200': description: Retrieved extension content: application/json: @@ -2138,7 +2138,7 @@ paths: status: "reviewed" assignee: "alice" priority: 3 - "404": + '404': $ref: '#/components/responses/error' default: $ref: '#/components/responses/error' @@ -2177,7 +2177,7 @@ paths: type: string example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id x-ms-docs-key-type: item - - name: extensionName + - name: extension-name in: path description: "The unique name of the extension, using reverse DNS notation (e.g. com.example.myApp)" required: true @@ -2208,13 +2208,13 @@ paths: value: priority: null responses: - "200": + '200': description: Extension updated content: application/json: schema: $ref: '#/components/schemas/openTypeExtension' - "201": + '201': description: Extension created content: application/json: @@ -2249,7 +2249,7 @@ paths: type: string example: a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!share-id x-ms-docs-key-type: item - - name: extensionName + - name: extension-name in: path description: "The unique name of the extension, using reverse DNS notation (e.g. com.example.myApp)" required: true @@ -2257,9 +2257,9 @@ paths: type: string example: com.example.project responses: - "204": + '204': description: Extension deleted - "404": + '404': $ref: '#/components/responses/error' default: $ref: '#/components/responses/error' @@ -5738,6 +5738,8 @@ components: Extensions are identified by their `extensionName`, which should follow reverse DNS naming conventions (e.g. `com.example.myApp`) to avoid collisions between applications. + required: + - extensionName properties: extensionName: type: string