Apidog Docs
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
HomeLearning Center
Support CenterAPI ReferencesDownloadChangelog
HomeLearning Center
Support CenterAPI ReferencesDownloadChangelog
Discord Community
Slack Community
X / Twitter
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
  1. Apidog CLI
  • Apidog Learning Center
  • Getting Started
    • Introduction to Apidog
    • Basic Concepts in Apidog
    • Navigating Apidog
    • Quick Start
      • Overview
      • Creating an Endpoint
      • Making a Request
      • Adding an Assertion
      • Creating Test Scenarios
      • Sharing API Documentation
      • Explore More
    • Migration to Apidog
      • Overview
      • Manual Import
      • Scheduled Import (Bind Data Sources)
      • Import Options
      • Export Data
      • Import From
        • Import from Postman
        • Import OpenAPI Spec
        • Import cURL
        • Import Markdowns
        • Import from Insomnia
        • Import from apiDoc
        • Import .har File
        • Import WSDL
  • Design APIs
    • Overview
    • Create a New API Project
    • Endpoint Basics
    • APl Design Guidelines
    • Module
    • Configure Multiple Request Body Examples
    • Components
    • Common Fields
    • Global Parameters
    • Endpoint Change History
    • Comments
    • Batch Endpoint Management
    • Custom Protocol API
    • Schemas
      • Overview
      • Create a New Schema
      • Build a Schema
      • Generate Schemas from JSON Etc
      • oneOf, allOf, anyOf
      • Using Discriminator
    • Security Schemes
      • Overview
      • Create a Security Scheme
      • Use the Security Scheme
      • Security Scheme in Online Documentation
    • Advanced Features
      • Custom Endpoint Fields
      • Associated Test Scenarios
      • Endpoint Status
      • Appearance of Parameter Lists
      • Endpoint Unique Identification
  • Develop and Debug APIs
    • Overview
    • Generating Requests
    • Sending Requests
    • Debugging Cases
    • Test Cases
    • Dynamic Values
    • Validating Responses
    • Design-First vs Request-First
    • Generating Code
    • Environments & Variables
      • Overview
      • Environment Management
      • Using Variables
    • Vault Secrets
      • Overview
      • HashiCorp Vault
      • Azure Key Vault
      • AWS Secrets Manager
    • Pre and Post Processors
      • Assertion
      • Extract Variable
      • Wait
      • Overview
      • Database Operations
        • Overview
        • MySQL
        • MongoDB
        • Redis
        • Oracle Client
      • Using Scripts
        • Overview
        • Pre Processor Scripts
        • Post Processor Scripts
        • Public Scripts
        • Postman Scripts Reference
        • Calling Other Programming Languages
        • Using JS Libraries
        • Visualizing Responses
        • Script Examples
          • Assertion Scripts
          • Using Variables
          • Modifying Requests
          • Other Examples
    • Dynamic Values Modules
  • Mock API Data
    • Overview
    • Smart Mock
    • Custom Mock
    • Mock Priority Sequence
    • Mock Scripts
    • Cloud Mock
    • Self-Hosted Runner Mock
    • Mock Language (Locales)
  • API Testing
    • Overview
    • Test Scenarios
      • Create a Test Scenario
      • Pass Data Between Requests
      • Flow Control Conditions
      • Sync Data from Endpoints and Endpoint Cases
      • Import Endpoints and Endpoint Cases from Other Projects
      • Export Test Scenarios
    • Run Test Scenarios
      • Run a Test Scenario
      • Run Test Scenarios in Batch
      • Manage Runtime Environment of APIs from Other Projects
      • Data-Driven Testing
      • Scheduled Tasks
    • Test Suite
      • Overview
      • Create A Test Suite
      • Orchestrate Test Suite
      • Run Test Suites Locally
      • Run Test Suites Via CLI
      • Scheduled tasks
    • Test Reports
      • Test Reports
    • Test APIs
      • Integration Testing
      • Performance Testing
      • End-to-End Testing
      • Regression Testing
      • Contract Testing
    • Apidog CLI
      • Overview
      • Installing and Running Apidog CLI
      • Apidog CLI Options
    • CI CD
      • Overview
      • Integrate with Gitlab
      • Integrate with Jenkins
      • Trigger Test by Git Commit
      • Integrate with Github Actions
  • Publish API Docs
    • Overview
    • API Technologies Supported
    • Quick Share
    • Viewing API Documentation
    • Markdown Documentation
    • Publishing Documentation Sites
    • Custom Layouts
    • Custom CSS, JavaScript, HTML
    • Custom Domain
    • LLM-Friendly Features
    • SEO Settings
    • Advanced Settings
      • Documentation Search
      • CORS Proxy
      • Integrating Google Analytics with Doc Sites
      • Folder Tree Settings
      • Visibility Settings
      • Embedding Values in Document URLs
    • API Versions
      • Overview
      • Creating API Versions
      • Publishing API Versions
      • Sharing Endpoints with API Versions
  • Send Requests
    • Overview
    • SSE Debugging
    • MCP Client
    • Socket.IO
    • WebSocket
    • Webhook
    • SOAP or WebService
    • GraphQL
    • gRPC
    • Use Request Proxy Agents for Debugging
    • Create Requests
      • Request History
      • Request Basics
      • Parameters and Body
      • Request Headers
      • Request Settings
      • Debug Requests
      • Saving Requests as Endpoints
      • HTTP/2
    • Response and Cookies
      • Viewing API Responses
      • Managing Cookies
      • Overview
    • Authentication and Authorization
      • Overview
      • CA and Client Certificates
      • Authorization Types
      • Digest Auth
      • OAuth 1.0
      • OAuth 2.0
      • Hawk Authentication
      • Kerberos
      • NTLM
      • Akamai EdgeGrid
  • Branches
    • Overview
    • Creating a Sprint Branch
    • Testing APIs in a Branch
    • Designing APIs in a Branch
    • Merging Sprint Branches
    • Managing Sprint Branches
  • AI Features
    • Overview
    • Enabling AI Features
    • Generating Test Cases
    • Modifying Schemas with AI
    • Endpoint Compliance Check
    • API Documentation Completeness Check
    • AI-Powered Field Naming
    • FAQs
  • Apidog MCP Server
    • Overview
    • Connect Apidog Project to AI
    • Connect Published Documentation to AI
    • Connect OpenAPI Files to AI
  • Best Practices
    • Handling API Signatures
    • Accessing OAuth 2.0 Protected APIs
    • Collaboration Workflow
    • Managing Authentication State
  • Offline Space
    • Overview
  • Administration
    • Managing Teams
      • Managing Teams
      • Managing Team Members
      • Member Roles & Permission Settings
      • Team Activities
      • Team Resources
        • General Runner
        • Team Variables
        • Request Proxy Agent
      • Real-time Collaborations
        • Team Collaboration
    • Onboarding Checklist
      • Basic Concepts
      • Onboarding Guide
    • Managing Projects
      • Managing Projects
      • Managing Project Members
      • Notification Settings
      • Project Resources
        • Database Connection
        • Git Connection
    • Managing Organization
      • Managing Organization
      • Single Sign-On (SSO)
        • SSO Overview
        • Configuring Microsoft Entra ID
        • Configuring Okta
        • Configuring SSO for an Organization
        • Managing User Accounts
        • Mapping Groups to Teams
      • SCIM Provisioning
        • Introduction to SCIM Provisioning
        • Microsoft Entra ID
        • Okta
      • Plans Management
        • Billing Managers in Organizations
      • Organization Resources
        • Self-Hosted Runner
  • Billing
    • Overview
    • Credits
    • Alternative Payment Methods
    • Managing Subscriptions
    • Upgrading Your Plan
    • Moving Paid Teams to Organizations
  • Data & Security
    • Data Storage and Security
    • User Data Privacy and Security
    • Request Routing and Data Security
  • Add-ons
    • API Hub
    • Apidog Intellij IDEA Plugin
    • Browser Extension
      • Chrome
      • Microsoft Edge
    • Request Proxy
      • Request Proxy in Web
      • Request Proxy in Shared Docs
      • Request Proxy in Client
  • Account & Preferences
    • Account Settings
    • Generating OpenAPI Access Token
    • Notification
    • Language Settings
    • Hot Keys
    • Network Proxy Configuration
    • Backing Up Data
    • Updating Apidog
    • Deleting Account
    • Experimental Features
  • References
    • API Design-First Approach
    • Apidog OpenAPI Specificaiton Extensions
    • JSONPath
    • XPath
    • Regular Expressions
    • JSON Schema
    • CSV File Format
    • Installing Java Environment
    • Runner Deployment Environment
    • Apidog flavored Markdown
  • Apidog Europe
    • Apidog Europe
  • Support Center
