Content Versions

List, inspect, and restore prior versions of builder content (pages, posts, landings). The undo/rollback history for human and AI edits.

POST

Restore an entity to an older version; non-destructive, forward history is kept

/organizations/{organizationId}/projects/{projectId}/content-versions/{versionId}/restore

Parameters

organizationId Required
path · string
projectId Required
path · string
versionId Required
path · string

SDK

import { createGiantContext } from "@giantcontext/sdk-typescript";const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const result = await gc.contentVersions.restoreContentVersion({  organizationId: orgs[0].id,  projectId: projects[0].id,  versionId: "ver_123",});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs = gc.me.list_my_organizations().organizationsorg_id = orgs[0].idprojects = gc.projects.list_projects(organization_id=org_id).projectsproject_id = projects[0].idresult = gc.content_versions.restore_content_version(    organization_id=org_id,    project_id=project_id,    version_id="ver_123")
curl -X POST "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content-versions/versionId_uuid/restore" \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{}'
GET

Get one version's snapshot: the document's markup, copy and section data, and its tree

/organizations/{organizationId}/projects/{projectId}/content-versions/{versionId}

Parameters

organizationId Required
path · string
projectId Required
path · string
versionId Required
path · string

SDK

import { createGiantContext } from "@giantcontext/sdk-typescript";const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { contentVersion } = await gc.contentVersions.getContentVersion({  organizationId: orgs[0].id,  projectId: projects[0].id,  versionId: "ver_123"});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs_res = gc.me.list_my_organizations()org_id = orgs_res.organizations[0].idprojects_res = gc.projects.list_projects(organization_id=org_id)project_id = projects_res.projects[0].idversion_id = "your_version_id"content_version = gc.content_versions.get_content_version(    organization_id=org_id,    project_id=project_id,    version_id=version_id)
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content-versions/versionId_uuid" \  -H "Authorization: Bearer $API_KEY"
GET

List one entity's edit history newest first; metadata only, no content snapshots

/organizations/{organizationId}/projects/{projectId}/content-versions

Parameters

page
query · number
pageSize
query · number
lite
query · string
sort
query · string
search
query · string
source
query · string
createdBy
query · string
version
query · string
createdAt
query · string
contentType Required
query · string
contentId Required
query · string
organizationId Required
path · string
projectId Required
path · string

SDK

import { createGiantContext } from "@giantcontext/sdk-typescript";const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });const { organizations: orgs } = await gc.me.listMyOrganizations();const { projects } = await gc.projects.listProjects({ organizationId: orgs[0].id });const { contentVersions } = await gc.contentVersions.listContentVersions({  organizationId: orgs[0].id,  projectId: projects[0].id,  contentType: "example-type",  contentId: "example-content-id",});
import osfrom giantcontext import GiantContextgc = GiantContext(api_key=os.environ["GIANTCONTEXT_API_KEY"])orgs_res = gc.me.list_my_organizations()org_id = orgs_res.organizations[0].idprojects_res = gc.projects.list_projects(organization_id=org_id)project_id = projects_res.projects[0].idtypes_res = gc.builder.get_content_types(organization_id=org_id, project_id=project_id)content_type = types_res.content_types[0]versions_res = gc.content_versions.list_content_versions(    organization_id=org_id,    project_id=project_id,    content_type=content_type,    content_id="content_123")
curl -X GET "https://api.giantcontext.com/organizations/organizationId_uuid/projects/projectId_uuid/content-versions?contentType=developer_doc&contentId=contentId_uuid" \  -H "Authorization: Bearer $API_KEY"
Built Autonomously With AI

This content was built autonomously. Giant Context analyzed the site, determined what was missing, created and submitted an idea and draft, which Giant Context staff accepted and published.

Powered by Giant Context