API reference

Drive

Files and folders in organizations and personal spaces: drives, uploads, versions, sharing, links, trash, search and ZIP downloads.
POST/v1/hooks/drive/links/:token/unlock

Checks a link's password and answers a grant for 12 hours, sent as x-si-link-grant with the link's other calls. 10 wrong passwords per link lock it for 15 minutes.

Auth
None.

Path parameters

  • token

    A secret from a link: an issue automation rule's incoming-webhook token (shown once when issued), a map's share link, a notification recipient's confirm and unsubscribe link, a Drive public link (/l/<token>), a Vehicles drive's share link, or a Mirage interaction's token (itk_…, sent with the interaction, good for 15 minutes), or the token in the link to a file of a message Mirage sent to Discord, or a Marketing link's sealed token (a tracked click, the open pixel, unsubscribe and the preference centre, a double opt-in confirmation); or a Food recipe's public link (/r/<token>) or a household's calendar feed.

Request body

  • passwordstringrequired

    1–200 characters.

curl -X POST 'https://api.cactive.com.au/v1/hooks/drive/links/{token}/unlock' \
  -H 'Content-Type: application/json' \
  -d '{
    "password": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  grant: string
  expiresAt: number
}
POST/v1/hooks/drive/links/:token/archives

Starts a ZIP of the shared folder (or itemIds inside it); photos are cleaned of location details.

Auth
None.

Path parameters

  • token

    A secret from a link: an issue automation rule's incoming-webhook token (shown once when issued), a map's share link, a notification recipient's confirm and unsubscribe link, a Drive public link (/l/<token>), a Vehicles drive's share link, or a Mirage interaction's token (itk_…, sent with the interaction, good for 15 minutes), or the token in the link to a file of a message Mirage sent to Discord, or a Marketing link's sealed token (a tracked click, the open pixel, unsubscribe and the preference centre, a double opt-in confirmation); or a Food recipe's public link (/r/<token>) or a household's calendar feed.

Request body

  • itemIdsstring[]

    Up to 500 items. Each up to 64 characters.

curl -X POST 'https://api.cactive.com.au/v1/hooks/drive/links/{token}/archives' \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 202

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    error?: string
  }
}
GET/v1/orgs/:orgId/drive/drives

My Drive, the shared drives the caller belongs to (every one, to manage, for org admins) and storage use.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/drives' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  usage: {
    bytes: number
    files: number
    limit: number
  }
  personal: boolean
  myDrive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
  sharedDrives: {
    member: boolean
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }[]
}
POST/v1/orgs/:orgId/drive/drives

Creates a shared drive; the caller becomes its manager. Not in personal spaces; not for viewers.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • namestringrequired

    1–255 characters.

  • descriptionstring

    Up to 500 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/drives' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example"
  }'
Send it from this page with your session or a key.

Response 201

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
}
GET/v1/orgs/:orgId/drive/drives/:driveId

A drive with its members (shared drives) and whether the caller can manage them.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/drives/{driveId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
  members: {
    principalId: string
    type: "user" | "team"
    role: "viewer" | "commenter" | "editor" | "manager"
    addedBy: string
    addedAt: number
  }[]
  canManage: boolean
}
PATCH/v1/orgs/:orgId/drive/drives/:driveId

Renames a shared drive or changes its description (managers, and org owners and admins).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Request body

  • namestring

    1–255 characters.

  • descriptionstringor null

    Up to 500 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/drives/{driveId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "description": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
}
DELETE/v1/orgs/:orgId/drive/drives/:driveId

Deletes an empty shared drive (its trash too must be empty).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/drives/{driveId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

PUT/v1/orgs/:orgId/drive/drives/:driveId/members/:principalId

Adds a person or team to a shared drive, or changes their role (viewer, commenter, editor, manager). A drive always keeps a manager who is a person.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

  • principalId

    A person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Request body

  • role"viewer" | "commenter" | "editor" | "manager"required

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/drives/{driveId}/members/{principalId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "role": "viewer"
  }'
Send it from this page with your session or a key.

Response 200

{
  ok: true
}
DELETE/v1/orgs/:orgId/drive/drives/:driveId/members/:principalId

Removes a member (anyone may remove themselves).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

  • principalId

    A person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/drives/{driveId}/members/{principalId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

GET/v1/orgs/:orgId/drive/usage

Storage the space uses (every version, the trash included) and its limit, in bytes.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/usage' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  usage: {
    bytes: number
    files: number
    limit: number
  }
}
GET/v1/orgs/:orgId/drive/people