HomeLearning Center
Support CenterAPI ReferencesDownloadChangelog
HomeLearning Center
Support CenterAPI ReferencesDownloadChangelog
Discord Community
Slack Community
X / Twitter
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
  1. Apidog CLI

Apidog CLI Options

Basic Apidog CLI Syntax#

Online execution:
Use the Apidog access token along with the ID of a specific test scenario or test scenario directory. For example:
Local execution:
Specify the URL or file path of the Apidog test scenario. For example:

Options#

OptionDescription
--access-token <accessToken>Set authentication token for online execution
-t, --test-scenario <testScenarioId>Specify test scenario ID to run
-f, --test-scenario-folder <folderId>Specify test scenario directory ID to run
-r, --reporters [reporters]Specify test report types (default: ["cli"])
--out-dir <outDir>Output directory for test reports (default: "./apidog-reports")
--out-file <outFile>Output test report file name with no need to add a file extension (default: "apidog-report-{GENERATE_TIME}"). You can use special variables: {FOLDER_NAME} {SCENARIO_NAME} {GENERATE_TIME}
--out-json-failures-separated <outJsonFailuresSeparated>Export failures as separate JSON file
-e, --environmentSpecify runtime environment
-n, --iteration-count <n>Set number of iterations
-d, --iteration-data <path>Set data for case iterations (JSON or CSV)
--variables <path>Environment/global variables using from files in the specified path, instead of use initial values of environment/global variables.
--global-var <value>Set global variables (key=value format)
--env-var <value>Set environment variables (key=value format)
--external-program-path <path>Specify file path for external programs
--database-connection <path>Specify file path for database configuration
--ignore-redirectsPrevent automatic redirects
--silentPrevent console output
--color <value>Enable/disable colored console output
--delay-request [n]Specify delay between requests (ms)
--timeout-request [n]Specify request timeout (ms)
--timeout-script [n]Specify script execution timeout (ms)
-k, --insecureDisable SSL verification
--ssl-client-cert-list <path>Specify client certificate config path
--ssl-client-cert <path>Specify client certificate path (PEM)
--ssl-client-key <path>Specify client certificate private key path
--ssl-client-passphrase <passphrase>Specify client certificate passphrase
--ssl-extra-ca-certs <path>Specify additional trusted CA certificates
-b, --bigintEnable bigint compatibility
--upload-report [value]Upload test report overview to cloud
--preferred-http-version <preferredHttpVersion>Set preferred HTTP protocol version
--verboseDisplay detailed request and response information
--lang <language>Set CLI language (en)
-h, --helpDisplay help information

