---
title: "Get data source access"
method: GET
path: "/api/public/organizations/{orgId}/data-sources/{id}/access"
tags: ["Data Sources"]
---

# Get data source access

`GET /api/public/organizations/{orgId}/data-sources/{id}/access`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/access`
- Auth: HTTP bearer

Retrieves the access policy for a data source: who can query it, and the schema, table, and column rules on it. The response can be sent back to the update endpoint unchanged. Requires admin access to the organization.

## Path parameters

- `orgId` string, required: Organization ID
- `id` string, required: Data source ID

## Response `200`

Data source access retrieved successfully

- object
  - `data` DataSourceAccessResponse, required
    - `dataSourceId` string, required: Data source ID
    - `mode` 'everyone' | 'restricted', required: Whether everyone or only listed principals can query
    - `accessLevel` 'VIEW' | 'EDIT' | 'null', nullable, required: Everyone access level when mode is everyone
    - `groupIds` string[], required: Deprecated. Organization group IDs with view or edit access when mode is restricted. Use groupAccess for access levels.
    - `memberIds` string[], required: Deprecated. Organization member IDs with view or edit access when mode is restricted. Use memberAccess for access levels.
    - `groupAccess` object[], required: Organization groups with view or edit access
      - `id` string, required: Organization group or member ID
      - `accessLevel` 'VIEW' | 'EDIT': Whether the principal can view or edit the data source
    - `memberAccess` object[], required: Organization members with view or edit access
      - `id` string, required: Organization group or member ID
      - `accessLevel` 'VIEW' | 'EDIT': Whether the principal can view or edit the data source
    - `objects` object[], required: Schema, table, and column rules: objects with at least one rule, sorted by schema, table, and column
      - `schemaName` string, required: Schema name
      - `tableName` string, nullable, required: Table name, or null for a schema-level rule
      - `columnName` string, nullable, required: Column name, or null for a schema- or table-level rule
      - `everyoneAccessLevel` 'FULL' | 'NO_ACCESS' | 'null', nullable, required: Access for everyone in the organization, or null if unset
      - `groupAccess` object[], required: Group rules on this object
        - `id` string, required: Organization group or member ID
        - `accessLevel` 'FULL' | 'NO_ACCESS', required: FULL allows querying the object; NO_ACCESS blocks it in queries, chat, and metadata
      - `memberAccess` object[], required: Member rules on this object
        - `id` string, required: Organization group or member ID
        - `accessLevel` 'FULL' | 'NO_ACCESS', required: FULL allows querying the object; NO_ACCESS blocks it in queries, chat, and metadata

## Other responses

- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - Data source not found or no admin access
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error

---

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