Build API Docs with Apidog
  1. Basics
Build API Docs with Apidog
  • Overview
  • REST API Documentations
    • Basics
      • API-Design First Approach
      • Specify an endpoint
      • Components
      • Common parameters
      • Global parameters
      • Schemas
        • Overview
        • Create a new schema
        • Build a schema
        • Generate Schemas from JSON etc.
    • Advanced features
      • Custom endpoint fields
      • Endpoint status
      • Appearance of parameter lists
      • Endpoint unique idenfication
    • Example: Pet Store
      • Get user info
      • Find pet by ID
      • Add a new pet to the store
      • Update an existing pet
      • Deletes a pet
      • Finds Pets by status
  • SOAP API Documentations
    • How to Use Apidog to Write SOAP API Documentation
    • Example: WebService
      • WebService: Number To Words
      • SOAP: Add integers
      • SOAP/WSDL: Ebay
    • Example: Mastercard
      • Purchase Request
      • Submit a purchase request
  • GraphQL Documentation
    • How to Write GraphQL API Documentation Using Apidog
    • Example: Github
      • Introduction to GraphQL
      • Queries
      • Public schema
  • WebSocket Documentations
    • How to Use Apidog to Write WebSocket API Documentation
    • Example: Coinbase
      • Overview
      • Channel
  • SSE API Documentations
    • Example: Anthropic
      • Streaming Messages
      • Messages
  • gRPC API Documentations
    • How to Use Apidog for gRPC API Documentation and Testing
    • Example: Proto Documentation
      • Protocol Documentation
  1. Basics

Global parameters

Global parameters let you define common parameters that can be applied across your entire project. These parameters can be included automatically in all endpoint requests, boosting both the efficiency and consistency of your API testing.

How to Configure Global Parameters#

1.
Navigate to "Environment Management" found at the top right of the page to access the global parameter settings.
global-params-setting-page.png
2.
Choose where the parameter should be used (Headers, Cookies, Query, or Body).
3.
Fill in the parameter details(parameter name, type, default value, etc.).
4.
Enable or disable the parameter using the toggle switch.
5.
Save your configuration settings.

Explanations of Parameter Configuration#

Global Parameter Types#

Global parameters can be used in:
1.
Headers (Request Header)
2.
Cookies (Cookie Information)
3.
Query (URL Query Parameter)
4.
Body (Request Body Parameter)

Parameter Property#

Name: The name that identifies the parameter in requests.
Type: The data type, such as string or number.
Default Value: A suggested preset value, which is often in the format of {{variable}}.
Default: A toggle to control whether the parameter is effective.
Description: An explanation of what the parameter is for.
global-variable-settings.png

Special Mark#

The *(asterisk) mark indicates that the parameter is required.

Example Usage#

Let’s take theAPI_KEYshown in the image above as an example:
Location: Header (Request Header)
Name: Authorization
Type: string
Default Value: {{API_KEY}}, sourced from environment variables
Purpose: API Key for DeepSeek API
global-params-default-value.png
After sending a request, you can view the parameter details in the response console underActual Request.
global-parameters-usage-example.png

Important Notes#

1.
Global parameters have lower priority than parameters defined at the endpoint level.
2.
Always check for duplicate names when adding new parameters to avoid conflicts.
3.
Make sure each parameter type aligns with how it will be used to ensure effectiveness.
4.
For sensitive information, it’s best to use environment variables or other secure methods for parameter management.

FAQs#

How to temporarily disable a global parameter?
Simply toggle the enable/disable switch on the right side of the parameter.
set-default-global-parameters.png
What is the difference between global parameters and environment variables?
Global parameters are for fixed configurations that remain the same in all environments, while environment variables are used to manage configurations that may change across different environments.
Previous
Common parameters
Next
Overview
Built with