Uploading Files in CLI#

When working with APIs that require file uploads, it's important to understand that while Apidog only stores the local file path, while the actual file remains on your local computer. This can cause issues when executing tests via CLI on a different machine, as it won't be able to access the file using the stored path.
To resolve this issue, follow these steps:
1
Copy the required file to the machine running the CLI beforehand.
2
Copy the file path on the CLI machine.
3
In the Apidog test scenario, locate the step details for the file upload request and click the "Batch Edit" button.
Batch Edit button in test scenario step details
4
Replace the file field parameter value with the file path on the CLI machine(e.g., /opt/apidog/runner/yourfilename.jpg).
File path configuration in batch edit mode
After this configuration, the file can be correctly sent to Apidog through the CLI.
If you want to run this test scenario locally again, you'll need to modify the file path in the parameter value back to the path on your local machine.

Using Database Operations in CLI#

When your test scenarios include database operations, you need to take a few extra steps because database configurations are saved locally, not in the cloud. This means you can't directly run the CLI in cloud mode for these scenarios. Here's how to handle this situation:
1
For test scenarios that include database operations, you'll see a prompt in the command line generation interface: "Download the database configuration file."
2
Download this file and place it in the directory where you plan to run the Apidog CLI.
3
The automatically generated command line will include the --database-connection option. You can use this command line as is to run your tests.

