Salts, sampling and data mode for the SDK
GET
/v1/config
const url = 'https://stats.example.com/v1/config';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Current configuration
Media typeapplication/json
object
v
required
number
appId
required
string
mode
required
string
saltPeriod
required
string
salts
required
Array<object>
object
period
required
string
salt
required
string
sampling
object
key
additional properties
number
serverTime
required
string format: date-time
Example
{ "v": 1, "mode": "privacy", "saltPeriod": "day", "sampling": {}}Missing or wrong credentials
Media typeapplication/json
object
error
required
string
message
string
rejected
Array<object>
object
index
required
integer
reason
required
string
Example generated
{ "error": "example", "message": "example", "rejected": [ { "index": 1, "reason": "example" } ]}