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. Quick Start
  • 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
    • Generate requests
    • Send requests
    • Debug cases
    • Test cases
    • Dynamic values
    • Validate responses
    • Design-first Mode & Request-first Mode
    • Generate 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
      • Overview
      • Wait
      • 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 in scripts
          • Using scripts to modify request messages
          • 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 or endpoint cases
      • Import endpoints or endpoint cases from other projects
      • Export test scenarios
    • Run test scenarios
      • Run a test scenario
      • Run test scenarios in batch
      • Manage the runtime environment of APIs from other projects
      • Data-driven testing
      • 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
      • Integrate with Gitlab
      • Overview
      • Integrate with Jenkins
      • Trigger Test by Git Commit
      • Integrate with Github Actions
  • Publish API Docs
    • Overview
    • API Technologies Supported
    • Quick share
    • View the API documentation
    • Markdown documentations
    • Publish docs 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
      • Create API versions
      • Publish API versions
      • Share endpoints with API versions
  • Send requests
    • Overview
    • SSE debugging
    • 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
      • Save the request as an endpoint
      • HTTP2
    • Response and cookies
      • Overview
      • API response in Apidog
      • Create and send cookies
    • Authentication and authorization
      • Overview
      • CA and client certificates
      • Authorization types supported by Apidog
      • Digest Auth
      • OAuth 1.0
      • OAuth 2.0
      • Hawk Authentication
      • Kerberos
      • NTLM
      • Akamai EdgeGrid
  • Branches
    • Overview
    • Create a new sprint branch
    • Test APIs in a branch
    • Design API in a branch
    • Merge sprint branches
    • Manage sprint branches
  • AI Features
    • Overview
    • Enable AI features
    • Generate Test Cases
    • Modify schemas with AI
    • Endpoint compliance check
    • API documentation completeness check
    • AI naming
    • FAQs
  • Apidog MCP Server
    • Overview
    • Connect API Specification within Apidog Project to AI via Apidog MCP Server
    • Connect Online API Documentation Published by Apidog to AI via Apidog MCP Server
    • Connect OpenAPI Files to AI via Apidog MCP Server
  • Best Practices
    • How to handle API signatures
    • How to access OAuth 2.0 protected APIs
    • Apidog collaboration workflow
    • Managing authentication state in Apidog
  • Offline Space
    • Overview
  • Administration
    • Onboarding Checklist
      • Basic Concepts
      • Onboarding Guide
    • 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
    • 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
        • Configure Microsoft Entra ID
        • Configure Okta
        • Configure SSO for an Organization
        • Managing user accounts
        • Mapping Groups to Teams
      • SCIM Provisioning
        • Intro to SCIM Provisioning
        • Microsoft Entra ID
        • Okta
      • Organization Resources
        • Self-hosted Runner
      • Plans management
        • Billing managers in organization
  • Billing
    • Overview
    • Credits
    • Unable to use credit cards
    • Managing subscriptions
    • Upgrade plan
    • How to move a paid team to a organization
  • Data & Security
    • Apidog data storage location and security
    • User data privacy and storage location
    • Request routing and data security
  • Add-ons
    • API Hub
    • Apidog Intellij IDEA plugin
    • Browser Extension
      • Chrome
      • Microsoft Edge
    • Request Proxy
      • Request proxy in Apidog web
      • Request proxy in shared docs
      • Request proxy in Apidog client
  • Account & preferences
    • Account settings
    • Generate OpenAPI access token
    • Notification
    • Language settings
    • Hot keys
    • Network proxy configuration
    • Data backup
    • Updating Apidog
    • Deleting account
    • Experimental Features
  • References
    • API-Design First Approach
    • Apidog OpenAPI Specificaiton Extensions
    • JSONPath
    • XPath
    • Regular Expressions
    • JSON Schema
    • CSV File Format
    • Install Java Environment
    • Runner deployment environment
    • Apidog flavored Markdown
  • Apidog Europe
    • Apidog Europe
  • Support Center
  • Schemas
    • MinifiedFestivalType
    • DateType
    • LocationType
    • ArtistType
    • FestivalType
    • GetAllFestivalsResponseType
    • GetFestivalByIdResponseType
    • UserType
    • GetUserResponseType
HomeLearning Center
Support CenterAPI ReferencesDownloadChangelog
HomeLearning Center
Support CenterAPI ReferencesDownloadChangelog
Discord Community
Slack Community
X / Twitter
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
  1. Quick Start

Adding an Assertion

For saved endpoints, you can add pre- and post-processors to prepare data or test the endpoint. Assertions are a type of post-processor in Apidog that allow you to validate API responses.

Prerequisites#

Before adding assertions, ensure you have:
At least one saved endpoint that you want to add assertions to
Basic understanding of JSON and API response structures

Steps to Add an Assertion#

1
Click on the Post Processors tab.
πŸ“· Visual Reference
image.png
2
Click on Add PostProcessor and select Assertion.
3
Fill in the Assertion form with the validation details. For example, to assert that the response category id is positive:
FieldValue
Name"id" is a positive integer
Target ObjectResponse JSON
JSONPath Expression$.category.id
Assertion RuleGreater than
Assertion Value0
JSONPath is a query language for JSON, used to select and extract data from JSON documents. You can click on the πŸ”¨ icon in the JSONPath Expression field to visually extract any JSONPath expression.
4
Click Send, and you will see the Assertion result in the bottom right corner.
πŸ“· Visual Reference
image.png
5
Click Save to save the changes you made.
In Apidog, you can visually add assertions, extract variables, perform database operations, and more. Learn more about pre and post processors.
You can also write assertions or implement other operations using scripts by simply adding a "Custom script". Apidog is compatible with Postman scripts, which can run in Apidog without modification. Learn more about Scripts.

Next Step
Create a test scenario
Modified atΒ 2026-01-09 10:53:26
Previous
Making a Request
Next
Creating Test Scenarios
Built with