Skip to content

Commit

Permalink
docs: clarify replace operation (#61)
Browse files Browse the repository at this point in the history
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
  • Loading branch information
lidel and jessicaschilling authored Sep 11, 2020
1 parent c9050a4 commit 0e97a38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ipfs-pinning-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ The user sends a `Pin` object to `POST /pins` and receives a `PinStatus` respons
In this case, the user can periodically check pinning progress via `GET /pins/{id}` until pinning is successful, or the user decides to remove the pending pin.
### Modifying an existing pin object
### Replacing an existing pin object
The user can modify an existing pin object via `POST /pins/{id}`. The new pin object `id` is returned in the `PinStatus` response. The old pin object is deleted automatically.
The user can replace an existing pin object via `POST /pins/{id}`. This is a shortcut for removing a pin object identified by `id` and creating a new one in a single API call that protects against undesired garbage collection of blocks common to both pins. Useful when updating a pin representing a huge dataset where most of blocks did not change. The new pin object `id` is returned in the `PinStatus` response. The old pin object is deleted automatically.
### Removing a pin object
Expand Down Expand Up @@ -255,8 +255,8 @@ paths:
'500':
$ref: '#/components/responses/InternalServerError'
post:
summary: Modify pin object
description: Modify an existing pin object
summary: Replace pin object
description: Replace an existing pin object (shortcut for executing remove and add operations in one step to avoid unnecessary garbage collection of blocks present in both recursive pins)
tags:
- pins
requestBody:
Expand Down

0 comments on commit 0e97a38

Please sign in to comment.