--- title: "Curl Example" slug: "quickstart-curl" updated: 2026-09-10T17:41:16Z published: 2026-09-10T17:41:16Z canonical: "docs.redcanary.com/quickstart-curl" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.redcanary.com/llms.txt > Use this file to discover all available pages before exploring further. # Curl Example Follow these necessary steps to write and run a simple Curl command that queries the Zscaler MDR API. ## Prerequisites Before running any code, ensure you have the following: - [Your API token](/doc/docs/red-canary-rest-api#generating-an-api-authentication-token) - [The latest recommended version of Curl](https://curl.se/download.html) ## Query the API Open the command line, and run the following command. Be sure to replace `<API key>` with your API key and `<subdomain>` with the subdomain you want to query. ```plaintext curl -X "GET" -H "X-Api-Key:" "https://.my.redcanary.co/openapi/v3/endpoints" ``` The command should print a JSON object containing the first page of endpoints associated with the subdomain. ## Customize your request with parameters You can use HTTP parameters to customize the results of your request. Visit the [Zscaler MDR API docs](https://go.my.redcanary.co/openapi/v3/docs/index.html) for a list of supported parameters for each API endpoint. ## Example: Limit the number of endpoints returned Limit the number of endpoints returned by Curl using the `per_page` parameter. Open the command line, run the following command. Be sure to replace `<API key>` with your API key and `<subdomain>` with the subdomain you want to query. ```plaintext curl -X "GET" -H "X-Api-Key:" "https://.my.redcanary.co/openapi/v3/endpoints?per_page=1" ``` The command should print a JSON object containing exactly one endpoint.