# yCrash API Reference (Swagger UI)

The yCrash API Reference is an interactive Swagger-based interface to discover, configure, and execute yCrash REST APIs directly from your browser.

Note:

This feature is available from version 3.3 and later

This page is useful for SRE, platform, and development teams who want to:

  • validate API connectivity quickly
  • test request parameters and payload formats
  • inspect live responses without external tools
  • understand expected success/error response shapes

# Supported APIs

  • Thread Dump Analysis API
  • GC Log Analysis API
  • Heap Dump Analysis API
  • LDAP JWT Token API (used in Bearer-token mode)

# Prerequisites

Before using the page, ensure you have:

  • access to a running yCrash server
  • valid authentication credentials (API key or LDAP account, depending on mode)
  • sample diagnostic files for testing (thread dump, GC log, heap dump)
  • network access from browser to the configured Host URL

# Accessing the API Reference

Open the API reference from the yCrash application:

<your-ycrash-server>/yc-api-swagger.jsp

Example:

https://your-ycrash-server/yc-api-swagger.jsp

# Authentication

yCrash supports two REST authentication modes.

# API Key mode

Pass apiKey as a query parameter for analysis API calls.

# LDAP Bearer-token mode

When LDAP REST API auth is enabled:

  1. Open LDAP JWT Token API in the endpoint list.
  2. Send username and password.
  3. Copy the returned token.
  4. Invoke analysis APIs with:
    • Authorization: Bearer <token>
    • ou=<organization-unit>

# Page Layout and Functionality

# Environment panel

  • Host URL: Base URL for API execution.
  • Apply: Saves and applies the entered host.
  • Reset: Restores default host for the deployment.

# Endpoints panel

Select one API to load its request form, description, and sample responses.

# Request panel

Shows:

  • method and endpoint path
  • required query/header/body fields
  • optional parameters in a collapsed accordion
  • file upload input (where binary payloads are expected)

# Response panel

Shows live execution output:

  • HTTP status code
  • response time
  • response payload (JSON/XML/text)

# Sample Responses

Expandable response examples for common status codes:

  • 200 (successful analysis/token generation)
  • 400 (invalid request/payload)
  • 401 (authentication/authorization issues)
  • 500 (internal server error)

# Upload and Request Behavior

For analysis APIs in this UI, uploaded files are sent as raw request body.

Where supported, you can also:

  • use location query parameter for server-side file download
  • provide Content-Encoding for compressed payloads

Common compression examples: gz, zip, zstd, bz2, deflate.

# API Details

# Thread Dump Analysis API

Upload and analyze thread dumps. Responses include diagnostics such as thread state breakdowns, suspected contention patterns, and report links.

Typical use:

  • attach one or more thread dump files
  • optionally tag with appName, host, or tags
  • review generated report URLs from response

# GC Log Analysis API

Upload and analyze GC logs. Responses summarize memory behavior, pause-time trends, throughput, and tuning-oriented recommendations.

Typical use:

  • upload GC log file
  • optionally enable extra response flags (for graphs/normalization where available)
  • use report links for deeper investigation

# Heap Dump Analysis API

Upload and analyze heap dump files (HPROF/PHD compatible). Responses highlight leak suspects, dominant memory consumers, and retained-size hotspots.

Typical use:

  • upload heap dump from incident window
  • compare suspicious object groups in report
  • validate suspected leak chains and large allocations

# LDAP JWT Token API

Generates a JWT token for Bearer authentication mode.

Request:

  • content type: application/json
  • body: username, password

Use returned token in Authorization header for subsequent analysis calls.