A person to share with, by exact email address: an org member here, any account for personal files.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Query parameters

  • emailstringrequired

    Up to 320 characters. Email address.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/people?email=person%40example.com' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  person: {
    userId: string
    name?: string
    email?: string
  }
}
GET/v1/orgs/:orgId/drive/log

Personal spaces: the owner's log of every change and access (who opened, downloaded or listed what, links included).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Query parameters

  • cursorstring

    Up to 2,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
  • 404Org activity is in the audit log.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/log' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  events: {
    activityId: string
    action: string
    actorId: string
    actorLabel?: string
    at: number
    detail: {
      [key: string]: unknown
    }
  }[]
  cursor?: string
}
GET/v1/orgs/:orgId/drive/items/:itemId

A file or folder with its path (from the highest folder you can open), your role and what it allows, its shares (for editors) and its link setting. Photo details lose location and camera for people who only view, when the owner removes them.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
}
PATCH/v1/orgs/:orgId/drive/items/:itemId

Renames an item (names are unique per folder, ignoring case) or sets its description. Editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

  • namestring

    1–255 characters.

  • descriptionstringor null

    Up to 2,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "description": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
}
GET/v1/orgs/:orgId/drive/items/:itemId/children

A folder's contents, folders first, sorted by name, modified or size (order), in pages of up to 1,000 (cursor).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Query parameters

  • sort"name" | "modified" | "size"
  • order"asc" | "desc"
  • cursorstring

    Up to 200 characters.

  • limitinteger

    1–1000. Coerced from a string.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/children' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  folder: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
  total: number
  cursor?: string
}
GET/v1/orgs/:orgId/drive/items/:itemId/file

A one-hour link to the file's bytes (inline=1 to show it in the browser; versionId for an earlier version, editors only).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Query parameters

  • inline"0" | "1"
  • versionIdstring

    Up to 64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/file' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  url: string
  name: string
  mime: string
  size?: number
  inline: boolean
  expiresIn: number
  cleaned: boolean
}
GET/v1/orgs/:orgId/drive/items/:itemId/versions

A file's versions, newest first, with who uploaded each; canManage for editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/versions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  versions: {
    versionId: string
    name: string
    size: number
    mime: string
    checksum?: string
    uploadedBy: string
    createdAt: number
    current: boolean
    restoredFrom?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    label?: string
    pinned?: boolean
  }[]
  canManage: boolean
}
POST/v1/orgs/:orgId/drive/items/:itemId/versions/:versionId/restore

Makes an earlier version current again as a new version (a copy in the bucket; counts against storage). Editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/versions/{versionId}/restore' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
  versionId: string
  restoredFrom: string
}
DELETE/v1/orgs/:orgId/drive/items/:itemId/versions/:versionId

Deletes an earlier version (never the current one). Editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/versions/{versionId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

GET/v1/orgs/:orgId/drive/items/:itemId/activity

What happened to an item (and, for folders, to what's in them), newest first, a year back.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Query parameters

  • cursorstring

    Up to 2,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/activity' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  events: {
    activityId: string
    action: string
    actorId: string
    actorLabel?: string
    at: number
    detail: {
      [key: string]: unknown
    }
  }[]
  cursor?: string
}
GET/v1/orgs/:orgId/drive/items/:itemId/comments

Comments on a file or folder, oldest first; canComment for commenters and editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  comments: {
    commentId: string
    authorId: string
    authorLabel?: string
    body: string
    createdAt: number
    canDelete: boolean
    anchor?: {
      x?: number
      y?: number
      t?: number
    }
  }[]
  canComment: boolean
}
POST/v1/orgs/:orgId/drive/items/:itemId/comments

Adds a comment (up to 4,000 characters). Commenters and editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

  • bodystringrequired

    1–4,000 characters.

  • anchorobject
  • anchor.xnumber

    -100000–100000.

  • anchor.ynumber

    -100000–100000.

  • anchor.tnumber

    0–1000000.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 201

