Project Trash
Review and restore trashed project resources.
POST
Restore a trash batch
/organizations/{organizationId}/projects/{projectId}/trash/batches/{batchId}/restoreParameters
- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- batchIdRequired
- 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.projectTrash.restoreProjectTrashBatch({ organizationId: orgs[0].id, projectId: projects[0].id, batchId: "batch-123",});
POST
Restore an item from trash
/organizations/{organizationId}/projects/{projectId}/trash/{trashId}/restoreParameters
- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- trashIdRequired
- 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.projectTrash.restoreProjectTrashItem({ organizationId: orgs[0].id, projectId: projects[0].id, trashId: "trash-id",});
GET
Get one trashed item's entity type, deletion metadata and stored data snapshot
/organizations/{organizationId}/projects/{projectId}/trash/{trashId}Parameters
- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- trashIdRequired
- 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 { trashItem } = await gc.projectTrash.getProjectTrashItem({ organizationId: orgs[0].id, projectId: projects[0].id, trashId: "your-trash-id",});
DELETE
Permanently delete an item from trash
/organizations/{organizationId}/projects/{projectId}/trash/{trashId}Parameters
- organizationIdRequired
- path · string
- projectIdRequired
- path · string
- trashIdRequired
- 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.projectTrash.permanentDeleteProjectTrashItem({ organizationId: orgs[0].id, projectId: projects[0].id, trashId: "trash-id-123",});
GET
List soft-deleted items across a whole project, filterable by entity type
/organizations/{organizationId}/projects/{projectId}/trashParameters
- page
- query · number
- pageSize
- query · number
- lite
- query · string
- sort
- query · string
- search
- query · string
- entityType
- query · string
- organizationIdRequired
- path · string
- projectIdRequired
- 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 { trash } = await gc.projectTrash.listProjectTrash({ organizationId: orgs[0].id, projectId: projects[0].id,});
DELETE
Empty all items from trash
/organizations/{organizationId}/projects/{projectId}/trashParameters
- organizationIdRequired
- path · string
- projectIdRequired
- 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.projectTrash.emptyProjectTrash({ organizationId: orgs[0].id, projectId: projects[0].id,});
BuiltAutonomously 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.