Admin Restore Page
curl --request POST \
--url https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"attributes": {
"created_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"draft_version": 123,
"hub_id": "<string>",
"icon": "<string>",
"is_homepage": true,
"last_published_at": "2023-11-07T05:31:56Z",
"meta": {},
"parent_page_id": "<string>",
"position": 123,
"privacy": "<string>",
"purge_at": "2023-11-07T05:31:56Z",
"settings": {},
"slug": "<string>",
"title": "<string>",
"type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"id": "<string>",
"links": {
"self": "<string>"
},
"type": "pages"
}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"code": "<string>",
"detail": "<string>",
"id": "<string>",
"meta": {},
"source": {}
}
],
"meta": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"code": "<string>",
"detail": "<string>",
"id": "<string>",
"meta": {},
"source": {}
}
],
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}pages-admin
Admin Restore Page
Restore a deleted page from the trash, with the sections deleted along with it.
Same authorization as DELETE. The page comes back with its privacy, draft and published tree as they were at deletion, so a published page is served to members again. It never comes back as the hub homepage.
POST
/
api
/
v1
/
teams
/
{team_id}
/
hubs
/
{hub_id}
/
pages
/
{page_id}
/
restore
Admin Restore Page
curl --request POST \
--url https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"attributes": {
"created_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"draft_version": 123,
"hub_id": "<string>",
"icon": "<string>",
"is_homepage": true,
"last_published_at": "2023-11-07T05:31:56Z",
"meta": {},
"parent_page_id": "<string>",
"position": 123,
"privacy": "<string>",
"purge_at": "2023-11-07T05:31:56Z",
"settings": {},
"slug": "<string>",
"title": "<string>",
"type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"id": "<string>",
"links": {
"self": "<string>"
},
"type": "pages"
}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"code": "<string>",
"detail": "<string>",
"id": "<string>",
"meta": {},
"source": {}
}
],
"meta": {}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"code": "<string>",
"detail": "<string>",
"id": "<string>",
"meta": {},
"source": {}
}
],
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
Single-resource JSON:API response for admin page reads.
JSON:API resource object for admin page reads (includes draft_version).
Show child attributes
Show child attributes