{
  comment: {
    anchor?: {
      x?: number
      y?: number
      t?: number
    }
    commentId: string
    authorId: string
    authorLabel?: string
    body: string
    createdAt: number
    canDelete: true
  }
}
DELETE/v1/orgs/:orgId/drive/items/:itemId/comments/:commentId

Deletes a comment: its author, or an editor.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • commentId

    Comment id (icm_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/comments/{commentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

PUT/v1/orgs/:orgId/drive/items/:itemId/shares/:principalId

Shares an item (and everything in it) with a person or team as viewer, commenter or editor. Org spaces: members and teams of the org; personal spaces: any person, no teams. Editors; at most 100 per item.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • principalId

    A person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Request body

  • role"viewer" | "commenter" | "editor"required

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/shares/{principalId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "role": "viewer"
  }'
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
}
DELETE/v1/orgs/:orgId/drive/items/:itemId/shares/:principalId

Removes someone's access given on this item (inherited access stays). Anyone may remove their own.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • principalId

    A person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/shares/{principalId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

POST/v1/orgs/:orgId/drive/items/:itemId/transfer

Gives a My Drive item (org spaces) to another member: it moves to the top of their My Drive and you keep editor access. Owners.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

  • userIdstringrequired

    5–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/{itemId}/transfer' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "<userId>"
  }'
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
}
POST/v1/orgs/:orgId/drive/folders

Creates a folder (onConflict: fail, the default, or rename for a numbered name). Editors of the parent.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • parentIdstringrequired

    3–64 characters.

  • namestringrequired

    1–255 characters.

  • onConflict"rename" | "fail"

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/folders' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "parentId": "<parentId>",
    "name": "Example"
  }'
Send it from this page with your session or a key.

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
}
POST/v1/orgs/:orgId/drive/folders/paths

Folder uploads: makes each relative path's folders (a, a/b) under parentId, reusing existing ones.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • parentIdstringrequired

    3–64 characters.

  • pathsstring[]required

    1–500 items. Each 1–4,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/folders/paths' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "parentId": "<parentId>",
    "paths": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  folders: {
    [key: string]: string
  }
  created: number
}
POST/v1/orgs/:orgId/drive/items/move

Moves items into a folder (up to 500). Between drives (everything inside goes too, at most 2,000 items) only for My Drive's owner or the source drive's managers.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

  • parentIdstringrequired

    3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/move' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ],
    "parentId": "<parentId>"
  }'
Send it from this page with your session or a key.

Response 200

{
  moved: {
    itemId: string
    name: string
    from: string
  }[]
  to: {
    itemId: string
    name: string
  }
}
POST/v1/orgs/:orgId/drive/items/copy

Copies files (not folders) into a folder, Copy of … next to the original by default (server-side, up to 20 GB each; counts against storage).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

  • parentIdstring

    3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/copy' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
POST/v1/orgs/:orgId/drive/items/trash

Moves items (with everything in them) to their drive's trash; deleted forever after 30 days. Editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/trash' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  items: {
    itemId: string
    name: string
    kind: "file" | "folder"
  }[]
}
POST/v1/orgs/:orgId/drive/items/restore

Puts trashed items back where they were (else at the top of their drive), with a numbered name if the name was taken meanwhile.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/restore' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  items: {
    itemId: string
    name: string
    parentId: string
  }[]
}
POST/v1/orgs/:orgId/drive/items/delete

Deletes trashed items forever (owner or managers). Large folders finish in the background (done: false).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/delete' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  deleted: {
    itemId: string
    name: string
  }[]
  done: boolean
}
POST/v1/orgs/:orgId/drive/items/star

Stars or unstars items for the caller (starred).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

  • starredbooleanrequired

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/items/star' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ],
    "starred": true
  }'
Send it from this page with your session or a key.

Response 200

{
  itemIds: string[]
  starred: boolean
}
GET/v1/orgs/:orgId/drive/trash

A drive's trash (My Drive by default, or driveId): items trashed there, newest first, with canEmpty for its owner or managers.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Query parameters

  • driveIdstring

    Up to 64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/trash' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
  }
  canEmpty: boolean
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
  retentionDays: 30
}
POST/v1/orgs/:orgId/drive/trash/empty

