v1
latestOpenAPI 3.0.02026-08-064311,0881.3 MBmacroManagement
Create a new macro.
Creates a new macro.
post/v2/macros
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."
}
],
"name": "MacroGeoLookup",
"macroCreationSuggestionId": "ABC12"
}Response
The macro has been created.
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"
}