API auth modes this appliance can connect with, and their fields
const url = 'http://localhost:11044/api/v1/learn/apis/modes';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:11044/api/v1/learn/apis/modes \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
How an API may authenticate when connected, answered by GET /learn/apis/modes
object
Each auth mode, as id, label and the form that connects with it; the id goes in ConnectApiRequest.mode
One offerable database engine or API auth mode, and the form that connects with it. A client renders the form; it decides nothing
object
The whole form, credentials included, in the order to show it
One field of a connection form
object
The value to pre-fill, which the server also uses when the field is sent blank; empty when there is none
The field’s label, to show
The key to send this field’s value under in the request’s fields map
Hint text for an empty input; empty when there is none
True when the connection is refused 400 without a value, after default is applied
True for a credential: mask it, and drop it once the call it was typed for has returned
The id to send back: ConnectDatabaseRequest.engine for a database, ConnectApiRequest.mode for an API
A name to show, e.g. PostgreSQL or Bearer token
Example generated
{ "modes": [ { "fields": [ { "default": "example", "label": "example", "name": "example", "placeholder": "example", "required": true, "secret": true } ], "id": "example", "label": "example" } ]}