Deletes everything in a drive's trash forever (My Drive by default). Owner or managers.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • driveIdstring

    Up to 64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/trash/empty' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "driveId": "<driveId>"
  }'
Send it from this page with your session or a key.

Response 200

{
  deleted: number
  done: boolean
}
GET/v1/orgs/:orgId/drive/recent

Files you opened or changed in the last 60 days, newest first.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/recent' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  items: {
    at: number
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
GET/v1/orgs/:orgId/drive/starred

Your starred items you can still open.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/starred' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  items: {
    at: number
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
GET/v1/orgs/:orgId/drive/shared

Items shared with you (or your teams), newest first, outside your own My Drive. Personal context: personal files people shared with you.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/shared' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  items: {
    sharedAt: number
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
POST/v1/orgs/:orgId/drive/uploads

Starts an upload: answers the part size and links for the first parts (PUT each part, then complete).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • parentIdstring

    3–64 characters.

  • itemIdstring

    3–64 characters.

  • namestringrequired

    1–255 characters.

  • sizeintegerrequired

    ≥ 0.

  • mimestring

    Up to 200 characters.

  • onConflict"version" | "rename" | "fail"

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/uploads' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "size": 1
  }'
Send it from this page with your session or a key.

Response 201

{
  uploadId: string
  itemId: string
  partSize: number
  partCount: number
  urls: {
    [key: number]: string
  }
  contentType: string
  name: string
  newVersion: boolean
}
POST/v1/orgs/:orgId/drive/uploads/:uploadId/parts

Links (an hour each) for more parts of an upload, up to 100 at a time.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • uploadId

    Upload id (dup_…), from starting the upload.

Request body

  • partNumbersinteger[]required

    1–100 items. Each 1–10000.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/uploads/{uploadId}/parts' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "partNumbers": [
      1
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  urls: {
    [key: number]: string
  }
  expiresIn: number
}
GET/v1/orgs/:orgId/drive/uploads/:uploadId

Where an upload stands, with the parts already stored, to resume it.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • uploadId

    Upload id (dup_…), from starting the upload.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/uploads/{uploadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  uploadId: string
  itemId: string
  name: string
  size: number
  partSize: number
  partCount: number
  parts: {
    partNumber: number
    etag: string
    size?: number
  }[]
  expiresAt: number
}
POST/v1/orgs/:orgId/drive/uploads/:uploadId/complete

Finishes an upload once every part has arrived: checks the size, counts it against storage (413 when it doesn't fit) and records the file or its new version.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • uploadId

    Upload id (dup_…), from starting the upload.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/uploads/{uploadId}/complete' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
  newVersion: boolean
}
DELETE/v1/orgs/:orgId/drive/uploads/:uploadId

Cancels an upload and discards its parts.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • uploadId

    Upload id (dup_…), from starting the upload.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/uploads/{uploadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

POST/v1/orgs/:orgId/drive/archives

A ZIP of files and folders, made in the background; ask for it until status is ready, then download url.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/archives' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 202

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    error?: string
  }
}
GET/v1/orgs/:orgId/drive/archives/:archiveId

A ZIP's status (queued, building, ready, failed) and, when ready, a one-hour download link.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • archiveId

    ZIP download id (zip_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/drive/archives/{archiveId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    error?: string
  }
}
GET/v1/me/drive/drives

My Drive, the shared drives the caller belongs to (every one, to manage, for org admins) and storage use.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/drives' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  usage: {
    bytes: number
    files: number
    limit: number
  }
  personal: boolean
  myDrive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
  sharedDrives: {
    member: boolean
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }[]
}
POST/v1/me/drive/drives

Creates a shared drive; the caller becomes its manager. Not in personal spaces; not for viewers.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • namestringrequired

    1–255 characters.

  • descriptionstring

    Up to 500 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/drives' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example"
  }'
Send it from this page with your session or a key.

Response 201

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
}
GET/v1/me/drive/drives/:driveId

