List previous versions of the blog post
curl --request GET \
--url https://api.hubapi.com/content/api/v2/blog-posts/{blog_post_id}/versionsimport requests
url = "https://api.hubapi.com/content/api/v2/blog-posts/{blog_post_id}/versions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/content/api/v2/blog-posts/{blog_post_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/blog-posts/{blog_post_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/blog-posts/{blog_post_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/blog-posts/{blog_post_id}/versions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/content/api/v2/blog-posts/{blog_post_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[
{
"id": 123,
"object": {
"id": 123,
"portal_id": 123,
"name": "<string>",
"html_title": "<string>",
"slug": "<string>",
"content_group_id": 123,
"blog_author_id": 123,
"post_body": "<string>",
"post_summary": "<string>",
"meta_description": "<string>",
"featured_image": "<string>",
"head_html": "<string>",
"footer_html": "<string>",
"campaign": "<string>",
"campaign_name": "<string>",
"publish_date": 123,
"publish_immediately": true,
"created": 123,
"updated": 123,
"archived_at": 123,
"is_draft": true,
"url": "<string>",
"published_url": "<string>",
"topic_ids": [
123
],
"keywords": [
{}
],
"use_featured_image": true,
"widgets": {}
},
"updated_at": 123,
"user": {
"id": 123
}
}
]v2
List previous versions of the blog post
Get the previous versions of a blog post.
GET
/
content
/
api
/
v2
/
blog-posts
/
{blog_post_id}
/
versions
List previous versions of the blog post
curl --request GET \
--url https://api.hubapi.com/content/api/v2/blog-posts/{blog_post_id}/versionsimport requests
url = "https://api.hubapi.com/content/api/v2/blog-posts/{blog_post_id}/versions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/content/api/v2/blog-posts/{blog_post_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/blog-posts/{blog_post_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/blog-posts/{blog_post_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/blog-posts/{blog_post_id}/versions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/content/api/v2/blog-posts/{blog_post_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[
{
"id": 123,
"object": {
"id": 123,
"portal_id": 123,
"name": "<string>",
"html_title": "<string>",
"slug": "<string>",
"content_group_id": 123,
"blog_author_id": 123,
"post_body": "<string>",
"post_summary": "<string>",
"meta_description": "<string>",
"featured_image": "<string>",
"head_html": "<string>",
"footer_html": "<string>",
"campaign": "<string>",
"campaign_name": "<string>",
"publish_date": 123,
"publish_immediately": true,
"created": 123,
"updated": 123,
"archived_at": 123,
"is_draft": true,
"url": "<string>",
"published_url": "<string>",
"topic_ids": [
123
],
"keywords": [
{}
],
"use_featured_image": true,
"widgets": {}
},
"updated_at": 123,
"user": {
"id": 123
}
}
]最終更新日 2026年4月10日
⌘I