メインコンテンツへスキップ
GET
/
content
/
api
/
v2
/
pages
/
{page_id}
/
versions
List previous versions of a Page
curl --request GET \
  --url https://api.hubapi.com/content/api/v2/pages/{page_id}/versions
import requests

url = "https://api.hubapi.com/content/api/v2/pages/{page_id}/versions"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.hubapi.com/content/api/v2/pages/{page_id}/versions', 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.hubapi.com/content/api/v2/pages/{page_id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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.hubapi.com/content/api/v2/pages/{page_id}/versions"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.hubapi.com/content/api/v2/pages/{page_id}/versions")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.hubapi.com/content/api/v2/pages/{page_id}/versions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "object": {
      "id": 352531415,
      "name": "Contact Us",
      "slug": "my-api-demo-page-slug",
      "html_title": "The API Test Page",
      "created": 1381896129000,
      "updated": 1441239877000,
      "publish_date": 1424373283000,
      "has_user_changes": true,
      "is_draft": false,
      "portal_id": 62515,
      "subcategory": "site_page",
      "template_path": "generated_layouts/352531305.html"
    },
    "user": {
      "username": "key-api-216.253.207.138",
      "id": "",
      "full_name": "<firstName> <lastName>",
      "email": "key-api-216.253.207.138"
    },
    "version_id": -1,
    "authored_at": 0
  },
  {
    "object": {
      "id": 352531415,
      "name": "Contact Us",
      "slug": "my-api-demo-page-slug",
      "html_title": "The API Test Page",
      "created": 1381896129000,
      "updated": 1441133948000,
      "publish_date": 1424373283000,
      "has_user_changes": true,
      "is_draft": false,
      "portal_id": 62515,
      "subcategory": "site_page",
      "template_path": "generated_layouts/352531305.html"
    },
    "user": {
      "username": "key-api-216.253.207.138",
      "id": "",
      "full_name": "<firstName> <lastName>",
      "email": "key-api-216.253.207.138"
    },
    "version_id": 3280956201,
    "authored_at": 1441133924025
  }
]

パスパラメータ

page_id
string
必須

The unique identifier for the page

レスポンス

200 - application/json

Successful response

最終更新日 2026年4月10日