Skip to main content
POST
Get Variable from Database

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
variable
string
required

The variable to retrieve.

variable_retrieval_depth
enum<string>
default:most_recent_value
required

How far back to retrieve data.

Available options:
most_recent_value,
historical_values
agent_db_historical_values
enum<string>

Historical data interval.

Available options:
last hour,
last day,
last week,
last month,
all time
agent_db_variable_retrieval_count
string

Number of items to retrieve (default: 10).

Response

200 - application/json

Retrieved variable data

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action