Skip to main content
PUT
/
api
/
v1
/
macros
/
{macro_id}
Update Macro
curl --request PUT \
  --url https://api.example.com/api/v1/macros/{macro_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "sql_query": "<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>"
}

Headers

authorization
string | null

Path Parameters

macro_id
integer
required

Body

application/json

Schema for updating a macro.

name
string | null

Unique name of the macro

Required string length: 1 - 255
description
string | null

Description of the macro

sql_query
string | null

The SQL SELECT query

parameters
string[] | null

List of parameter names

Response

Successful Response

Schema for macro response.

name
string
required

Unique name of the macro

Required string length: 1 - 255
sql_query
string
required

The SQL SELECT query

id
integer
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
description
string | null

Description of the macro

parameters
string[]

List of parameter names

created_by
string | null