Config
The project’s one versioned config: whether unknown event types are accepted, the most data an event may hold, the delivery timeout and retry schedule, how long records are kept, and for push whether EventWolf sets the badge, the retry schedule, and the Expo access token, which is never returned.
Deliveries explains the retry schedule, and Event types what accepting or rejecting unknown types means.
Paths are relative to https://api.agentpost.tools/v1/events, and every request follows the API basics. Who may call explains each kind of caller.
Get the config
GET /config
The current config and its version.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>.
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
config |
ConfigRecord |
Always |
Errors
Only the codes any operation can answer with, which Conventions lists.
Update the config
PUT /config
Replaces the config. Send every setting except push.expo, which you can omit to keep the stored access token. EventWolf answers config_invalid if a required setting is missing. To guard against changes since you read the config, send the version you read in the optional If-Match header. If the version has changed, EventWolf answers stale_version.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - Idempotency-Key: optional. Retrying a write has the rule.
- If-Match: Optional. The config
versionyou read, as a number.
Body
| Name | Type | Required | Description |
|---|---|---|---|
ingest |
object |
Yes | |
ingest. |
"accept" or "reject" |
Yes | accept takes an event whose type isn’t registered; reject refuses it, with unknown_type. |
ingest. |
integer |
Yes | The most bytes an event’s data may hold, from 1024 to 1048576; 1024–1048576. |
delivery |
object |
Yes | |
delivery. |
string |
Yes | How long an attempt waits for the receiver’s answer: a duration from "1s" to "60s". |
delivery. |
string[] |
Yes | The wait before each retry after a failed attempt, as durations; the first attempt goes at once. A delivery is failed when an attempt fails with no retry left. [] makes one attempt only; up to 19 items. |
delivery. |
string |
Yes | An endpoint with no success for this long is disabled: a duration from "1d" to "365d". |
retention |
object |
Yes | |
retention. |
"forever" or string |
Yes | How long an event is kept after EventWolf received it: "forever", or a duration of at least "1d". |
retention. |
"forever" or string |
Yes | How long a delivery is kept after it finished, with its attempts: "forever", or a duration of at least "1d". |
retention. |
"forever" or string |
Yes | How long an ingestion failure is kept: "forever", or a duration of at least "1d". |
retention. |
"forever" or string |
Yes | How long a notification is kept after it was made: "forever", or a duration of at least "1d". |
push |
object |
Yes | |
push. |
boolean |
Yes | true sets the app icon’s badge on each push to the recipient’s unseen notifications on that device. false sends pushes with no badge, so the app keeps the badge itself. |
push. |
string[] |
Yes | The wait before each retry after a send that failed and is worth another try, such as a rate limit, as durations; the first send goes at once. [] sends once only; up to 19 items. |
push. |
object |
No | The Expo credential. Leave it out to keep the access token stored. |
push. |
string or null |
No | Your Expo access token, which Expo asks for when your Expo project turns on enhanced push security. Stored encrypted and never returned: the config shows only whether one is set. Leave it out to keep the one stored, or send null to remove it. |
push. |
boolean |
No | Read only: whether an access token is stored. Accepted and ignored, so a config you read can be put back as it is. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
config |
ConfigRecord |
Always |
Errors
invalid_request(400)config_invalid(422)stale_version(409)payload_too_large(413)
Any operation can also answer with the codes Conventions lists.
The ConfigRecord object
A config in the API’s answer: the settings, their version, and who last changed them.
| Name | Type | Present | Description |
|---|---|---|---|
ingest |
object |
Always | |
ingest. |
"accept" or "reject" |
Always | accept takes an event whose type isn’t registered; reject refuses it, with unknown_type. |
ingest. |
integer |
Always | The most bytes an event’s data may hold, from 1024 to 1048576; 1024–1048576. |
delivery |
object |
Always | |
delivery. |
string |
Always | How long an attempt waits for the receiver’s answer: a duration from "1s" to "60s". |
delivery. |
string[] |
Always | The wait before each retry after a failed attempt, as durations; the first attempt goes at once. A delivery is failed when an attempt fails with no retry left. [] makes one attempt only; up to 19 items. |
delivery. |
string |
Always | An endpoint with no success for this long is disabled: a duration from "1d" to "365d". |
retention |
object |
Always | |
retention. |
"forever" or string |
Always | How long an event is kept after EventWolf received it: "forever", or a duration of at least "1d". |
retention. |
"forever" or string |
Always | How long a delivery is kept after it finished, with its attempts: "forever", or a duration of at least "1d". |
retention. |
"forever" or string |
Always | How long an ingestion failure is kept: "forever", or a duration of at least "1d". |
retention. |
"forever" or string |
Always | How long a notification is kept after it was made: "forever", or a duration of at least "1d". |
push |
object |
Always | The push settings as the config shows them: never a credential, only whether one is set. |
push. |
boolean |
Always | Whether a push sets the app icon’s badge. |
push. |
string[] |
Always | The wait before each retry of a push, as durations. |
push. |
object |
Always | |
push. |
boolean |
Always | |
version |
number |
Always | |
updatedAt |
string |
Always | |
updatedBy |
string |
Always |