Eternaltwin

Home | /api | v1

/api/v1/config

The pieces of the server configuration a client has to know in order to draw the right interface. Defined in crates/rest/src/config.rs.

Only settings that change what a client must do are published here. Secrets, database URLs and mailer credentials are not part of this document and never will be.

GET /

Returns the client-visible configuration. Needs no authentication.

Example

GET /api/v1/config
{
  "captcha": {
    "enabled": true
  },
  "forum": {
    "threads_per_page": 20,
    "posts_per_page": 10
  }
}
FieldTypeMeaning
captcha.enabledbooleanWhether the proof-of-work captcha guards registration and sign-in. When false, the forms may omit cap-token.
forum.threads_per_pageintegerDefault limit of a section's thread listing.
forum.posts_per_pageintegerDefault limit of a thread's post listing.

The two forum numbers are the defaults the server applies when a request omits limit; see forum. A client that lays out pagination should read them from here rather than hard-coding the same constants twice.

The captcha flag is what the sign-in and registration pages use to decide whether to mount the widget; the exchange itself is documented under captcha.

Errors

None.