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
- Create a Borrow account.
- Create a new project.
- Click on the project card to view the project details.
- Give the API key a name and click on the button to create it.
- Wait for the API key to be generated and copy it to you clipboard.
- Set the
BORROW_API_KEYenvironment variable, or pass it directly with the--api-key(or-k) flag.
Installation
Install the CLI from crates.io:
cargo install borrow-devUsage
borrow ms <URL> [OPTIONS]Examples
Simple GET request:
borrow ms https://api.example.com/healthPOST 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_keyVerbose output with region codes:
borrow ms https://api.example.com/health -vPublish results to the explorer and generate a video report:
borrow ms https://api.example.com/health --scope public