Console API

API to use the Replicated console settings

This content is associated with a legacy version of the Replicated product. For the current Replicated product docs, click here.

The Console API offers developers the ability to retrieve Replicated console settings.

Console settings are not the same as application config settings. Application config settings should be provided to your applications via template functions in the release YAML.

Applications may find it useful to know certain properties about a Replicated install, such as its airgap status, console host, or proxy settings. The Console API can be used to retrieve all of this information. The API can also be used to retrieve the TLS certificates generated by Replicated or uploaded during the initial install process.

GET /console/v1/option

Returns values corresponding to the given console option name.

Request parameters

Name Type Description
name String Option name

Available Options

Airgap

All file names and paths are relative to the primary node
  • airgap.install - Returns if an installation is airgapped
  • airgap.license.path - In an airgapped install, returns the license file path
  • airgap.package.path - In an airgapped install, returns the package file path

Snapshots

  • snapshot.destination - File path for snapshots
  • snapshot.retention - Snapshot retention period
  • snapshot.timeout - Snapshot timeout period
  • snapshot.schedule - Returns all of the snapshot.schedule subfields.
  • snapshot.schedule.enabled - Returns if snapshots are enabled
  • snapshot.schedule.spec - Returns the snapshot definition YML
  • snapshot.schedule.time.daily - Snapshot time each day, if default settings are used
  • snapshot.schedule.day.weekly - Snapshot day each week, if default settings are used
  • snapshot.schedule.time.weekly - Snapshot time each week, if default settings are used
  • snapshot.schedule.custom.interval - Snapshot cron entry, if custom settings are used

TLS / Security

All file names and paths are relative to the primary node
  • cert.filename - Certificate file name
  • cert.filepath - Certificate path
  • key.filename - Private key file name
  • key.filepath - Private key file path
  • security.cert - PEM encoded TLS certificate
  • security.key - PEM encoded TLS private key
  • tls.authority.cert - PEM encoded Certificate Authority
  • tls.config.option - TLS Config

Misc

  • app.update.check.schedule - Application update schedule
  • clock.skew.threshold.milliseconds - Clock skew threshold between primary and operator nodes
  • hostname - Primary node hostname, configured on initial install
  • http.proxy - HTTP proxy settings
  • http.proxy.enabled - Returns if an HTTP proxy is enabled
  • language.source - Language Replicated is set to use. Deprecated.
  • license.sync.schedule - License sync schedule
  • statsd.data.location - Statsd file paths on the primary node
  • statsd.endpoint - Statsd endpoint for metrics and monitoring
  • scheduler - Returns the current scheduler, one of: replicated, swarm, kubernetes
  • update.check.schedule.custom.interval - Returns if update checks are set to a custom cron interval

Response Status

Status Description
200 Success
400 Bad request

Response body

Option value (string)

Example

$ curl -k $REPLICATED_INTEGRATIONAPI/console/v1/option?name=app.update.check.schedule
@every 5h

GET /console/v1/auth

Retrieves the console auth type and form object to be sent as a request to the POST /console/v1/auth route.

Response Status

Status Description
200 Success

Response body

Name Type Description
authType String Console auth type (one of anonymous, password, ldap, ldap_advanced)
form Object Console auth object to be sent to the POST /console/v1/auth route

Example

$ curl -k $REPLICATED_INTEGRATIONAPI/console/v1/auth | jq
{
  "authType": "ldap",
  "form": {
    "password": "",
    "username": ""
  }
}

POST /console/v1/auth

Authenticates against the console authentication settings.

Request payload

Name Type Description
username String Username (required only for authentication type LDAP)
password String Password

Response Status

Status Description
200 Authentication successful
400 Bad request
401 Invalid authentication credentials

Response body

no content

Example

$ curl -ik -X POST -H 'content-type:application/json' $REPLICATED_INTEGRATIONAPI/console/v1/auth -d '{"password":"mysupersecretpassword"}'
HTTP/2 200
content-type: text/plain; charset=utf-8
date: Thu, 13 Feb 2020 00:38:40 GMT
content-length: 0