Skip to content

Salts, sampling and data mode for the SDK

GET
/v1/config
curl --request GET \
--url https://stats.example.com/v1/config \
--header 'Authorization: Bearer <token>'

The salt of the current period first, then the previous one while it is inside its grace week. In the last 5 minutes of a period the next period’s salt comes too, last: SDKs ask again 1 to 4 minutes before a boundary, so they hold it before the period starts.

Current configuration

Media typeapplication/json
object
v
required
number
Allowed values: 1
appId
required
string
/^(?:\d{17,18}|[1-8]\d{18}|9[01]\d{17})$/
mode
required
string
Allowed values: privacy audit
saltPeriod
required
string
Allowed values: day week month
salts
required
Array<object>
<= 2 items
object
period
required
string
<= 16 characters
salt
required
string
/^[A-Za-z0-9_-]{43}$/
sampling
object
key
additional properties
number
>= 0.0001 <= 1
serverTime
required
string format: date-time
/^(?:(?:\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))$/

Example

{
"v": 1,
"mode": "privacy",
"saltPeriod": "day",
"sampling": {}
}

Missing or wrong credentials

Media typeapplication/json
object
error
required
string
<= 64 characters
message
string
<= 500 characters
rejected
Array<object>
object
index
required
integer
<= 9007199254740991
reason
required
string
<= 64 characters

Example generated

{
"error": "example",
"message": "example",
"rejected": [
{
"index": 1,
"reason": "example"
}
]
}