> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endorlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.endorlabs.com/feedback

```json
{
  "path": "/developers-api/rest-api/quickstart/index",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Quickstart

> Start using the Endor Labs REST API immediately.

This article describes how to quickly get started with the Endor Labs REST API using the Endor Labs command line tool `endorctl` or `curl`. For a more detailed guide, see [Getting started with the REST API](/developers-api/rest-api/using-the-rest-api/getting-started).

The following is an example request to get the number of findings in your namespace:

<Tabs>
  <Tab title="endorctl">
    1. Run `endorctl init` and your browser window will open automatically. Select your authentication provider from the available options and complete the authentication process.

    You can also specify your supported authentication provider manually.

    ```bash theme={null}
    endorctl init --auth-mode google
    ```

    2. Use the `endorctl` command-line tool to make your request. Note that you do not have to provide the namespace or access token when using `endorctl` to access the Endor Labs REST API. For more information, see the [Endor Labs CLI documentation](/developers-api/cli/commands/api).

    ```bash theme={null}
    endorctl api list -r Finding --count
    ```
  </Tab>

  <Tab title="curl">
    1. Install `curl` if it isn't already installed on your machine. To check if `curl` is installed, execute `curl --version` on the command line. If the output provides information about the version of `curl`, that means `curl` is installed. If you get a message similar to command not found: curl, you need to download and install curl. For more information, see the [curl project download page](https://curl.se/download.html).

    2. Run `endorctl init` and your browser window will open automatically. Select your authentication provider from the available options and complete the authentication process.

    You can also specify your supported authentication provider manually.

    ```bash theme={null}
    endorctl init --auth-mode google
    ```

    3. Create an access token. The access token produced below has the same scopes/permissions as the API key created through `endorctl init`. **Treat your access token like a password**. For more information, see [Authentication](/developers-api/rest-api/authentication).

    ```bash theme={null}
    export ENDOR_TOKEN=$(endorctl auth --print-access-token)
    ```

    4. Use the Curl command to make your request. Pass your token in an Authorization header. The following is an example request to get the number of findings in a given namespace. If needed, replace `$ENDOR_NAMESPACE` with the name of your namespace, or export it as a variable using `export ENDOR_NAMESPACE=<insert-namespace>`.

    ```bash theme={null}
    curl --get \
      --header "Authorization: Bearer $ENDOR_TOKEN" \
      --compressed \
      --url "https://api.endorlabs.com/v1/namespaces/$ENDOR_NAMESPACE/findings?list_parameters.count=true"
    ```

    For more information on HTTP headers and parameters, see [Getting Started](/developers-api/rest-api/using-the-rest-api/getting-started).
  </Tab>
</Tabs>

For more examples of common use cases, see [Use cases](/developers-api/rest-api/using-the-rest-api/use-cases).
