Create a new SQL macro.
Requires superadmin privileges.
cURL
curl --request POST \ --url https://api.example.com/api/v1/macros \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "sql_query": "<string>", "description": "<string>", "parameters": [ "<string>" ] } '
{ "name": "<string>", "sql_query": "<string>", "id": 123, "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z", "description": "<string>", "parameters": [ "<string>" ], "created_by": "<string>" }
Schema for creating a macro.
Unique name of the macro
1 - 255
The SQL SELECT query
Description of the macro
List of parameter names
Successful Response
Schema for macro response.