Skip to content

Protocol Support

Anes Berbic edited this page Mar 13, 2026 · 1 revision

Protocol Support

ApiArk supports 6 API protocols in a unified interface. Each protocol gets its own tab type with protocol-specific UI.


REST / HTTP

Full-featured HTTP client supporting all standard methods.

Methods

GET POST PUT PATCH DELETE HEAD OPTIONS

Features

  • URL bar with method selector
  • Query parameters editor (key-value with enable/disable)
  • Headers editor (key-value with enable/disable, bulk edit)
  • Body editor: JSON, XML, Form Data, URL-encoded, Raw Text, Binary
  • Path variables (:paramName auto-detected)
  • Response viewer: Pretty (syntax-highlighted), Raw, Preview (HTML render)
  • Response metadata: status code, response time, size
  • Response headers and cookies viewer
  • Copy response, save to file
  • cURL import/export
  • Code generation (JavaScript fetch, Python requests, cURL)

Example Request

name: List Users
method: GET
url: "{{baseUrl}}/api/users"
params:
  page: 1
  limit: 20
headers:
  Accept: application/json
auth:
  type: bearer
  token: "{{accessToken}}"

GraphQL

First-class GraphQL support with schema-aware features.

Features

  • Schema introspection — Auto-fetches schema from the endpoint
  • Auto-complete — IntelliSense for queries, mutations, fields
  • Variables editor — JSON panel for GraphQL variables
  • Schema explorer — Browse types, fields, and documentation
  • Query syntax highlighting — Full GraphQL syntax support in Monaco
  • Multiple operations — Support for named queries in one document

Example

query GetUsers($first: Int!, $after: String) {
  users(first: $first, after: $after) {
    edges {
      node {
        id
        name
        email
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Variables:

{
  "first": 10,
  "after": "cursor_abc123"
}

Tips

  • Press Ctrl+Space for auto-complete suggestions
  • Click "Refresh Schema" after API changes
  • Schema is cached locally — works offline after first fetch

gRPC

Full gRPC support with all call types.

Features

  • Proto file loading — Import .proto files or entire directories
  • Server reflection — Auto-discover services without proto files
  • All call types:
    • Unary (request/response)
    • Server streaming
    • Client streaming
    • Bidirectional streaming
  • Service explorer — Browse services, methods, and message types
  • Message editor — JSON editor with proto-aware validation
  • Metadata — Add gRPC metadata (similar to headers)
  • TLS support — Connect to TLS-enabled gRPC servers

Setup

  1. Create a new gRPC request
  2. Enter the server address: localhost:50051
  3. Either:
    • Load proto file(s) from your filesystem
    • Use server reflection (if the server supports it)
  4. Select a service and method
  5. Fill in the message fields
  6. Click Send

Example Message

{
  "name": "John Doe",
  "email": "john@example.com",
  "age": 30
}

WebSocket

Real-time bidirectional communication.

Features

  • Connection management — Connect/disconnect with status indicator
  • Send messages — Text (JSON, plain text) and binary
  • Message log — Real-time list of sent/received messages with timestamps
  • Auto-reconnect — Optional automatic reconnection on disconnect
  • Custom headers — Add headers to the WebSocket handshake
  • Message formatting — Auto-format JSON messages in the log

Usage

  1. Create a new WebSocket request
  2. Enter the WebSocket URL: wss://echo.websocket.org
  3. Click Connect
  4. Type a message and click Send
  5. See sent/received messages in the log

Connection URL Formats

ws://localhost:8080/ws
wss://api.example.com/socket
wss://echo.websocket.org

Tips

  • Messages are color-coded: sent (blue) vs received (green)
  • Click any message to view full content
  • Use the filter to search through message history
  • JSON messages are auto-detected and pretty-printed

SSE (Server-Sent Events)

One-way real-time event streaming from server to client.

Features

  • Connect to SSE endpoint — Standard EventSource protocol
  • Real-time event viewer — Events appear as they arrive
  • Event type filtering — Filter by event name
  • Auto-reconnect — Built-in reconnection with Last-Event-ID
  • Custom headers — Add auth headers to the SSE connection

Usage

  1. Create a new SSE request
  2. Enter the SSE endpoint URL
  3. Click Connect
  4. Events stream in real-time

Event Display

Each event shows:

  • Event type (e.g., message, update, heartbeat)
  • Event data (auto-formatted if JSON)
  • Timestamp
  • Event ID (if provided)

MQTT

Lightweight messaging protocol for IoT and real-time apps.

Features

  • Broker connection — Connect to any MQTT broker
  • Subscribe — Subscribe to topics with wildcard support (+, #)
  • Publish — Send messages to topics
  • QoS levels — 0 (at most once), 1 (at least once), 2 (exactly once)
  • Message log — Real-time view of published/received messages
  • TLS support — Secure connections to MQTT brokers

Connection Settings

Host: mqtt.example.com
Port: 1883 (or 8883 for TLS)
Client ID: apiark-client
Username: (optional)
Password: (optional)

Topic Wildcards

  • sensors/+/temperature — Single level wildcard
  • sensors/# — Multi-level wildcard

Protocol Comparison

Feature REST GraphQL gRPC WebSocket SSE MQTT
Request/Response Yes Yes Yes No No No
Streaming No Subscriptions Yes Yes Yes (server) Yes
Binary Yes No Yes (protobuf) Yes No Yes
Browser native Yes Yes No Yes Yes No
Schema OpenAPI GraphQL SDL Proto No No No
Assertions Yes Yes Yes No No No
Scripting Yes Yes Yes No No No

Clone this wiki locally