Configure local authentication via API?

Is it possible to use the API to configure local authentication?
Basically I want to use the API to automate the steps done via the /admin/access/local UI page.

Everything in the UI is just an API call so this shouldn’t be an issue, but I’d need @vincent to provide the real response.

Enabling auth is a POST to /v1/localAuthConfig with

{
  "type": "localAuthConfig",
  "accessMode": "unrestricted",
  "enabled": true,
  "name": "John Smith",
  "username": "jsmith",
  "password": "hunter2"
}

You will probably want to create an API key for the project and/or user first though, once it’s enabled you won’t be able to do anything else without one.

2 Likes