Skip to content

API endpoint for configuration #3619

@sebgie

Description

@sebgie

To make configuration values available to the client (see #3568) we need another API endpoint to read and browse config values.

  • GET /ghost/api/v0.1/configuration/: all available config values
  • GET /ghost/api/v0.1/configuration/<config-name>: one value, identified by config-name

Response format:

{
    configuration: [{
        key:<config-name>,
        value:<config-value>
    }]
}

The configuration endpoint should only return a subset of available config values:

  • filestorage (boolean from config.env.fileStorage)
  • apps (boolean from config.env.apps)
  • version (string, semver from packages.json)
  • environment (string from NODE_ENV)
  • database (string from config.env.database.client)
  • mail (sring from config.env.mail.transport)

Every authenticated user is allowed to read and browse these values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions