Borrow
Ms

CLI

Measure API latency around the world using the Borrow CLI.

CLI

Use the borrow ms command to measure the latency of any API endpoint from multiple regions around the world.

Plans

While Borrow Ms can be self-hosted, this documentation currently focuses on using the managed service. Therefore, a daily quota is enforced. Visit the pricing page to learn more about the limits and available plans.

Authentication

  1. Create a Borrow account.
  2. Create a new project.
  3. Click on the project card to view the project details.
  4. Give the API key a name and click on the button to create it.
  5. Wait for the API key to be generated and copy it to you clipboard.
  6. Set the BORROW_API_KEY environment variable, or pass it directly with the --api-key (or -k) flag.

Installation

Install the CLI from crates.io:

cargo install borrow-dev

Usage

borrow ms <URL> [OPTIONS]

Examples

Simple GET request:

borrow ms https://api.example.com/health

POST request with headers and body:

borrow ms https://api.example.com/data \
  -m POST \
  --header "Authorization: Bearer token" \
  --header "Content-Type: application/json" \
  -d '{"key": "value"}'

Using an API key directly instead of the environment variable:

borrow ms https://api.example.com/health -k borrow_sk_your_api_key

Verbose output with region codes:

borrow ms https://api.example.com/health -v

Publish results to the explorer and generate a video report:

borrow ms https://api.example.com/health --scope public

On this page