---
title: "List all macros."
method: GET
path: "/v2/macros"
tags: ["macroManagement"]
---

# List all macros.

`GET /v2/macros`

List all viewable macros for the customer.

## Query parameters

- `limit` integer
- `token` string

## Response `200`

Paginated list of viewable macros for the customer.

- PaginatedMacros
  - `data` Macro[] — List of macros.
    - `description` string — Description of the macro.
    - `definition` string, required — The definition of the macro. Use a valid Sumo Log Search expression.
    - `enabled` boolean — If the macro is enabled or not (default True)
    - `arguments` Argument[] — Arguments used in the macro.
      - `name` string, required — Argument name for the macro.
      - `type` string — The type of the macro.
    - `argumentValidations` ArgumentValidation[] — Validation expressions for the arguments.
      - `evalExpression` string, required — The expression to validate a macro argument.
      - `errorMessage` string, required — Error message to be shown if the macro argument validation fails.
    - `name` string, required — Name of the macro.
    - `macroCreationSuggestionId` string — Identifier if the suggestion comes from an macro creation suggestion. This id is used to track macro creation suggestions, and to delete the suggestion once the macro is created.
    - `id` string, required — Unique identifier for the macro. This id is used to get detailed information about the macro, such as name, definition, arguments and argument validations.
    - `createdAt` string, date-time, required — Creation timestamp of the macro in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
    - `createdBy` string, required — The identifier of the user who created the macro.
  - `next` string — Next continuation token. `token` is set to null when no more pages are left.

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/revisions/18a824df1e78/schema)