A drive with its members (shared drives) and whether the caller can manage them.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/drives/{driveId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
  members: {
    principalId: string
    type: "user" | "team"
    role: "viewer" | "commenter" | "editor" | "manager"
    addedBy: string
    addedAt: number
  }[]
  canManage: boolean
}
PATCH/v1/me/drive/drives/:driveId

Renames a shared drive or changes its description (managers, and org owners and admins).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Request body

  • namestring

    1–255 characters.

  • descriptionstringor null

    Up to 500 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/me/drive/drives/{driveId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "description": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
}
DELETE/v1/me/drive/drives/:driveId

Deletes an empty shared drive (its trash too must be empty).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/drive/drives/{driveId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

PUT/v1/me/drive/drives/:driveId/members/:principalId

Adds a person or team to a shared drive, or changes their role (viewer, commenter, editor, manager). A drive always keeps a manager who is a person.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

  • principalId

    A person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Request body

  • role"viewer" | "commenter" | "editor" | "manager"required

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PUT 'https://api.cactive.com.au/v1/me/drive/drives/{driveId}/members/{principalId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "role": "viewer"
  }'
Send it from this page with your session or a key.

Response 200

{
  ok: true
}
DELETE/v1/me/drive/drives/:driveId/members/:principalId

Removes a member (anyone may remove themselves).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • driveId

    Drive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

  • principalId

    A person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/drive/drives/{driveId}/members/{principalId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

GET/v1/me/drive/usage

Storage the space uses (every version, the trash included) and its limit, in bytes.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/usage' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  usage: {
    bytes: number
    files: number
    limit: number
  }
}
GET/v1/me/drive/people

A person to share with, by exact email address: an org member here, any account for personal files.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Query parameters

  • emailstringrequired

    Up to 320 characters. Email address.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/people?email=person%40example.com' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  person: {
    userId: string
    name?: string
    email?: string
  }
}
GET/v1/me/drive/log

Personal spaces: the owner's log of every change and access (who opened, downloaded or listed what, links included).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Query parameters

  • cursorstring

    Up to 2,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
  • 404Org activity is in the audit log.
curl 'https://api.cactive.com.au/v1/me/drive/log' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  events: {
    activityId: string
    action: string
    actorId: string
    actorLabel?: string
    at: number
    detail: {
      [key: string]: unknown
    }
  }[]
  cursor?: string
}
GET/v1/me/drive/items/:itemId

A file or folder with its path (from the highest folder you can open), your role and what it allows, its shares (for editors) and its link setting. Photo details lose location and camera for people who only view, when the owner removes them.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/items/{itemId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
}
PATCH/v1/me/drive/items/:itemId

Renames an item (names are unique per folder, ignoring case) or sets its description. Editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

  • namestring

    1–255 characters.

  • descriptionstringor null

    Up to 2,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/me/drive/items/{itemId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "description": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
}
GET/v1/me/drive/items/:itemId/children

A folder's contents, folders first, sorted by name, modified or size (order), in pages of up to 1,000 (cursor).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Query parameters

  • sort"name" | "modified" | "size"
  • order"asc" | "desc"
  • cursorstring

    Up to 200 characters.

  • limitinteger

    1–1000. Coerced from a string.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/children' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  folder: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
  total: number
  cursor?: string
}
GET/v1/me/drive/items/:itemId/file

A one-hour link to the file's bytes (inline=1 to show it in the browser; versionId for an earlier version, editors only).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Query parameters

  • inline"0" | "1"
  • versionIdstring

    Up to 64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/file' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  url: string
  name: string
  mime: string
  size?: number
  inline: boolean
  expiresIn: number
  cleaned: boolean
}
GET/v1/me/drive/items/:itemId/versions

A file's versions, newest first, with who uploaded each; canManage for editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/versions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  versions: {
    versionId: string
    name: string
    size: number
    mime: string
    checksum?: string
    uploadedBy: string
    createdAt: number
    current: boolean
    restoredFrom?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    label?: string
    pinned?: boolean
  }[]
  canManage: boolean
}
POST/v1/me/drive/items/:itemId/versions/:versionId/restore

Makes an earlier version current again as a new version (a copy in the bucket; counts against storage). Editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/versions/{versionId}/restore' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
  versionId: string
  restoredFrom: string
}
DELETE/v1/me/drive/items/:itemId/versions/:versionId

