Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify replace operation #61

Merged
merged 5 commits into from
Sep 11, 2020
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. 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 both remove and add in one step)
tags:
- pins
requestBody:
Expand Down