Skip to content

Commit

Permalink
docs: DOI versioning documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Krzysztof Nowak <[email protected]>
  • Loading branch information
Krzysztof Nowak authored and lnielsen committed Jul 10, 2017
1 parent 9f6b8b6 commit 31497bd
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/includes/overview/_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ access token):
"edit": "https://zenodo.org/api/deposit/depositions/1234/actions/edit",
"files": "https://zenodo.org/api/deposit/depositions/1234/files",
"publish": "https://zenodo.org/api/deposit/depositions/1234/actions/publish",
"newversion": "https://zenodo.org/api/deposit/depositions/1234/actions/newversion",
"self": "https://zenodo.org/api/deposit/depositions/1234"
},
"metadata": {
Expand Down
4 changes: 4 additions & 0 deletions source/includes/resources/_changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changes

**2017-06-15**

- Added support for DOI versioning as part of deposit actions.

**2016-09-12**

- Added support for search, pagination, sorting and filtering.
Expand Down
39 changes: 39 additions & 0 deletions source/includes/resources/deposit-actions/_newversion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
### New version

Create a new version of a deposition.

This action will create a new deposit, which will be a snapshot of the current resouce, inheriting the metadata as well as snapshot of files.
The new version deposit will have a state similar to a new, unpublished deposit, most importantly its files will be modifiable as for a new deposit.

Only one unpublished new version deposit can be available at any moment, i.e.: calling new version action multiple times will have no effect, as long as the resulting new version deposit from the first call is not published or deleted.

NOTE: The response body of this action is NOT the new version deposit, but the original resource.
The new version deposition can be accessed through the ``"latest_draft"`` under ``"links"`` in the response body.

```shell
curl -i -X POST https://zenodo.org/api/deposit/depositions/1234/actions/newversion?access_token=ACCESS_TOKEN
```

```python
import requests
r = requests.post('https://zenodo.org/api/deposit/depositions/1234/actions/newversion',
params={'access_token': ACCESS_TOKEN})
```

#### HTTP Request

`POST /api/deposit/depositions/:id/actions/newversion`

#### Scopes

`deposit:actions`

#### Success response

* **Code:** `201 Created`
* **Body**: a [deposition](#deposit) resource.

#### Error response

See [HTTP status codes](#http-status-codes) (400 and 500 series errors) and
[error responses](#errors).
1 change: 1 addition & 0 deletions source/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ includes:
- resources/deposit-actions/publish
- resources/deposit-actions/edit
- resources/deposit-actions/discard
- resources/deposit-actions/newversion
- resources/changes
- oai-pmh/root
search: true
Expand Down

0 comments on commit 31497bd

Please sign in to comment.