Deletes an earlier version (never the current one). Editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/versions/{versionId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

GET/v1/me/drive/items/:itemId/activity

What happened to an item (and, for folders, to what's in them), newest first, a year back.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Query parameters

  • cursorstring

    Up to 2,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/activity' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  events: {
    activityId: string
    action: string
    actorId: string
    actorLabel?: string
    at: number
    detail: {
      [key: string]: unknown
    }
  }[]
  cursor?: string
}
GET/v1/me/drive/items/:itemId/comments

Comments on a file or folder, oldest first; canComment for commenters and editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  comments: {
    commentId: string
    authorId: string
    authorLabel?: string
    body: string
    createdAt: number
    canDelete: boolean
    anchor?: {
      x?: number
      y?: number
      t?: number
    }
  }[]
  canComment: boolean
}
POST/v1/me/drive/items/:itemId/comments

Adds a comment (up to 4,000 characters). Commenters and editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

  • bodystringrequired

    1–4,000 characters.

  • anchorobject
  • anchor.xnumber

    -100000–100000.

  • anchor.ynumber

    -100000–100000.

  • anchor.tnumber

    0–1000000.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 201

{
  comment: {
    anchor?: {
      x?: number
      y?: number
      t?: number
    }
    commentId: string
    authorId: string
    authorLabel?: string
    body: string
    createdAt: number
    canDelete: true
  }
}
DELETE/v1/me/drive/items/:itemId/comments/:commentId

Deletes a comment: its author, or an editor.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • commentId

    Comment id (icm_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/comments/{commentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

PUT/v1/me/drive/items/:itemId/shares/:principalId

Shares an item (and everything in it) with a person or team as viewer, commenter or editor. Org spaces: members and teams of the org; personal spaces: any person, no teams. Editors; at most 100 per item.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • principalId

    A person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Request body

  • role"viewer" | "commenter" | "editor"required

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PUT 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/shares/{principalId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "role": "viewer"
  }'
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
}
DELETE/v1/me/drive/items/:itemId/shares/:principalId

Removes someone's access given on this item (inherited access stays). Anyone may remove their own.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

  • principalId

    A person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/shares/{principalId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

POST/v1/me/drive/items/:itemId/transfer

Gives a My Drive item (org spaces) to another member: it moves to the top of their My Drive and you keep editor access. Owners.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • itemId

    Drive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

  • userIdstringrequired

    5–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/{itemId}/transfer' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "userId": "<userId>"
  }'
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
}
POST/v1/me/drive/folders

Creates a folder (onConflict: fail, the default, or rename for a numbered name). Editors of the parent.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • parentIdstringrequired

    3–64 characters.

  • namestringrequired

    1–255 characters.

  • onConflict"rename" | "fail"

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/folders' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "parentId": "<parentId>",
    "name": "Example"
  }'
Send it from this page with your session or a key.

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
}
POST/v1/me/drive/folders/paths

Folder uploads: makes each relative path's folders (a, a/b) under parentId, reusing existing ones.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • parentIdstringrequired

    3–64 characters.

  • pathsstring[]required

    1–500 items. Each 1–4,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/folders/paths' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "parentId": "<parentId>",
    "paths": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  folders: {
    [key: string]: string
  }
  created: number
}
POST/v1/me/drive/items/move

Moves items into a folder (up to 500). Between drives (everything inside goes too, at most 2,000 items) only for My Drive's owner or the source drive's managers.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

  • parentIdstringrequired

    3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/move' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ],
    "parentId": "<parentId>"
  }'
Send it from this page with your session or a key.

Response 200

{
  moved: {
    itemId: string
    name: string
    from: string
  }[]
  to: {
    itemId: string
    name: string
  }
}
POST/v1/me/drive/items/copy

Copies files (not folders) into a folder, Copy of … next to the original by default (server-side, up to 20 GB each; counts against storage).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

  • parentIdstring

    3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/copy' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
POST/v1/me/drive/items/trash

Moves items (with everything in them) to their drive's trash; deleted forever after 30 days. Editors.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/trash' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  items: {
    itemId: string
    name: string
    kind: "file" | "folder"
  }[]
}
POST/v1/me/drive/items/restore

