---
title: "Retrieve the agent's Google Drive (service-account) knowledge base"
method: GET
path: "/v1/agents/{id}/knowledge-bases/google-drive-service-account"
---

# Retrieve the agent's Google Drive (service-account) knowledge base

`GET /v1/agents/{id}/knowledge-bases/google-drive-service-account`

## Request

- Base URL: `https://api.runbear.io`
- URL: `https://api.runbear.io/v1/agents/{id}/knowledge-bases/google-drive-service-account`
- Auth: HTTP bearer

Returns the organization-service-account Google Drive knowledge base configuration and sync status for an agent. Returns 404 if the agent has no Google Drive service-account knowledge base configured.

## Path parameters

- `id` string, uuid, required: The ID of the agent to retrieve

## Response `200`

Default Response

- GoogleDriveServiceAccountKnowledgeBase: Google Drive knowledge base backed by an organization service account
  - `integrationId` string, uuid, required: Google service account integration ID
  - `nodeSelections` KnowledgeBaseNodeSelection[], required: Selected Drive, folder, or file nodes
    - `id` string, required: Selection node ID. For Google Drive: the Drive/folder/file ID. For Website: the URL.
    - `ancestorIds` string[], required: Ancestor node IDs, root first
    - `excludedChildIds` string[], required: Node IDs explicitly excluded from sync
    - `disableSyncNewChildren` boolean: When true, newly discovered children of this node are not auto-synced
  - `syncStatus` KnowledgeBaseSyncStatus, required: Sync status snapshot for a knowledge base. lastHeartbeatAt and internal error metadata are omitted.
    - `state` 'IN_PROGRESS' | 'SUCCESS' | 'PARTIAL_SUCCESS' | 'FAILED' | 'SUSPENDED', required: Current sync state for this knowledge base
    - `lastSuccessAt` string, nullable, required: Timestamp of the last fully successful sync, or null if never completed
    - `lastDurationMs` integer, nullable, required: Duration of the last sync attempt in milliseconds
    - `error` object, nullable, required: Most recent sync error, if any
      - `type` string, required: Error category (server_error, authentication, authorization, disintegrated, …)
      - `message` string, required: Human-readable error message

## Other responses

- `404`: Default Response

---

[API](https://skmtc.dev/runbear/apis/runbear-api.md) - [All operations](https://skmtc.dev/runbear/apis/runbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/runbear/apis/runbear-api/revisions/c6a9c3066a5a?raw)
