api show

Displays information about the Dev Proxy REST API endpoints.

Synopsis

devproxy api show [options]

Options:
  --output <format>   Output format: text|json (default: text)
  -h, --help          Show help

Usage

devproxy api show

Options

Name Description Allowed values Default
--output <format> Output format text, json text
-?, -h, --help Show help and usage information n/a n/a

Examples

Show Dev Proxy API information

devproxy api show

Get API information as JSON

devproxy api show --output json

Remarks

Dev Proxy exposes an authenticated REST API at http://{api-ip-address}:{api-port} (default http://127.0.0.1:8897). All endpoints require the instance bearer token in the Authorization request header. To retrieve the token, use the api token command.

The api show command lists the API base URL, authentication requirements, available REST API endpoints, and a link to the API documentation. For each endpoint that accepts input, the output also includes a short hint with the expected query parameters (query:) or request body (body:). With --output json, it also includes the token file pattern and machine-readable request and response schemas for each endpoint. The base URL reflects the configured API address and port. To get the actual API URL of a running instance, for example when you use --api-port 0, use the status command. The API is available while Dev Proxy is running. Use the CLI for lifecycle operations (start, stop, configure), and use the REST API for runtime operations (proxy state, recording, mock management).

The following endpoints are available:

Method Endpoint Description Input
GET /proxy Get proxy status n/a
POST /proxy Update proxy status (for example, start or stop recording) Body: {"recording": true\|false}
POST /proxy/mockRequest Send a mock request n/a
POST /proxy/stopProxy Stop the proxy n/a
POST /proxy/jwtToken Create a JSON Web Token (JWT) Body: name, audiences, issuer, roles, scopes, claims, validFor (minutes), signingKey (all optional)
GET /proxy/rootCertificate Get the root certificate in PEM format Query: format=crt\|pem (optional, default crt)
GET /proxy/logs Get Dev Proxy logs (detached mode only) Query: lines, follow, since (all optional)

Text output

In text output, Dev Proxy appends the input hints to the endpoint description and ends the output with a link to the API documentation, for example:

  POST   /proxy                         Update proxy status (e.g. start/stop recording)  body: {"recording": true|false}
  GET    /proxy/rootCertificate         Get the root certificate in PEM format  query: format=crt|pem (optional, default crt)
  GET    /proxy/logs                    Get proxy logs (for detached mode access)  query: lines=50&follow=true&since=5m (all optional)

Docs: https://go.devproxy.net?go=api

JSON output

JSON output contains the following top-level properties:

Property Description
baseUrl Base URL of the API
authentication Authentication requirements: scheme, header, and tokenFilePattern
endpoints Available endpoints
docs Link to the API documentation (https://go.devproxy.net?go=api)

Each endpoint includes the following properties. Dev Proxy omits properties that don't apply to an endpoint, for example body and requestBody for endpoints that don't accept a request body.

Property Description
method HTTP method
path Endpoint path relative to the base URL
description Endpoint description
query Short, human-readable hint describing the query parameters
body Short, human-readable hint describing the request body
parameters Query parameters, each with name, in, description, required, and a JSON schema
requestBody Request body with required and a content map keyed by media type, each with a JSON schema
responses Possible responses keyed by status code, each with a description and an optional content map keyed by media type

The parameters, requestBody, and responses properties follow OpenAPI 3.1 conventions, so tools and AI agents can build requests without additional documentation and without starting Dev Proxy first. For example, the GET /proxy/rootCertificate endpoint is described as follows (some properties are shortened for brevity):

{
  "method": "GET",
  "path": "/proxy/rootCertificate",
  "description": "Get the root certificate in PEM format",
  "query": "format=crt|pem (optional, default crt)",
  "parameters": [
    {
      "name": "format",
      "in": "query",
      "description": "Certificate format. crt and pem are aliases (PEM-encoded). Defaults to crt.",
      "required": false,
      "schema": {
        "type": "string",
        "enum": [ "crt", "pem" ],
        "default": "crt"
      }
    }
  ],
  "responses": {
    "200": { ... },
    "400": {
      "description": "format is not supported",
      "content": {
        "application/problem+json": {
          "schema": { ... }
        }
      }
    }
  }
}

For the full API reference, see Proxy API.