Skip to content
ShaireDevelopers

pages

6 endpoints.

A page's content comes back as the block tree the editor stores. An integration that wants prose usually wants the ticket routes and the link between them instead.

get/api/pages#

Request
curl https://api.shairelabs.com/api/pages \
  -H "Authorization: Bearer $SHAIRE_TOKEN"

Response · 200 · Page[]

idstring · uuid*
workspaceIdstring · uuid*
parentIdstring · uuid | null*
titlestring*
iconstring | null*
coverobject | null*
kindstring*
uploadpreset
valuestring*
min length 1 · max length 200
urlstring | null*
pathstring*
positionstring*
createdAtstring*
updatedAtstring*

Also answers 401 and 403. SeeErrors.

post/api/pages#

Body

titlestring*
min length 1 · max length 200
parentIdstring · uuid | null
contentobject | null
further keys allowed
typestring*
doc
contentunknown[]
afterIdstring · uuid | null
Request
curl https://api.shairelabs.com/api/pages \
  -X POST \
  -H "Authorization: Bearer $SHAIRE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"example"}'

Response · 201 · PageDetail

idstring · uuid*
workspaceIdstring · uuid*
parentIdstring · uuid | null*
titlestring*
iconstring | null*
coverobject | null*
kindstring*
uploadpreset
valuestring*
min length 1 · max length 200
urlstring | null*
pathstring*
positionstring*
createdAtstring*
updatedAtstring*
contentobject | null*
further keys allowed
typestring*
doc
contentunknown[]

Also answers 401 and 403. SeeErrors.

delete/api/pages/{id}#

Path

idstring*
Request
curl https://api.shairelabs.com/api/pages/$PAGE_ID \
  -X DELETE \
  -H "Authorization: Bearer $SHAIRE_TOKEN"

Response · 204

Also answers 401 and 403. SeeErrors.

post/api/pages/{id}/move#

Path

idstring*

Body

parentIdstring · uuid | null*
afterIdstring · uuid | null
Request
curl https://api.shairelabs.com/api/pages/$PAGE_ID/move \
  -X POST \
  -H "Authorization: Bearer $SHAIRE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"parentId":"00000000-0000-0000-0000-000000000000"}'

Response · 200 · PageDetail

idstring · uuid*
workspaceIdstring · uuid*
parentIdstring · uuid | null*
titlestring*
iconstring | null*
coverobject | null*
kindstring*
uploadpreset
valuestring*
min length 1 · max length 200
urlstring | null*
pathstring*
positionstring*
createdAtstring*
updatedAtstring*
contentobject | null*
further keys allowed
typestring*
doc
contentunknown[]

Also answers 401 and 403. SeeErrors.

get/api/pages/{pageId}/versions#

Path

pageIdstring*
Request
curl https://api.shairelabs.com/api/pages/$PAGE_PAGEID/versions \
  -H "Authorization: Bearer $SHAIRE_TOKEN"

Response · 200 · PageVersionSummary[]

idstring · uuid*
pageIdstring · uuid*
titlestring*
capturedAtstring*
authorobject | null*
idstring · uuid*
namestring*

Also answers 401 and 403. SeeErrors.

post/api/pages/{pageId}/versions/{versionId}/restore#

Path

pageIdstring*
versionIdstring*
Request
curl https://api.shairelabs.com/api/pages/$PAGE_PAGEID/versions/$VERSION_VERSIONID/restore \
  -X POST \
  -H "Authorization: Bearer $SHAIRE_TOKEN"

Response · 200 · PageDetail

idstring · uuid*
workspaceIdstring · uuid*
parentIdstring · uuid | null*
titlestring*
iconstring | null*
coverobject | null*
kindstring*
uploadpreset
valuestring*
min length 1 · max length 200
urlstring | null*
pathstring*
positionstring*
createdAtstring*
updatedAtstring*
contentobject | null*
further keys allowed
typestring*
doc
contentunknown[]

Also answers 401 and 403. SeeErrors.