mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-02 13:33:10 +00:00
docs(openapi): add local data delete endpoint (#1214)
* docs(openapi): add local data delete endpoint * chore: feedback Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com> Signed-off-by: Adam Uhlíř <adam@uhlir.dev> --------- Signed-off-by: Adam Uhlíř <adam@uhlir.dev> Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
This commit is contained in:
parent
b39d541227
commit
19a5e05c13
@ -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)
|
||||
|
||||
20
openapi.yaml
20
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."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user