---
title: tb endpoint
meta:
    description: Manage endpoints in your Tinybird project
---

# tb endpoint

Manage endpoints. Global options apply to this command. See [Global options](/forward/dev-reference/commands/global-options).

The following subcommands are available:

{% table %}
  * Subcommand
  * Description
  ---
  * data PIPE
  * Prints data returned by the endpoint.
  ---
  * ls [OPTIONS]
  * Lists all the endpoints.
  ---
  * stats [OPTIONS] PIPE
  * Prints stats of the last 7 days for an endpoint.
  ---
  * token PIPE
  * Retrieves a token to call an endpoint.
  --- 
  * url PIPE
  * Prints the URL of an endpoint.
{% /table %}

## tb endpoint data

Prints data returned by the endpoint.

{% table %}
  * Option
  * Description
  ---
  * --query TEXT
  * Runs a query over endpoint results.
  ---
  * --format [json|csv]
  * Returns the results in the specified format.
{% /table %}

## tb endpoint ls

Lists all the endpoints.

{% table %}
  * Option
  * Description
  ---
  * --match TEXT
  * Retrieves any resource matching the pattern. For example, `--match _test`.
  ---
  * --format [json]
  * Returns the results in the specified format.
{% /table %}

## tb endpoint stats

Prints stats of the last 7 days for an endpoint.

{% table %}
  * Option
  * Description
  ---
  * --format [json]
  * Returns the results in the specified format.
{% /table %}

## Environment support

{% table %}
  * Environment
  * Supported
  * Description
  ---
  * `--local`
  * ✓ Yes (default)
  * Manages endpoints locally.
  ---
  * `--cloud`
  * ✓ Yes
  * Manages endpoints in Tinybird Cloud.
  ---
  * `--branch=BRANCH_NAME`
  * ✓ Yes
  * Manages endpoints in a branch.
{% /table %}
