API profiles

An API profile describes a REST server that agents call through the api command. The profile holds the server's base URL, the headers and query parameters sent on every call, what a command may add or change, and the connection pool used.

Settings

FieldTypeDefaultDescription
secretsUsedlist of stringThe secret names this profile's expressions read (sys.secret['NAME']). Worked out by the cloud when the profile is saved and sent with the profile to agent servers; anything sent in this field is ignored.
namerequiredstringThe name this profile is referred to by, in agents and in other configuration.
docstringFree-text notes about this profile, for whoever maintains the configuration.
urlrequireddynamic stringThe base URL of this API server.
addPath"can" | "cannot" | "must""can"Whether command can add path to the base URL
headersobject of string → ValueModelHeaders sent with every call, including any authentication.
canAddHeadersbooleanfalseWhether more headers can be added by the command.
queryParamsobject of string → ValueModelQuery parameters sent with every call
canAddQueryParamsbooleanfalseWhether more query parameters can be added by the command.
connectionPoolNamestring"default"The connection pool used for calls to this server.

The URL, the header values and the query parameter values are dynamic strings, so credentials can come from sys.secret instead of being stored in the profile.

What a command may add

The profile decides how far an api command may go beyond it. The path add setting says whether a command may add a path to the base URL, may not, or must. A path the command adds is relative: an absolute URL, or a path that steps outside the base URL with .., fails the call.

A header or query parameter the profile sets is replaced by the command's value only when the profile marks it as one a command may override; otherwise the call fails. A header or query parameter the profile does not have is added only when the profile allows commands to add headers or query parameters; otherwise the call fails. A query parameter written into the profile's URL itself can never be changed by a command.