Analytics API reference
Account-owned datasets with principal RBAC. Write-key analytics event ingestion.
Published contracts: @socra/analytics-api@0.1.0.
Authenticated request and response
Use an Account access token with authorization for the dataset. Account-owned datasets use principal roles (admin, viewer or writer); Project IAM alone does not grant dataset access. /v1/events:batch uses a dataset write_key in its body; the authenticated dataset and managed-delivery paths have separate contracts below. Retention and cost depend on the current service terms.
This illustrative read uses an existing access token. Set ACCESS_TOKEN through your authorized credential provider; keep it out of source, logs and shared shell history. The identifiers and response below are fictional, validated against the published package. They are not a runtime execution receipt.
curl --fail-with-body --silent --show-error \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header 'Accept: application/json' \
'https://analytics.socra.cloud/v1/datasets?limit=1'
Example successful response body:
{
"data": [
{
"id": "dataset_01m00000000000000000000000",
"name": "Example dataset",
"environment": "production",
"retention_days": 90,
"status": "active",
"created_at": "2026-10-20T12:00:00.000Z",
"updated_at": "2026-10-20T12:00:00.000Z",
"account_id": "00000000-0000-4000-8000-000000000001",
"roles": [
"viewer"
]
}
],
"has_more": false
}
For body requests, send JSON with Content-Type: application/json and the exact body fields listed under the operation. Required scopes, when declared, appear with the operation. A token and a valid request shape do not replace the service's authorization rules.
Handle unsuccessful responses
Inspect the HTTP status and response body before taking another action. The published API client retains status, method, URL and body on APIError. It accepts a JSON error object with optional error, message, code and details fields; it also preserves a text or empty body. The method contracts below do not declare a complete per-operation error catalog.
An illustrative JSON error body (field names follow the client contract; the message is an example):
{
"message": "The request was rejected. Check the status and service permissions."
}
- For 400 or another validation response, compare the named field, required fields, types, bounds and accepted values with this reference before correcting the request.
- For 401, obtain or refresh your token through the supported authorization path. Never paste a token into a bug report.
- For 403, stop and ask the resource owner to verify the intended principal, Account or Project, required permission and service enablement. An access denial is not evidence of a runtime defect.
- For 404, verify the exact resource identifier and Account or Project context with its owner; do not recreate a resource merely because a read failed.
- For 429, follow Retry-After if the service supplies it. These contracts specify no universal rate limit or retry interval.
- For a 5xx response or interrupted connection after a write, inspect supported resource state before retrying. The effect may be uncertain; automatic replay can duplicate work.
These are status-based troubleshooting steps, not a promise that each operation returns each status or the sample body. Preserve the exact status and redacted body when requesting help.
Base URL
https://analytics.socra.cloudAnalytics explorations
Authorized storage-side analytics without raw SQL.
Aggregate events
/v1/datasets/{dataset_id}/queryPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Request body
start_timestringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$end_timestringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$measuresobject[]optionaldefault: [{"name":"count","op":"count"}] · min items: 1 · max items: 10
measuresobject[]optionaldefault: [{"name":"count","op":"count"}] · min items: 1 · max items: 10namestringrequiredpattern: ^[a-z][a-z0-9_]{0,39}$op"count" | "distinct" | "sum" | "avg" | "min" | "max" | "percentile"requiredfieldstringoptionalmax length: 160 · pattern: ^(name|source|distinct_id|session_id|application_project|properties\.[A-Za-z0-9_][A-Za-z0-9_.-]{0,127})$percentilenumberoptionalmin: 0 · max: 100group_bystring[]optionaldefault: [] · max items: 3interval"hour" | "day" | "week" | "month"optionaltimezonestringoptionaldefault: "UTC" · min length: 1 · max length: 100filterobjectoptionalEvent filter: a leaf with field/op and optional value/values, or an and/or group. At most 5 group levels, 20 children per group and 100 total nodes. Leaf operators: eq, ne, in, exists, gt, gte, lt, lte. Field accepts name, source, distinct_id, session_id, application_project or properties.<path>. in uses values (1–100 scalars); exists can omit value.
order_byobject[]optionaldefault: [] · max items: 5
order_byobject[]optionaldefault: [] · max items: 5fieldstringrequiredmax length: 160direction"asc" | "desc"optionaldefault: "desc"limitintegeroptionaldefault: 1000 · min: 1 · max: 10000fillbooleanoptionaldefault: truecompare"previous_period"optionalResponse
7 fields
truncatedbooleanrequiredcolumnsstring[]requiredrowsobject[]requiredstart_timestringrequiredend_timestringrequiredtimezonestringrequiredcomparisonobjectoptional
comparisonobjectoptionaltruncatedbooleanrequiredstart_timestringrequiredend_timestringrequiredrowsobject[]requiredDiscover schema
/v1/datasets/{dataset_id}/schemaPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Query parameters
start_timestringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$end_timestringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Response
5 fields
event_namesobject[]required
event_namesobject[]requirednamestringrequiredcountnumberrequiredfieldsobject[]required
fieldsobject[]requiredfieldstringrequiredtypesstring[]requiredqueryablebooleanrequireddimensionsstring[]requiredsampledfalserequiredproperty_depth_limit5requiredInspect filtered events
/v1/datasets/{dataset_id}/events/searchPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Request body
start_timestringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$end_timestringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$filterobjectoptionalEvent filter: a leaf with field/op and optional value/values, or an and/or group. At most 5 group levels, 20 children per group and 100 total nodes. Leaf operators: eq, ne, in, exists, gt, gte, lt, lte. Field accepts name, source, distinct_id, session_id, application_project or properties.<path>. in uses values (1–100 scalars); exists can omit value.
limitintegeroptionaldefault: 20 · min: 1 · max: 100direction"asc" | "desc"optionaldefault: "desc"afterstringoptionalmax length: 2048Response
3 fields
dataobject[]requiredhas_morebooleanrequirednext_cursorstring | nullrequiredAccount datasets
Account-scoped analytics with dataset principal authorization.
Create dataset
/v1/datasetsRequest body
namestringrequiredmin length: 1 · max length: 256environmentstringoptionaldefault: "production" · min length: 1 · max length: 64 · pattern: ^[a-z0-9][a-z0-9._-]*$retention_daysintegeroptionaldefault: 90 · min: 1 · max: 3650Response
9 fields
idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
namestringrequiredenvironmentstringrequiredmin length: 1 · max length: 64 · pattern: ^[a-z0-9][a-z0-9._-]*$retention_daysintegerrequiredgreater than: 0 · max: 9007199254740991status"active" | "suspended"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$updated_atstringrequiredTime this resource was last updated, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$account_idstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$roles"admin" | "viewer" | "writer"[]requiredList datasets
/v1/datasetsQuery parameters
limitintegeroptionalmin: 1 · max: 100afterstringoptionalResponse
2 fields
dataobject[]required
dataobject[]requiredidstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
namestringrequiredenvironmentstringrequiredmin length: 1 · max length: 64 · pattern: ^[a-z0-9][a-z0-9._-]*$retention_daysintegerrequiredgreater than: 0 · max: 9007199254740991status"active" | "suspended"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$updated_atstringrequiredTime this resource was last updated, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$account_idstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$roles"admin" | "viewer" | "writer"[]requiredhas_morebooleanrequiredGet dataset
/v1/datasets/{dataset_id}Path parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Query parameters
No query parameters
Response
9 fields
idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
namestringrequiredenvironmentstringrequiredmin length: 1 · max length: 64 · pattern: ^[a-z0-9][a-z0-9._-]*$retention_daysintegerrequiredgreater than: 0 · max: 9007199254740991status"active" | "suspended"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$updated_atstringrequiredTime this resource was last updated, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$account_idstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$roles"admin" | "viewer" | "writer"[]requiredUpdate dataset
/v1/datasets/{dataset_id}Path parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Request body
namestringoptionalmin length: 1 · max length: 256environmentstringoptionalmin length: 1 · max length: 64 · pattern: ^[a-z0-9][a-z0-9._-]*$retention_daysintegeroptionalmin: 1 · max: 3650status"active" | "suspended"optionalResponse
9 fields
idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
namestringrequiredenvironmentstringrequiredmin length: 1 · max length: 64 · pattern: ^[a-z0-9][a-z0-9._-]*$retention_daysintegerrequiredgreater than: 0 · max: 9007199254740991status"active" | "suspended"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$updated_atstringrequiredTime this resource was last updated, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$account_idstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$roles"admin" | "viewer" | "writer"[]requiredDelete dataset
/v1/datasets/{dataset_id}Path parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Query parameters
No query parameters
Response
No response body
Rotate ingestion key
/v1/datasets/{dataset_id}/write-key/rotatePath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Request body
Response
1 field
write_keystringrequiredDataset authorizations
Account-scoped analytics with dataset principal authorization.
Authorize principal
/v1/datasets/{dataset_id}/authorizationsPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Request body
principalstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$role"admin" | "viewer" | "writer"requiredResponse
5 fields
idstringrequiredDataset principal authorization identifier. Serialized with the dsauth_ prefix.
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
principalstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$role"admin" | "viewer" | "writer"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$List dataset authorizations
/v1/datasets/{dataset_id}/authorizationsPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Query parameters
limitintegeroptionalmin: 1 · max: 100afterstringoptionalResponse
2 fields
dataobject[]required
dataobject[]requiredidstringrequiredDataset principal authorization identifier. Serialized with the dsauth_ prefix.
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
principalstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$role"admin" | "viewer" | "writer"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$has_morebooleanrequiredUpdate dataset authorization
/v1/datasets/{dataset_id}/authorizations/{authorization_id}Path parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
authorization_idstringrequiredDataset principal authorization identifier. Serialized with the dsauth_ prefix.
Request body
role"admin" | "viewer" | "writer"requiredResponse
5 fields
idstringrequiredDataset principal authorization identifier. Serialized with the dsauth_ prefix.
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
principalstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$role"admin" | "viewer" | "writer"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Revoke dataset authorization
/v1/datasets/{dataset_id}/authorizations/{authorization_id}Path parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
authorization_idstringrequiredDataset principal authorization identifier. Serialized with the dsauth_ prefix.
Query parameters
No query parameters
Response
No response body
Dataset events
Account-scoped analytics with dataset principal authorization.
List dataset events
/v1/datasets/{dataset_id}/eventsPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Query parameters
limitintegeroptionalmin: 1 · max: 100afterstringoptionalnamestringoptionalmin length: 1 · max length: 256start_timestringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$end_timestringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Response
2 fields
dataobject[]required
dataobject[]requirednamestringrequiredmin length: 1 · max length: 256 · pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$occurred_atstringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$distinct_idstringoptionalmin length: 1 · max length: 256session_idstringoptionalmin length: 1 · max length: 256sourcestringoptionalmin length: 1 · max length: 128propertiesobjectrequireddefault: {}idstringrequiredImmutable analytics event identifier. Serialized with the event_ prefix.
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
received_atstringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$application_projectstring | nulloptionalhas_morebooleanrequiredIngest authenticated events
/v1/datasets/{dataset_id}/events:batchPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Request body
eventsobject[]requiredmin items: 1 · max items: 100
eventsobject[]requiredmin items: 1 · max items: 100namestringrequiredmin length: 1 · max length: 256 · pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$occurred_atstringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$distinct_idstringoptionalmin length: 1 · max length: 256session_idstringoptionalmin length: 1 · max length: 256sourcestringoptionalmin length: 1 · max length: 128idempotency_keystringoptionalmin length: 1 · max length: 128propertiesobjectoptionaldefault: {}Response
2 fields
acceptedintegerrequiredmin: 0 · max: 9007199254740991event_idsstring[]requiredAccepted event identifiers. Serialized with the event_ prefix.
Dataset reports
Account-scoped analytics with dataset principal authorization.
Query dataset report
/v1/datasets/{dataset_id}/reports/eventsPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Query parameters
start_timestringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$end_timestringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$interval"hour" | "day"optionaldefault: "day"namestringoptionalmin length: 1 · max length: 256Response
5 fields
start_timestringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$end_timestringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$interval"hour" | "day"requiredtotalintegerrequiredmin: 0 · max: 9007199254740991seriesobject[]required
seriesobject[]requirednamestringrequiredpointsobject[]required
pointsobject[]requiredstart_timestringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$end_timestringrequiredformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$countintegerrequiredmin: 0 · max: 9007199254740991Dataset deliveries
Revocable grants binding a managed delivery principal and subscription to a dataset.
Authorize managed delivery
/v1/datasets/{dataset_id}/deliveriesPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Request body
subscriptionstringrequiredpattern: ^projects\/proj_[0-9a-hjkmnp-tv-z]{26}\/subscriptions\/[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$principalstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$delivery_projectstringrequiredProject identifier. Serialized with the proj_ prefix.
Response
7 fields
idstringrequiredManaged dataset delivery grant identifier. Serialized with the dsdelivery_ prefix.
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
subscriptionstringrequiredprincipalstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$delivery_projectstringrequiredProject identifier. Serialized with the proj_ prefix.
status"active" | "revoked"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$List managed deliveries
/v1/datasets/{dataset_id}/deliveriesPath parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
Query parameters
limitintegeroptionalmin: 1 · max: 100afterstringoptionalResponse
2 fields
dataobject[]required
dataobject[]requiredidstringrequiredManaged dataset delivery grant identifier. Serialized with the dsdelivery_ prefix.
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
subscriptionstringrequiredprincipalstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$delivery_projectstringrequiredProject identifier. Serialized with the proj_ prefix.
status"active" | "revoked"requiredcreated_atstringrequiredTime this resource was created, serialized as an ISO 8601 timestamp.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$has_morebooleanrequiredRevoke managed delivery
/v1/datasets/{dataset_id}/deliveries/{delivery_id}Path parameters
dataset_idstringrequiredAccount-owned dataset identifier. Serialized with the dataset_ prefix.
delivery_idstringrequiredManaged dataset delivery grant identifier. Serialized with the dsdelivery_ prefix.
Query parameters
No query parameters
Response
No response body
Managed deliveries
Ingest only as the specific service principal authorized by a dataset grant.
Get delivery identity
/v1/delivery-identityQuery parameters
Response
2 fields
principalstringrequiredformat: uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$projectstringrequiredProject identifier. Serialized with the proj_ prefix.
Deliver events
/v1/deliveries/{delivery_id}/events:batchPath parameters
delivery_idstringrequiredManaged dataset delivery grant identifier. Serialized with the dsdelivery_ prefix.
Request body
subscriptionstringrequiredeventsobject[]requiredmin items: 1 · max items: 100
eventsobject[]requiredmin items: 1 · max items: 100namestringrequiredmin length: 1 · max length: 256 · pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$occurred_atstringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$distinct_idstringoptionalmin length: 1 · max length: 256session_idstringoptionalmin length: 1 · max length: 256sourcestringoptionalmin length: 1 · max length: 128idempotency_keystringoptionalmin length: 1 · max length: 128propertiesobjectoptionaldefault: {}Response
2 fields
acceptedintegerrequiredmin: 0 · max: 9007199254740991event_idsstring[]requiredAccepted event identifiers. Serialized with the event_ prefix.
Base URL
https://analytics.socra.cloudEvent ingestion
Write-key event collection for browser, mobile, desktop, and server clients.
Ingest event batch
/v1/events:batchRequest body
write_keystringrequiredmin length: 16 · max length: 256eventsobject[]requiredmin items: 1 · max items: 100
eventsobject[]requiredmin items: 1 · max items: 100namestringrequiredmin length: 1 · max length: 256 · pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$occurred_atstringoptionalformat: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$distinct_idstringoptionalmin length: 1 · max length: 256session_idstringoptionalmin length: 1 · max length: 256sourcestringoptionalmin length: 1 · max length: 128idempotency_keystringoptionalmin length: 1 · max length: 128propertiesobjectoptionaldefault: {}Response
2 fields
acceptedintegerrequiredmin: 0 · max: 9007199254740991event_idsstring[]requiredAccepted event identifiers. Serialized with the event_ prefix.