Skip to main content
GET
/
data-views
/
service-accounts
/
{service_account_id}
/
credentials
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
)
service_account_credentials = client.data_views.service_accounts.credentials(
    "service_account_id",
)
print(service_account_credentials.object)
{
  "object": "service_account_credentials",
  "private_key": "<string>",
  "type": "gcp"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

service_account_id
string
required

The id of the service account to retrieve credentials for.

Response

200 - application/json

Service account credentials

The credentials for a service account.

object
enum<string>
required

The object type, which is always service_account_credentials.

Available options:
service_account_credentials
private_key
string
required

The private key for the service account in JSON format.

type
enum<string>

The type of service account credentials, currently only gcp is supported.

Available options:
gcp