Revert a commit
curl --request POST \
--url https://nemonist.com/api/v1/folders/{id}/commits/{commit}/revert \
--header 'Authorization: Bearer <token>'import requests
url = "https://nemonist.com/api/v1/folders/{id}/commits/{commit}/revert"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://nemonist.com/api/v1/folders/{id}/commits/{commit}/revert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"message": "<string>",
"reverts": "<string>",
"files": [
{
"path": "<string>",
"status": "<string>",
"reverts": "<string>"
}
]
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}Folders
Revert a commit
A new commit that undoes one commit's note edits, as git revert: each note it changed gets the inverse edit (lines put back, a note it created deleted, a note it deleted restored, a rename renamed back), all in one write, with the message Revert "<message>". History is never rewritten: the reverted commit stays, and the new one can itself be reverted. When a later edit changed the same lines, or a diff was not kept, nothing is written and a 409 names every note and why.
POST
/
folders
/
{id}
/
commits
/
{commit}
/
revert
Revert a commit
curl --request POST \
--url https://nemonist.com/api/v1/folders/{id}/commits/{commit}/revert \
--header 'Authorization: Bearer <token>'import requests
url = "https://nemonist.com/api/v1/folders/{id}/commits/{commit}/revert"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://nemonist.com/api/v1/folders/{id}/commits/{commit}/revert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"message": "<string>",
"reverts": "<string>",
"files": [
{
"path": "<string>",
"status": "<string>",
"reverts": "<string>"
}
]
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": 123,
"type": "<string>"
}
}