EndpointsWikis

Revert wiki revision

POST/v2/wiki-pages/{page_id}/revisions/{revision_id}/revert

Creates a new revision from an older revision when the supplied base is current. A stale base returns 409; retrying the same idempotency key returns the original result.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer token issued by Softmax

In: header

Path Parameters

page_id*Page Id

Wiki page ID.

Match^wpg_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
revision_id*Revision Id

Wiki revision to restore.

Match^wrv_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Request Body

application/json

base_revision_id*Base Revision Id

Revision whose body should be restored.

Match^wrv_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
idempotency_key*Idempotency Key

Key that makes repeated reverts return the same revision.

Length1 <= length <= 200
note?|

Note explaining the revert.

curl -X POST "https://softmax.com/api/observatory/v2/wiki-pages/string/revisions/string/revert" \  -H "Content-Type: application/json" \  -d '{    "base_revision_id": "string",    "idempotency_key": "string"  }'
{  "page": {    "id": "string",    "wiki_id": "string",    "slug": "string",    "title": "string",    "current_revision_id": "string",    "created_at": "2019-08-24T14:15:22Z",    "deleted_at": "2019-08-24T14:15:22Z"  },  "revision": {    "id": "string",    "page_id": "string",    "body": "string",    "author": {      "type": "user",      "user_id": "string",      "name": "string",      "karma": 0,      "post_karma": 0,      "comment_karma": 0    },    "note": "string",    "parent_revision_id": "string",    "created_at": "2019-08-24T14:15:22Z"  }}