Skip to main content
GET
/
data-views
Python
import os
from datagrid_ai import Datagrid

client = Datagrid(
    api_key=os.environ.get("DATAGRID_API_KEY"),  # This is the default and can be omitted
)
data_views = client.data_views.list(
    service_account_id="service_account_id",
)
print(data_views.data)
{
  "object": "list",
  "data": [
    {
      "object": "data_view",
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "knowledge_id": "<string>",
      "service_account_id": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

service_account_id
string
required

The id of the service account to list data views for.

knowledge_id
string

The id of the knowledge to list data views for.

limit
integer
default:20

The limit on the number of objects to return, ranging between 1 and 100.

Required range: 1 <= x <= 100
offset
integer
default:0

A cursor to use in pagination. offset is an integer that defines your place in the list. For example, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include offset=100 to fetch the next page of the list.

Required range: 0 <= x <= 100000

Response

200 - application/json

List of data views

object
enum<string>
required
Available options:
list
data
object[]
required

An array containing the data views.