Puts trashed items back where they were (else at the top of their drive), with a numbered name if the name was taken meanwhile.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/restore' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  items: {
    itemId: string
    name: string
    parentId: string
  }[]
}
POST/v1/me/drive/items/delete

Deletes trashed items forever (owner or managers). Large folders finish in the background (done: false).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/delete' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  deleted: {
    itemId: string
    name: string
  }[]
  done: boolean
}
POST/v1/me/drive/items/star

Stars or unstars items for the caller (starred).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

  • starredbooleanrequired

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/items/star' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ],
    "starred": true
  }'
Send it from this page with your session or a key.

Response 200

{
  itemIds: string[]
  starred: boolean
}
GET/v1/me/drive/trash

A drive's trash (My Drive by default, or driveId): items trashed there, newest first, with canEmpty for its owner or managers.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Query parameters

  • driveIdstring

    Up to 64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/trash' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
  }
  canEmpty: boolean
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
  retentionDays: 30
}
POST/v1/me/drive/trash/empty

Deletes everything in a drive's trash forever (My Drive by default). Owner or managers.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • driveIdstring

    Up to 64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/trash/empty' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "driveId": "<driveId>"
  }'
Send it from this page with your session or a key.

Response 200

{
  deleted: number
  done: boolean
}
GET/v1/me/drive/recent

Files you opened or changed in the last 60 days, newest first.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/recent' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  items: {
    at: number
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
GET/v1/me/drive/starred

Your starred items you can still open.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/starred' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  items: {
    at: number
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
GET/v1/me/drive/shared

Items shared with you (or your teams), newest first, outside your own My Drive. Personal context: personal files people shared with you.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/shared' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  items: {
    sharedAt: number
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
POST/v1/me/drive/uploads

Starts an upload: answers the part size and links for the first parts (PUT each part, then complete).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • parentIdstring

    3–64 characters.

  • itemIdstring

    3–64 characters.

  • namestringrequired

    1–255 characters.

  • sizeintegerrequired

    ≥ 0.

  • mimestring

    Up to 200 characters.

  • onConflict"version" | "rename" | "fail"

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/uploads' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "size": 1
  }'
Send it from this page with your session or a key.

Response 201

{
  uploadId: string
  itemId: string
  partSize: number
  partCount: number
  urls: {
    [key: number]: string
  }
  contentType: string
  name: string
  newVersion: boolean
}
POST/v1/me/drive/uploads/:uploadId/parts

Links (an hour each) for more parts of an upload, up to 100 at a time.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • uploadId

    Upload id (dup_…), from starting the upload.

Request body

  • partNumbersinteger[]required

    1–100 items. Each 1–10000.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/uploads/{uploadId}/parts' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "partNumbers": [
      1
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  urls: {
    [key: number]: string
  }
  expiresIn: number
}
GET/v1/me/drive/uploads/:uploadId

Where an upload stands, with the parts already stored, to resume it.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • uploadId

    Upload id (dup_…), from starting the upload.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/uploads/{uploadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  uploadId: string
  itemId: string
  name: string
  size: number
  partSize: number
  partCount: number
  parts: {
    partNumber: number
    etag: string
    size?: number
  }[]
  expiresAt: number
}
POST/v1/me/drive/uploads/:uploadId/complete

Finishes an upload once every part has arrived: checks the size, counts it against storage (413 when it doesn't fit) and records the file or its new version.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • uploadId

    Upload id (dup_…), from starting the upload.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/uploads/{uploadId}/complete' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
  newVersion: boolean
}
DELETE/v1/me/drive/uploads/:uploadId

Cancels an upload and discards its parts.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • uploadId

    Upload id (dup_…), from starting the upload.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/drive/uploads/{uploadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

POST/v1/me/drive/archives

A ZIP of files and folders, made in the background; ask for it until status is ready, then download url.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Request body

  • itemIdsstring[]required

    1–500 items. Each 3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/drive/archives' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 202

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    error?: string
  }
}
GET/v1/me/drive/archives/:archiveId

A ZIP's status (queued, building, ready, failed) and, when ready, a one-hour download link.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • archiveId

    ZIP download id (zip_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/drive/archives/{archiveId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    error?: string
  }
}