List service accounts
import requests
url = "https://api.datagrid.com/v1/data-views/service-accounts"
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', 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 \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "service_account",
"type": "gcp",
"id": "<string>",
"email": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Data Views
List service accounts
Returns the list of service accounts for your teamspace. Only one service account per teamspace is allowed at this time.
GET
/
data-views
/
service-accounts
List service accounts
import requests
url = "https://api.datagrid.com/v1/data-views/service-accounts"
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', 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 \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "service_account",
"type": "gcp",
"id": "<string>",
"email": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"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.
Query Parameters
The limit on the number of objects to return, ranging between 1 and 100.
Required range:
1 <= x <= 100A 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