v1
latestOpenAPI 3.0.02026-08-064311,0881.3 MBmacroManagement
Edit a macro.
Edits an existing macro by id. Macro name is immutable.
put/v2/macros/{id}
Path parameters
idstring required
UUID of the macro to edit.
Request body
Example request
{
"description": "Macro for geo lookup.",
"definition": "lookup latitude, longitude from geo://location on ip = {{ip_field}} | count by latitude, longitude | sort _count\"\n",
"arguments": [
{
"name": "ip_field",
"type": "String"
}
],
"argumentValidations": [
{
"evalExpression": "isValidIp(ip_field)",
"errorMessage": "You need to enter a field name which is a valid ip."
}
]
}Response
The edited macro.
Example response
{
"description": "Macro for geo lookup.",
"definition": "lookup latitude, longitude from geo://location on ip = {{ip_field}} | count by latitude, longitude | sort _count\"\n",
"arguments": [
{
"name": "ip_field",
"type": "String"
}
],
"argumentValidations": [
{
"evalExpression": "isValidIp(ip_field)",
"errorMessage": "You need to enter a field name which is a valid ip."
}
],
"name": "MacroGeoLookup",
"macroCreationSuggestionId": "ABC12",
"id": "C03E086C137F38B4",
"createdAt": "2024-10-01T09:10:00Z",
"createdBy": "0000000006743FDD"
}