Skip to content

API auth modes this appliance can connect with, and their fields

GET
/api/v1/learn/apis/modes
curl --request GET \
--url http://localhost:11044/api/v1/learn/apis/modes \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

OK

Media typeapplication/json

How an API may authenticate when connected, answered by GET /learn/apis/modes

object
modes
required

Each auth mode, as id, label and the form that connects with it; the id goes in ConnectApiRequest.mode

Array<object>

One offerable database engine or API auth mode, and the form that connects with it. A client renders the form; it decides nothing

object
fields
required

The whole form, credentials included, in the order to show it

Array<object>

One field of a connection form

object
default
required

The value to pre-fill, which the server also uses when the field is sent blank; empty when there is none

string
label
required

The field’s label, to show

string
name
required

The key to send this field’s value under in the request’s fields map

string
placeholder
required

Hint text for an empty input; empty when there is none

string
required
required

True when the connection is refused 400 without a value, after default is applied

boolean
secret
required

True for a credential: mask it, and drop it once the call it was typed for has returned

boolean
id
required

The id to send back: ConnectDatabaseRequest.engine for a database, ConnectApiRequest.mode for an API

string
label
required

A name to show, e.g. PostgreSQL or Bearer token

string

Example generated

{
"modes": [
{
"fields": [
{
"default": "example",
"label": "example",
"name": "example",
"placeholder": "example",
"required": true,
"secret": true
}
],
"id": "example",
"label": "example"
}
]
}