Skip to content
Agentpost robot in sunglasses on a red circleAgentpost

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 dev secret key, sk_test_…, as Authorization: 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 dev secret key, sk_test_…, as Authorization: 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.events string Yes A duration, such as “10m” or “7d”.
retention.resolvedHolds string Yes A duration, such as “10m” or “7d”.

Response

200 OK, with ConfigResponse.

Errors

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.events string Always A duration, such as “10m” or “7d”.
retention.resolvedHolds string Always A duration, such as “10m” or “7d”.
version number Always
updatedAt string Always An ISO 8601 date and time.
updatedBy string Always