Core Features

API Explorer

A built-in Postman-like request builder. Test your endpoints directly within the context of your authenticated application session.

  • Authenticated Requests:

    Automatically includes your session tokens from registered adapters (Supabase, NextAuth, Clerk, Firebase, etc.) in all requests.

  • Parameter Management:

    Define path and query parameters with types, descriptions, defaults, and examples. Parameters are automatically replaced in URLs or added as query strings.

  • Sample Payloads & Responses:

    Pre-define example request bodies (loadable with "Load Sample" button) and responses (shown in empty state and "sample" tab).

  • cURL Export:

    Generate terminal-ready commands from any request.

  • History & Replay:

    Keep track of your last 50 requests and replay them instantly with one click from the history sidebar.

  • Custom Endpoints:

    Define your project's specific endpoints in .devconsole.json to have them appear pre-filled in the explorer.

Configurable API Endpoints

You can define custom API endpoints in your .devconsole.json file to make them available in the API Explorer. Custom endpoints are merged additively with predefined ones, allowing you to organize your project's API endpoints for easy testing and debugging.

Configuration Example

Add an apiEndpoints array to your .devconsole.json file:

json
{
  "version": "1.0.0",
  "apiEndpoints": [
    {
      "id": "get-user",
      "name": "Get Current User",
      "description": "Fetch profile for current authenticated session",
      "url": "/api/v1/users/me",
      "method": "GET",
      "category": "User",
      "requiresAuth": true,
      "hasParams": false,
      "hasBody": false
    },
    {
      "id": "create-project",
      "name": "Create Project",
      "description": "Create a new project in the workspace",
      "url": "/api/v1/projects",
      "method": "POST",
      "category": "Data",
      "requiresAuth": true,
      "hasParams": false,
      "hasBody": true
    },
    {
      "id": "delete-project",
      "name": "Delete Project",
      "description": "Delete a project by ID",
      "url": "/api/v1/projects/:id",
      "method": "DELETE",
      "category": "Data",
      "requiresAuth": true,
      "hasParams": true,
      "hasBody": false
    }
  ]
}

Endpoint Properties

PropertyTypeRequiredDescription
idstringYesUnique identifier for the endpoint
namestringYesDisplay name in the API Explorer
descriptionstringYesDescription of what the endpoint does
urlstringYesAPI endpoint URL (supports path parameters like :id)
methodGET | POST | PUT | DELETE | PATCHYesHTTP method for the request
categorystringYesCategory for grouping endpoints (e.g., "User", "Data", "Analytics")
requiresAuthbooleanNoWhether the endpoint requires authentication (default: true)
hasParamsbooleanNoWhether the endpoint accepts path/query parameters (default: false)
hasBodybooleanNoWhether the endpoint accepts a request body (default: false)
tagsstring[]NoArray of tags for additional filtering/organization
paramsParamDefinition[]NoParameter definitions for path/query params (see below)
samplePayloadobjectNoExample request body (loadable with "Load Sample" button)
sampleResponseobjectNoExample response (shown in empty state and "sample" tab)

Parameters

When hasParams is true, you can define parameters using the params array. Each parameter definition includes:

PropertyTypeDescription
namestringParameter name
typestring | number | boolean | object | arrayParameter data type
descriptionstringHelp text shown in the UI
requiredbooleanWhether the parameter is required (marked with *)
isPathParambooleanIf true, replaces :param in URL
isQueryParambooleanIf true, added as query parameter (?key=value)
defaultanyDefault value (auto-filled in UI)
exampleanyExample value (shown as placeholder)

Complete Example with Parameters

json
{
  "apiEndpoints": [
    {
      "id": "update-journal",
      "name": "Update Journal",
      "description": "Update a journal entry by ID",
      "url": "/api/journals/:id",
      "method": "PATCH",
      "category": "JOURNALS",
      "requiresAuth": true,
      "hasParams": true,
      "hasBody": true,
      "params": [
        {
          "name": "id",
          "type": "string",
          "description": "Journal entry ID",
          "required": true,
          "isPathParam": true,
          "example": "journal-id-123"
        }
      ],
      "samplePayload": {
        "title": "Updated Title",
        "content": "Updated content..."
      },
      "sampleResponse": {
        "data": {
          "id": "journal-id-123",
          "title": "Updated Title",
          "content": "Updated content...",
          "updated_at": "2024-01-01T01:00:00Z"
        }
      }
    },
    {
      "id": "list-journals",
      "name": "List Journals",
      "description": "List all journals with pagination",
      "url": "/api/journals",
      "method": "GET",
      "category": "JOURNALS",
      "requiresAuth": true,
      "hasParams": true,
      "hasBody": false,
      "params": [
        {
          "name": "page",
          "type": "number",
          "description": "Page number",
          "required": false,
          "isQueryParam": true,
          "default": 1,
          "example": 1
        },
        {
          "name": "page_size",
          "type": "number",
          "description": "Items per page",
          "required": false,
          "isQueryParam": true,
          "default": 10,
          "example": 10
        }
      ],
      "sampleResponse": {
        "data": [
          {
            "id": "journal-1",
            "title": "My Journal",
            "created_at": "2024-01-01T00:00:00Z"
          }
        ]
      }
    }
  ]
}

Merging Behavior

Custom endpoints defined in your .devconsole.json file are merged additively with predefined endpoints. The merging order is:

  1. Predefined endpoints (built into DevConsole)
  2. File-based endpoints (from .devconsole.json)
  3. Local storage endpoints (user-added via the UI)

All endpoints appear together in the API Explorer, organized by category for easy navigation. This allows you to extend the default set of endpoints with your project-specific APIs while maintaining access to the built-in examples.

Tip: Organize your endpoints by category (e.g., "Auth", "User", "Data", "Analytics") to make them easier to find in the explorer sidebar. Categories are displayed as badges next to each endpoint.