Endpoints
Call these through the okoro proxy at https://okoro.ai/p/google-analytics-admin
| Action | Method | Path | Min scope |
|---|---|---|---|
| List account summaries | GET | read | |
| List accounts | GET | read | |
| Read account | GET | read | |
| Delete account | DELETE | delete | |
| List properties | GET | read | |
| Read property | GET | read | |
| Create property | POST | write | |
| Update property | PATCH | update | |
| Delete property | DELETE | delete | |
| List account user access | GET | read | |
| Add account user access | POST | write | |
| Remove account user access | DELETE | delete | |
| List property user access | GET | read | |
| Add property user access | POST | write | |
| Remove property user access | DELETE | delete |
Examples
Every request requires a short-lived operation token scoped to a single action.
1. Get an operation token
Exchange your service token for a short-lived operation token scoped to a single action.
TOKEN=$(curl -sX POST "https://okoro.ai/t/tokens" \
-H "Authorization: Bearer $OKORO_SERVICE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"provider": "google-analytics-admin", "scope": "read", "intent": "describe what you are doing"}' \
| jq -r '.token')2. Call the API
Use the operation token as a Bearer token. The proxy forwards the request to Google Analytics Admin and logs the action.
List account summaries
curl -X GET "https://okoro.ai/p/google-analytics-admin/accountSummaries" \
-H "Authorization: Bearer $TOKEN"List accounts
curl -X GET "https://okoro.ai/p/google-analytics-admin/accounts" \
-H "Authorization: Bearer $TOKEN"Read account
curl -X GET "https://okoro.ai/p/google-analytics-admin/accounts/{id}" \
-H "Authorization: Bearer $TOKEN"Delete account
curl -X DELETE "https://okoro.ai/p/google-analytics-admin/accounts/{id}" \
-H "Authorization: Bearer $TOKEN"List properties
curl -X GET "https://okoro.ai/p/google-analytics-admin/properties" \
-H "Authorization: Bearer $TOKEN"Read property
curl -X GET "https://okoro.ai/p/google-analytics-admin/properties/{id}" \
-H "Authorization: Bearer $TOKEN"Create property
curl -X POST "https://okoro.ai/p/google-analytics-admin/properties" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Update property
curl -X PATCH "https://okoro.ai/p/google-analytics-admin/properties/{id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Delete property
curl -X DELETE "https://okoro.ai/p/google-analytics-admin/properties/{id}" \
-H "Authorization: Bearer $TOKEN"List account user access
curl -X GET "https://okoro.ai/p/google-analytics-admin/accounts/{id}/accessBindings" \
-H "Authorization: Bearer $TOKEN"Add account user access
curl -X POST "https://okoro.ai/p/google-analytics-admin/accounts/{id}/accessBindings" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Remove account user access
curl -X DELETE "https://okoro.ai/p/google-analytics-admin/accounts/{id}/accessBindings/{id}" \
-H "Authorization: Bearer $TOKEN"List property user access
curl -X GET "https://okoro.ai/p/google-analytics-admin/properties/{id}/accessBindings" \
-H "Authorization: Bearer $TOKEN"Add property user access
curl -X POST "https://okoro.ai/p/google-analytics-admin/properties/{id}/accessBindings" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Remove property user access
curl -X DELETE "https://okoro.ai/p/google-analytics-admin/properties/{id}/accessBindings/{id}" \
-H "Authorization: Bearer $TOKEN"Scopes
Your service token must be configured with at least the required scope level.
readGET/accountSummaries
/accounts
/accounts/**
/properties
/properties/**writeGET
POST/accountSummaries
/accounts
/accounts/**
/properties
/properties/**updateGET
POST
PATCH/accountSummaries
/accounts
/accounts/**
/properties
/properties/**deleteGET
POST
PATCH
DELETE/accountSummaries
/accounts
/accounts/**
/properties
/properties/**allGET
POST
PATCH
DELETE/**