# API Mode
API Mode allows you to trigger the yc-360 script remotely via HTTP APIs. This mode is ideal for integrating with external tools or custom automation workflows to perform on-demand diagnostics of your Java and Node.js applications.
Choose your environment to follow step-by-step instructions:
1. Create a directory for yc-360 script
mkdir -p /opt/workspace/yc-360
cd /opt/workspace/yc-360
2
2. Download the latest yc-360 script
wget https://tier1app.com/dist/ycrash/yc-360-latest.zip
3. Extract the downloaded zip file
unzip yc-360-latest.zip
4. After unzipping, navigate to the linux directory. Inside this directory, select the yc-360 script that matches your server's architecture (amd64 or arm64).
5. Download the YAML Configuration File: Use the following command to download the sample yc-config.yaml configuration template.
wget https://tier1app.com/dist/docs/yc-360-script/api-mode/yc-config.yaml.
Replace the placeholders in the YAML configuration file with your actual values:
{API_KEY}: Your API key was provided with your license at the time of registration. If you're not sure where to find the API key, click here (opens new window).{http://MY-YC-SERVER:PORT}: URL of the yCrash server (e.g., http://localhost:8080 (opens new window)). If you're not sure where to find the Server URL, click here (opens new window){JAVA_HOME}: The directory path where Java is installed in your environment.{APPLICATION_NAME}: Friendly name for the application (displayed in the yCrash dashboard).{YC_360_SCRIPT_PORT}: Port in which yc-360 script should be listening for the API request.{YC_360_SCRIPT_IP_ADDRESS}: IP address in which yc-360 script should be listening for the API request.
For a full list of arguments, refer to the All yc-360 Script Arguments page.
Say you want the yc-360 script to be listening on the port 8085 and the same IP address of the host in which the yc-360 script is running then in the YAML configuration file specify below arguments:
port: 8085
address: 0.0.0.0
2
IMPORTANT NOTE:
- To enable API Mode, both
portandaddressparameters must be specified in the configuration file.
# Complete Sample Configuration
version: '1'
options:
k: buggycompany@aeiou-c3eb-4c9a-8254-f000d07245cc
s: 'http://localhost:8080/'
j: '/opt/java1.8'
a: myApp
port: 8085
address: 0.0.0.0
2
3
4
5
6
7
8
6. Execute yc-360 Script: Run the script with:
For Java applications:
./yc -c yc-config.yaml
For Node.js applications:
Before running the script, make sure your Node.js application has the yCrash hook loaded. This is a one time setup step on the application side, separate from running yc-360 itself. See Node.js Diagnostic Capture for how to configure it.
./yc -c yc-config.yaml -appRuntime=nodejs
7. Invoke Action API: Once the script is running, you can send HTTP POST requests to the configured port and address to interact with the yc-360 script. To learn more how to invoke Action API, please visit Action API page.
IMPORTANT TIP:
For Java applications:
The yc-360 script must be executed with the same user privileges as the Java application. For example, if the application runs under the
tomcat-useruser, yc-360 script must also be executed bytomcat-useruser.To detect memory-related issues, GC logging must be enabled for your application. You can enable GC logging by using the JVM arguments listed here.
The yc-360 script doesn't capture heap dump by default. Pass
-hdargument to capture heap dump. For more information, please visit How to Capture Heap Dump?
For Node.js applications:
The yc-360 script must be executed with the same user privileges as the Node.js application.
The yCrash hook must already be loaded in the target process before the script runs. It can't attach to an application after the fact. See Node.js Diagnostic Capture for setup.
GC Log auto discovery works out of the box on Linux, as long as the application was started with
--trace-gc.
1. Create a directory for yc-360 script
mkdir -p /opt/workspace/yc-360
cd /opt/workspace/yc-360
2
2. Download the latest yc-360 script
wget https://tier1app.com/dist/ycrash/yc-360-latest.zip
3. Extract the downloaded zip file
unzip yc-360-latest.zip
4. After unzipping, navigate to the mac directory. Inside this directory, select the yc-360 script that matches your server's architecture (amd64 or arm64).
5. Download the YAML Configuration File: Use the following command to download the sample yc-config.yaml configuration template.
wget https://tier1app.com/dist/docs/yc-360-script/api-mode/yc-config.yaml.
Replace the placeholders in the YAML configuration file with your actual values:
{API_KEY}: Your API key was provided with your license at the time of registration. If you're not sure where to find the API key, click here (opens new window).{http://MY-YC-SERVER:PORT}: URL of the yCrash server (e.g., http://localhost:8080 (opens new window)). If you're not sure where to find the Server URL, click here (opens new window){JAVA_HOME}: The directory path where Java is installed in your environment.{APPLICATION_NAME}: Friendly name for the application (displayed in the yCrash dashboard).{YC_360_SCRIPT_PORT}: Port in which yc-360 script should be listening for the API request.{YC_360_SCRIPT_IP_ADDRESS}: IP address in which yc-360 script should be listening for the API request.
For a full list of arguments, refer to the All yc-360 Script Arguments page.
Say you want the yc-360 script to be listening on the port 8085 and the same IP address of the host in which the yc-360 script is running then in the YAML configuration file specify below arguments:
port: 8085
address: 0.0.0.0
2
IMPORTANT NOTE:
- To enable API Mode, both
portandaddressparameters must be specified in the configuration file.
# Complete Sample Configuration
version: '1'
options:
k: buggycompany@aeiou-c3eb-4c9a-8254-f000d07245cc
s: 'http://localhost:8080/'
j: '/opt/java1.8'
a: myApp
port: 8085
address: 0.0.0.0
2
3
4
5
6
7
8
6. Execute yc-360 Script: Run the script with:
For Java applications:
./yc -c yc-config.yaml
For Node.js applications:
Before running the script, make sure your Node.js application has the yCrash hook loaded. This is a one time setup step on the application side, separate from running yc-360 itself. See Node.js Diagnostic Capture for how to configure it.
./yc -c yc-config.yaml -appRuntime=nodejs
7. Invoke Action API: Once the script is running, you can send HTTP POST requests to the configured port and address to interact with the yc-360 script. To learn more how to invoke Action API, please visit Action API page.
IMPORTANT TIP:
For Java applications:
The yc-360 script must be executed with the same user privileges as the Java application. For example, if the application runs under the
tomcat-useruser, yc-360 script must also be executed bytomcat-useruser.To detect memory-related issues, GC logging must be enabled for your application. You can enable GC logging by using the JVM arguments listed here.
The yc-360 script doesn't capture heap dump by default. Pass
-hdargument to capture heap dump. For more information, please visit How to Capture Heap Dump?
For Node.js applications:
The yc-360 script must be executed with the same user privileges as the Node.js application.
The yCrash hook must already be loaded in the target process before the script runs. It can't attach to an application after the fact. See Node.js Diagnostic Capture for setup.
GC Log auto discovery works out of the box on macOS, as long as the application was started with
--trace-gc.
1. Download: Download the latest version of the yc-360 script from here (opens new window).
2. Extract: Unzip the package and navigate to the windows directory:
cd windows
3. Create YAML Configuration File: Download sample YAML configuration file: yc-config.yaml (opens new window).
Replace the placeholders in the YAML configuration file with your actual values:
{API_KEY}: Your API key was provided with your license at the time of registration. If you're not sure where to find the API key, click here (opens new window).{http://MY-YC-SERVER:PORT}: URL of the yCrash server (e.g., http://localhost:8080 (opens new window)). If you're not sure where to find the Server URL, click here (opens new window){JAVA_HOME}: The directory path where Java is installed in your environment.{APPLICATION_NAME}: Friendly name for the application (displayed in the yCrash dashboard).{YC_360_SCRIPT_PORT}: Port in which yc-360 script should be listening for the API request.{YC_360_SCRIPT_IP_ADDRESS}: IP address in which yc-360 script should be listening for the API request.
For a full list of arguments, refer to the All yc-360 Script Arguments page.
Say you want the yc-360 script to be listening on the port 8085 and the same IP address of the host in which the yc-360 script is running then in the YAML configuration file specify below arguments:
port: 8085
address: 0.0.0.0
2
IMPORTANT NOTE:
- To enable API Mode, both
portandaddressparameters must be specified in the configuration file.
# Complete Sample Configuration
version: '1'
options:
k: buggycompany@aeiou-c3eb-4c9a-8254-f000d07245cc
s: 'http://localhost:8080/'
j: '/opt/java1.8'
a: myApp
port: 8085
address: 0.0.0.0
2
3
4
5
6
7
8
4. Execute yc-360 Script: Run the script with:
For Java applications:
.\yc -c yc-config.yaml
For Node.js applications:
Before running the script, make sure your Node.js application has the yCrash hook loaded. This is a one time setup step on the application side, separate from running yc-360 itself. See Node.js Diagnostic Capture for how to configure it.
.\yc -c yc-config.yaml -appRuntime=nodejs
5. Invoke Action API: Once the script is running, you can send HTTP POST requests to the configured port and address to interact with the yc-360 script. To learn more how to invoke Action API, please visit Action API page.
IMPORTANT TIP:
For Java applications:
The yc-360 script must be executed with the same user privileges as the Java application. For example, if the application runs under the
tomcat-useruser, yc-360 script must also be executed bytomcat-useruser.To detect memory-related issues, GC logging must be enabled for your application. You can enable GC logging by using the JVM arguments listed here.
The yc-360 script doesn't capture heap dump by default. Pass
-hdargument to capture heap dump. For more information, please visit How to Capture Heap Dump?
For Node.js applications:
The yCrash hook must already be loaded in the target process before the script runs. It can't attach to an application after the fact. See Node.js Diagnostic Capture for setup.
GC Log capture on Windows requires
-nodejsGCLogPathpointing at your application's redirected output file. There's no auto discovery on this platform. SeenodejsGCLogPath.
You can run the yc-360 script in a Docker environment using one of the following approaches, depending on your deployment setup and monitoring preferences:
Run yc-360 Script in Sidecar Container – Run the script in a separate container alongside your application container.
Run yc-360 Script in Same Container – Embed the yc-360 script directly inside the application container.
Run yc-360 Script on Host – Run the script on the host that is running your Docker containers.
For Node.js applications, set NODE_OPTIONS as an environment variable on your application's container before you start it. See Node.js Diagnostic Capture for the full setup, including how to point both sides at a shared runtime directory in a containerized deployment.
You can run the yc-360 script in a Kubernetes environment using one of the following approaches, depending on your deployment setup and monitoring preferences:
Run yc-360 Script in Sidecar Container – Add yc-360 as a separate container in your pod spec.
Run yc-360 Script in Same Container – Install and run the script directly inside your application container.
For Node.js applications, set NODE_OPTIONS in your pod's container env spec before the pod starts. See Node.js Diagnostic Capture for the full setup.
To monitor applications running in OpenShift, deploy the yc-360 script using:
Run yc-360 Script in Sidecar Container – Add yc-360 alongside your application within the pod template.
For Node.js applications, set NODE_OPTIONS in your pod's container env spec before the pod starts. See Node.js Diagnostic Capture for the full setup.