diff --git a/codex/rest/api.nim b/codex/rest/api.nim index 7c7dcd34..0d9e5d80 100644 --- a/codex/rest/api.nim +++ b/codex/rest/api.nim @@ -288,7 +288,7 @@ proc initDataApi(node: CodexNodeRef, repoStore: RepoStore, router: var RestRoute cid: Cid, resp: HttpResponseRef ) -> RestApiResponse: ## Deletes either a single block or an entire dataset - ## from the local node. Does nothing and returns 200 + ## from the local node. Does nothing and returns 204 ## if the dataset is not locally available. ## var headers = buildCorsHeaders("DELETE", allowedOrigin) diff --git a/openapi.yaml b/openapi.yaml index 0c3ca9fe..23c5ead8 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -627,6 +627,26 @@ paths: "500": description: Well it was bad-bad + delete: + summary: "Deletes either a single block or an entire dataset from the local node." + tags: [Data] + operationId: deleteLocal + parameters: + - in: path + name: cid + required: true + schema: + $ref: "#/components/schemas/Cid" + description: Block or dataset to be deleted. + + responses: + "204": + description: Data was successfully deleted. + "400": + description: Invalid CID is specified + "500": + description: There was an error during deletion + "/data/{cid}/network": post: summary: "Download a file from the network to the local node if it's not available locally. Note: Download is performed async. Call can return before download is completed."