Skip to main content

Developer Portal API Test

Overview​

This tutorial explains how developers can test APIs directly from the Developer Portal using an embedded testing tool. It supports multiple API protocols such as REST, GraphQL, and WebSocket, allowing developers to interact with endpoints without leaving the portal.

Prerequisites​

  • The target API must be deployed and published to a Gateway
  • API must be part of a Product that is visible on the Developer Portal
  • You must be logged into the Developer Portal and have access to the API Product

Testing a REST API​

  • Select an API from the Product Detail page
  • Go to the Test tab of the API

Example:

FieldExample Value
MethodGET
URLhttps://echo.hoppscotch.io
HeadersOptional (e.g., Authorization: Bearer token)
Query ParametersAdd as needed

Click Send and observe the response body, status code, and headers

Testing a GraphQL API​

query Request {
method
url
headers {
key
value
}
}

Click Connect, then execute your query

Testing a WebSocket API​

  • Select the WebSocket tab
  • Enter a WebSocket endpoint (e.g., wss://echo-websocket.hoppscotch.io)
  • Click Connect
  • Send a test message in JSON format:
{
"message": "Hello WebSocket"
}

View the real-time response returned by the server

Best Practices​

  • Use test environments or mock servers when trying public APIs
  • For authenticated APIs, provide headers or tokens manually
  • Use GraphQL introspection if available to auto-load schema
  • For WebSocket, test handshake and message protocols incrementally