Skip to content

api load

vp-utils api load

Execute a load test for REST or SOAP API

Synopsis

Tool for load testing API endpoints with support for various protocols and authentication methods. Supports REST and SOAP, multiple HTTP methods, authentication via Basic Auth, OAuth2, or Bearer token. Allows defining the number of concurrent requests, total requests, or test duration.

vp-utils api load [flags]

Examples

  # Simple GET request with 10 concurrent users, total 1000 requests
  vp-utils api load-test --url https://api.example.com/endpoint --concurrency 10 --requests 1000

  # POST request with JSON body and OAuth2 authentication
  vp-utils api load-test --url https://api.example.com/endpoint --method POST --content-type "application/json" \
    --data '{"key": "value"}' --auth-type oauth --oauth-client-id "client_id" --oauth-secret "secret" \
    --oauth-token-url "https://auth.example.com/token"

  # SOAP request with Basic authentication
  vp-utils api load-test --url https://api.example.com/soap --method POST --content-type "text/xml" \
    --data-file request.xml --auth-type basic --username "user" --password "pass"

Options

      --auth-type string          Authentication type (basic, oauth, bearer)
      --bearer-token string       Bearer token for authentication
  -n, --concurrency int           Number of concurrent users (default 1)
  -c, --content-type string       Content-Type header (default "application/json")
  -d, --data string               Request data (body)
  -f, --data-file string          File with request data
  -t, --duration int              Duration of the test in seconds (0 = until all requests complete)
  -H, --header stringArray        Custom HTTP headers (format: 'Key:Value')
  -h, --help                      help for load
      --insecure                  Skip SSL certificate verification
  -m, --method string             HTTP method (GET, POST, PUT, DELETE, etc.) (default "GET")
      --oauth-client-id string    OAuth2 Client ID
      --oauth-scope stringArray   OAuth2 scopes
      --oauth-secret string       OAuth2 Client Secret
      --oauth-token-url string    OAuth2 Token URL
      --output string             Output format (text, json, csv) (default "text")
      --output-file string        File to save results
      --password string           Password for Basic Auth
      --ramp-up int               Ramp-up time for users in seconds
  -r, --requests int              Total number of requests (0 = unlimited)
      --think-time int            Delay between requests in milliseconds
      --timeout int               Request timeout in seconds (default 30)
  -u, --url string                URL of the endpoint to test
      --username string           Username for Basic Auth
  -v, --verbose                   Show detailed output

SEE ALSO

Auto generated by spf13/cobra on 18-Sep-2025