Config
Read or replace the project’s versioned retention settings.
Paths are relative to https://api.agentpost.tools/v1/resources. Who may call explains each credential.
Get the config
GET /config
Reads the project’s 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>. - SDK:
client.config.get()
Response
200 OK, with ConfigResponse.
Errors
Only the codes any operation can answer with, which Conventions lists.
Update the config
PUT /config
Replaces the project’s config. Send the version you read in If-Match.
- 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>. - SDK:
client.config.put(body, { ifMatch }) - Idempotency-Key: optional. Retrying a write has the rule.
- If-Match: Required. Send the version you read.
Body
| Name | Type | Required | Description |
|---|---|---|---|
retention |
object |
Yes | |
retention. |
string |
Yes | A duration, such as “10m” or “7d”. |
retention. |
string |
Yes | A duration, such as “10m” or “7d”. |
Response
200 OK, with ConfigResponse.
Errors
invalid_request(400)payload_too_large(413)stale_version(409)
Any operation can also answer with the codes Conventions lists.
The ConfigResponse object
| Name | Type | Present | Description |
|---|---|---|---|
config |
ConfigRecord |
Always |
The ConfigRecord object
| Name | Type | Present | Description |
|---|---|---|---|
retention |
object |
Always | |
retention. |
string |
Always | A duration, such as “10m” or “7d”. |
retention. |
string |
Always | A duration, such as “10m” or “7d”. |
version |
number |
Always | |
updatedAt |
string |
Always | An ISO 8601 date and time. |
updatedBy |
string |
Always |