From 95ca75dc6fab55ae342d6ef6c81645b5bef759a4 Mon Sep 17 00:00:00 2001 From: mkovalua Date: Fri, 24 Jul 2026 16:16:31 +0300 Subject: [PATCH 1/3] 1.9.1 BE: Update API documentation --- swagger-spec/cedar_metadata/files_list.yaml | 2 ++ swagger-spec/cedar_metadata/nodes_list.yaml | 2 ++ swagger-spec/collections/collected_metadata_list.yaml | 2 ++ swagger-spec/custom_metadata/nodes_list.yaml | 4 +++- swagger-spec/nodes/contributor_detail.yaml | 10 ++++++++++ swagger-spec/nodes/contributors_list.yaml | 5 +++++ swagger-spec/nodes/detail.yaml | 5 +++++ swagger-spec/nodes/draft_registrations_list.yaml | 2 ++ swagger-spec/nodes/identifiers_list.yaml | 3 +++ swagger-spec/nodes/node_settings_list.yaml | 2 ++ .../nodes/relationships_institutions_list.yaml | 6 ++++++ .../nodes/relationships_linked_nodes_list.yaml | 6 ++++++ .../nodes/relationships_linked_registrations_list.yaml | 6 ++++++ swagger-spec/nodes/relationships_subjects_list.yaml | 6 ++++++ swagger-spec/wikis/versions_list.yaml | 2 ++ 15 files changed, 62 insertions(+), 1 deletion(-) diff --git a/swagger-spec/cedar_metadata/files_list.yaml b/swagger-spec/cedar_metadata/files_list.yaml index e3cb1a2..5c68e2b 100644 --- a/swagger-spec/cedar_metadata/files_list.yaml +++ b/swagger-spec/cedar_metadata/files_list.yaml @@ -35,4 +35,6 @@ post: description: You do not have permission to create metadata for this file. '404': description: File not found. + '405': + description: Returned if creating CEDAR metadata records for this file has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/cedar_metadata/nodes_list.yaml b/swagger-spec/cedar_metadata/nodes_list.yaml index b0753d0..8c4772b 100644 --- a/swagger-spec/cedar_metadata/nodes_list.yaml +++ b/swagger-spec/cedar_metadata/nodes_list.yaml @@ -35,4 +35,6 @@ post: description: You do not have permission to create metadata for this node. '404': description: Node not found. + '405': + description: Returned if creating CEDAR metadata records for this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/collections/collected_metadata_list.yaml b/swagger-spec/collections/collected_metadata_list.yaml index 8100626..770af85 100644 --- a/swagger-spec/collections/collected_metadata_list.yaml +++ b/swagger-spec/collections/collected_metadata_list.yaml @@ -326,3 +326,5 @@ post: responses: '201': description: 'OK' + '405': + description: 'Returned if new submissions to this collection are currently restricted. The response will include the message "This action is no longer available. Contact support if you have any questions."' diff --git a/swagger-spec/custom_metadata/nodes_list.yaml b/swagger-spec/custom_metadata/nodes_list.yaml index 16450a5..dc70ce6 100644 --- a/swagger-spec/custom_metadata/nodes_list.yaml +++ b/swagger-spec/custom_metadata/nodes_list.yaml @@ -55,4 +55,6 @@ patch: '403': description: You do not have permission to modify this metadata record. '404': - description: Metadata record not found. \ No newline at end of file + description: Metadata record not found. + '405': + description: Returned if write access to the referenced project has been restricted (this restriction does not apply to metadata records associated with files). The response will include the message "This action is no longer available. Contact support if you have any questions." \ No newline at end of file diff --git a/swagger-spec/nodes/contributor_detail.yaml b/swagger-spec/nodes/contributor_detail.yaml index 863fef8..0c59afd 100644 --- a/swagger-spec/nodes/contributor_detail.yaml +++ b/swagger-spec/nodes/contributor_detail.yaml @@ -126,6 +126,9 @@ patch: If the given user is not already in the contributor list, a 404 Not Found error will be returned. A node must always have at least one admin, and any attempt to downgrade the permissions of a sole admin will result in a 400 Bad Request error. + Some common error cases: + - `405 Method Not Allowed`: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." + parameters: - in: path type: string @@ -151,6 +154,8 @@ patch: responses: '200': description: 'OK' + '405': + description: 'Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions."' delete: summary: Delete a contributor @@ -173,6 +178,9 @@ delete: If the request is unsuccessful, a JSON object with an `errors` key containing information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) to understand why this request may have failed. + Some common error cases: + - `405 Method Not Allowed`: If write access to this node has been restricted, a contributor removing themselves is still permitted, but attempting to remove a different contributor will return this error with the message "This action is no longer available. Contact support if you have any questions." + parameters: - in: path type: string @@ -190,3 +198,5 @@ delete: responses: '204': description: 'No content' + '405': + description: 'If write access to this node has been restricted, a contributor removing themselves is still permitted, but attempting to remove a different contributor will return this error with the message "This action is no longer available. Contact support if you have any questions."' diff --git a/swagger-spec/nodes/contributors_list.yaml b/swagger-spec/nodes/contributors_list.yaml index 2156c75..c01b161 100644 --- a/swagger-spec/nodes/contributors_list.yaml +++ b/swagger-spec/nodes/contributors_list.yaml @@ -148,6 +148,9 @@ post: If the request is unsuccessful, an `errors` key containing information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) to understand why this request may have failed. + Some common error cases: + - `405 Method Not Allowed`: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." + parameters: - in: path type: string @@ -168,3 +171,5 @@ post: responses: '201': description: 'Success' + '405': + description: 'Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions."' diff --git a/swagger-spec/nodes/detail.yaml b/swagger-spec/nodes/detail.yaml index adbea4c..487081a 100644 --- a/swagger-spec/nodes/detail.yaml +++ b/swagger-spec/nodes/detail.yaml @@ -183,6 +183,9 @@ patch: If the request is unsuccessful, an `errors` key containing information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) to understand why this request may have failed. + Some common error cases: + - `405 Method Not Allowed`: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." + parameters: - in: path type: string @@ -214,6 +217,8 @@ patch: responses: '200': description: 'OK' + '405': + description: 'Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions."' delete: summary: Delete a node diff --git a/swagger-spec/nodes/draft_registrations_list.yaml b/swagger-spec/nodes/draft_registrations_list.yaml index 97a7968..3f3c70e 100644 --- a/swagger-spec/nodes/draft_registrations_list.yaml +++ b/swagger-spec/nodes/draft_registrations_list.yaml @@ -173,3 +173,5 @@ post: responses: '201': description: 'Created' + '405': + description: 'Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions."' diff --git a/swagger-spec/nodes/identifiers_list.yaml b/swagger-spec/nodes/identifiers_list.yaml index 99c2602..4f615d1 100644 --- a/swagger-spec/nodes/identifiers_list.yaml +++ b/swagger-spec/nodes/identifiers_list.yaml @@ -182,3 +182,6 @@ post: '404': description: Node not found. Verify the node ID is correct and that you have permission to view the node. + + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/nodes/node_settings_list.yaml b/swagger-spec/nodes/node_settings_list.yaml index 10dafda..b587666 100644 --- a/swagger-spec/nodes/node_settings_list.yaml +++ b/swagger-spec/nodes/node_settings_list.yaml @@ -206,3 +206,5 @@ patch: description: Forbidden. You do not have permission to modify node settings. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/nodes/relationships_institutions_list.yaml b/swagger-spec/nodes/relationships_institutions_list.yaml index 13903bd..dcd7524 100644 --- a/swagger-spec/nodes/relationships_institutions_list.yaml +++ b/swagger-spec/nodes/relationships_institutions_list.yaml @@ -143,6 +143,8 @@ patch: description: Forbidden. You do not have permission to modify institutions for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." post: summary: Add relationships between a Node and Institutions @@ -229,6 +231,8 @@ post: description: Forbidden. You do not have permission to modify institutions for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." delete: summary: Remove relationships between a Node and Institutions @@ -294,3 +298,5 @@ delete: description: Forbidden. You do not have permission to modify institutions for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/nodes/relationships_linked_nodes_list.yaml b/swagger-spec/nodes/relationships_linked_nodes_list.yaml index 6f40d49..fe342ed 100644 --- a/swagger-spec/nodes/relationships_linked_nodes_list.yaml +++ b/swagger-spec/nodes/relationships_linked_nodes_list.yaml @@ -164,6 +164,8 @@ patch: description: Forbidden. You do not have permission to modify linked nodes for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." post: summary: Add relationships between a Node and linked Nodes @@ -252,6 +254,8 @@ post: description: Forbidden. You do not have permission to modify linked nodes for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." delete: summary: Remove relationships between a Node and linked Nodes @@ -317,3 +321,5 @@ delete: description: Forbidden. You do not have permission to modify linked nodes for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/nodes/relationships_linked_registrations_list.yaml b/swagger-spec/nodes/relationships_linked_registrations_list.yaml index 16e31a0..42cb884 100644 --- a/swagger-spec/nodes/relationships_linked_registrations_list.yaml +++ b/swagger-spec/nodes/relationships_linked_registrations_list.yaml @@ -164,6 +164,8 @@ patch: description: Forbidden. You do not have permission to modify linked registrations for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." post: summary: Add relationships between a Node and linked Registrations @@ -252,6 +254,8 @@ post: description: Forbidden. You do not have permission to modify linked registrations for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." delete: summary: Remove relationships between a Node and linked Registrations @@ -317,3 +321,5 @@ delete: description: Forbidden. You do not have permission to modify linked registrations for this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/nodes/relationships_subjects_list.yaml b/swagger-spec/nodes/relationships_subjects_list.yaml index 2ded313..5b43452 100644 --- a/swagger-spec/nodes/relationships_subjects_list.yaml +++ b/swagger-spec/nodes/relationships_subjects_list.yaml @@ -164,6 +164,8 @@ patch: description: Forbidden. You do not have permission to modify subjects on this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." post: summary: Add relationships between a Node and Subjects @@ -252,6 +254,8 @@ post: description: Forbidden. You do not have permission to modify subjects on this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." delete: summary: Remove relationships between a Node and Subjects @@ -317,3 +321,5 @@ delete: description: Forbidden. You do not have permission to modify subjects on this node. '404': description: Not Found. No node matches the given ID. + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/wikis/versions_list.yaml b/swagger-spec/wikis/versions_list.yaml index 6415617..6833503 100644 --- a/swagger-spec/wikis/versions_list.yaml +++ b/swagger-spec/wikis/versions_list.yaml @@ -60,3 +60,5 @@ post: description: You do not have permission to update this wiki page. '404': description: Wiki page not found. + '405': + description: Returned if write access to this wiki has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." From 8394eed436fdf02ad6cef6fd326d4f1fe65413a1 Mon Sep 17 00:00:00 2001 From: mkovalua Date: Wed, 29 Jul 2026 21:50:27 +0300 Subject: [PATCH 2/3] Add WikiDetail and NodeWikiList docs --- swagger-spec/nodes/wikis_list.yaml | 56 +++++++++++++++ swagger-spec/wikis/detail.yaml | 99 +++++++++++++++++++++++++++ swagger-spec/wikis/versions_list.yaml | 2 +- 3 files changed, 156 insertions(+), 1 deletion(-) diff --git a/swagger-spec/nodes/wikis_list.yaml b/swagger-spec/nodes/wikis_list.yaml index 04e57f3..d017ae0 100644 --- a/swagger-spec/nodes/wikis_list.yaml +++ b/swagger-spec/nodes/wikis_list.yaml @@ -89,3 +89,59 @@ get: meta: total: 12 per_page: 10 + +post: + summary: Create a Wiki + description: >- + Creates a new wiki page on the node with the given `name` and, optionally, initial `content`. + + + A wiki page with the given name must not already exist on the node; attempting to create a + duplicate will result in a **409 Conflict** response. + + #### Permissions + + Only contributors with write access to the node may create a wiki page (or any user, if the + node's wiki has been made publicly editable). + + #### Returns + + Returns a JSON object with a `data` key containing the representation of the newly created + wiki, if the request is successful. + + + If the request is unsuccessful, an `errors` key containing information about the failure will + be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) to understand why + this request may have failed. + + Some common error cases: + - `405 Method Not Allowed`: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." + + parameters: + - in: path + type: string + name: node_id + required: true + description: 'The unique identifier of the node.' + - in: body + name: body + required: true + schema: + type: object + example: + data: + type: 'wikis' + attributes: + name: 'A New Page' + content: 'Some initial content for the page.' + tags: + - Nodes + operationId: nodes_wikis_create + x-response-schema: Wiki + consumes: + - application/json + responses: + '201': + description: 'Created' + '405': + description: Returned if write access to this node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/wikis/detail.yaml b/swagger-spec/wikis/detail.yaml index 537494c..cc36fee 100644 --- a/swagger-spec/wikis/detail.yaml +++ b/swagger-spec/wikis/detail.yaml @@ -67,3 +67,102 @@ get: size: 552 type: 'wikis' id: 'xu77p' + +patch: + summary: Update a Wiki + description: >- + Renames the specified wiki page by setting its `name` attribute. This is the only attribute that + can be changed through this endpoint; to update the content of a wiki page, create a new wiki + version instead. + + Wiki pages can be updated with either a **PUT** or **PATCH** request. + + + The `home` wiki page cannot be renamed. + + #### Permissions + + Only contributors with write access to the parent node may rename a wiki page (or any user, if + the node's wiki has been made publicly editable). Wiki pages on registrations cannot be renamed. + + #### Returns + + Returns a JSON object with a `data` key containing the new representation of the updated + wiki, if the request is successful. + + + If the request is unsuccessful, an `errors` key containing + information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) + to understand why this request may have failed. + + Some common error cases: + - `405 Method Not Allowed`: Returned if write access to this wiki's node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." + + parameters: + - in: path + type: string + required: true + name: wiki_id + description: 'The unique identifier of the wiki.' + - in: body + name: body + required: true + schema: + type: object + example: + data: + type: 'wikis' + id: '{wiki_id}' + attributes: + name: 'A new page name' + tags: + - Wikis + operationId: wiki_partial_update + x-response-schema: Wiki + consumes: + - application/json + responses: + '200': + description: 'OK' + '405': + description: Returned if write access to this wiki's node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." + +delete: + summary: Delete a Wiki + description: >- + Permanently deletes the specified wiki page. + + + The `home` wiki page cannot be deleted. + + #### Permissions + + Only contributors with write access to the parent node may delete a wiki page. Wiki pages on + registrations cannot be deleted. + + #### Returns + + If the request is successful, no content is returned. + + + If the request is unsuccessful, a JSON object with an `errors` key containing information about + the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) + to understand why this request may have failed. + + Some common error cases: + - `405 Method Not Allowed`: Returned if write access to this wiki's node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." + + parameters: + - in: path + type: string + required: true + name: wiki_id + description: 'The unique identifier of the wiki.' + tags: + - Wikis + operationId: wiki_delete + responses: + '204': + description: 'No content' + '405': + description: Returned if write access to this wiki's node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." diff --git a/swagger-spec/wikis/versions_list.yaml b/swagger-spec/wikis/versions_list.yaml index 6833503..a232952 100644 --- a/swagger-spec/wikis/versions_list.yaml +++ b/swagger-spec/wikis/versions_list.yaml @@ -61,4 +61,4 @@ post: '404': description: Wiki page not found. '405': - description: Returned if write access to this wiki has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." + description: Returned if write access to this wiki's node has been restricted. The response will include the message "This action is no longer available. Contact support if you have any questions." From 01c423a02335d259ac3687bfd915b1b52e52af3e Mon Sep 17 00:00:00 2001 From: mkovalua Date: Thu, 30 Jul 2026 15:59:10 +0300 Subject: [PATCH 3/3] update cedar metadata doc info --- swagger-spec/cedar_metadata/definition.yaml | 4 ++-- swagger-spec/swagger.yaml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/swagger-spec/cedar_metadata/definition.yaml b/swagger-spec/cedar_metadata/definition.yaml index bf56bd5..083ca4d 100644 --- a/swagger-spec/cedar_metadata/definition.yaml +++ b/swagger-spec/cedar_metadata/definition.yaml @@ -45,7 +45,7 @@ definitions: properties: self: type: string - example: https://api.osf.io/v2/_/cedar_metadata_records/record-abc123/ + example: https://api.osf.io/_/cedar_metadata_records/record-abc123/ metadata_download: type: string - example: https://api.osf.io/v2/_/cedar_metadata_records/record-abc123/metadata_download/ + example: https://api.osf.io/_/cedar_metadata_records/record-abc123/metadata_download/ diff --git a/swagger-spec/swagger.yaml b/swagger-spec/swagger.yaml index 6243eef..7ab6a6c 100644 --- a/swagger-spec/swagger.yaml +++ b/swagger-spec/swagger.yaml @@ -2020,6 +2020,9 @@ paths: /nodes/{node_id}/cedar_metadata_records/: $ref: 'cedar_metadata/nodes_list.yaml' + /_/cedar_metadata_records/{record_id}/: + $ref: 'cedar_metadata/record_detail.yaml' + ####################################### # Custom Metadata # #######################################