Get service account credentials
import requests
url = "https://api.datagrid.com/v1/data-views/service-accounts/{service_account_id}/credentials"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/data-views/service-accounts/{service_account_id}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/data-views/service-accounts/{service_account_id}/credentials \
--header 'Authorization: Bearer <token>'{
"object": "service_account_credentials",
"private_key": "<string>",
"type": "gcp"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Data Views
Get service account credentials
Retrieves the credentials (private key) for a service account.
GET
/
data-views
/
service-accounts
/
{service_account_id}
/
credentials
Get service account credentials
import requests
url = "https://api.datagrid.com/v1/data-views/service-accounts/{service_account_id}/credentials"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/data-views/service-accounts/{service_account_id}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/data-views/service-accounts/{service_account_id}/credentials \
--header 'Authorization: Bearer <token>'{
"object": "service_account_credentials",
"private_key": "<string>",
"type": "gcp"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The id of the service account to retrieve credentials for.
Response
Service account credentials
The credentials for a service account.
The object type, which is always service_account_credentials.
Available options:
service_account_credentials The private key for the service account in JSON format.
The type of service account credentials, currently only gcp is supported.
Available options:
gcp