Uploading Local CLI Test Reports to the Cloud#

To upload your local CLI test reports to the cloud, you can add the --upload-report parameter at the end of your CLI command. Here's how to do it:
1
Add the --upload-report parameter to your CLI command:
2
This command will run your tests and automatically upload the test report to the cloud after completion.
3
To view the uploaded report:
Go to the "Test Reports" section in your Apidog dashboard.
Look for the "Team Reports" column.
4
Note: For reports uploaded via CLI, the "Tester" field will be displayed as empty.

Using External Scripts/Programs in CLI#

You can reference external scripts or programs when running the Apidog CLI by adding their path at the end of the command. Here's how to do it:
In this example, the CLI is instructed to reference programs located in the ./scripts directory. If no hierarchy is specified, the default is the current CLI execution directory.
There are two main approaches to managing these external scripts:

1. Local Path#

To avoid confusion in managing local scripts, it's recommended to:
Organize all script files by category
Place them in a specific directory
Specify the corresponding local path in the CLI command

2. Cloud Code Repository#

Alternatively, you can:
Host script files in a cloud-based code repository
Set up pull commands in your CI/CD workflow to fetch external scripts to the local environment
Specify the actual path of the external scripts in the CLI command

SSL#

Client Certificate#

Apidog CLI supports passing in client certificates.

Using Single SSL Client Certificate#

--ssl-client-cert
Specify the path of the public SSL client certificate.
--ssl-client-key
Specify the path of the private SSL client certificate (optional).
--ssl-client-passphrase
Specify SSL client passphrase (optional).

Using SSL Client Certificates Configuration File (Supports Multiple Certificates)#

--ssl-client-cert-list
Specify the path of the JSON file of the SSL client certificate list. For example:ssl-client-cert-list.json
[
    {
        "name": "domain1",
        "matches": ["https://test.domain1.com/*", "https://www.domain1/*"],
        "key": {"src": "/CI/client.domain1.key"},
        "cert": {"src": "/CI/client.domain1.crt"},
        "passphrase": "changeme"
    },
    {
        "name": "domain2",
        "matches": ["https://domain2.com/*"],
        "key": {"src": "/CI/client.domain2.key"},
        "cert": {"src": "/CI/client.domain2.crt"},
        "passphrase": "changeme"
    }
]
This option supports setting different SSL client certificates based on URL or hostname. It takes precedence over the --ssl-client-cert, --ssl-client-key, and --ssl-client-passphrase options. These options will be used as fallback options if there is no match for the URL in the list.

HTTP/2#

The CLI can be configured to use specific protocol versions for sending requests by using the --preferred-http-version parameter.
Protocol version parameter values:
1.
"HTTP/2" - HTTP/2 Application-Layer Protocol Negotiation (ALPN), supported only for HTTPS requests.
2.
"HTTP/2-with-prior-knowledge" - HTTP/2 with prior knowledge
3.
"HTTP/1" - HTTP/1.1
The parameter supports the following configurations:
1.
Setting different protocol versions for HTTPS and HTTP requests:
2.
Setting the same protocol version for both HTTPS and HTTP:
3.
Setting HTTP/2 for both HTTPS and HTTP (unsupported values will be automatically ignored):

FAQ#

Q: How to handle the error message Invalid character in header content["Authorization"]?
A: If you're certain that running test scenarios in the Apidog client or web interface doesn't produce any errors, please check if you've set INITIAL values for variables in your environment.
Modified atΒ 2026-01-20 10:07:21
Previous
Installing and Running Apidog CLI
Next
Overview
Built with