# How to build your own yc-360-Script?
You can build your own script to analyze the dumps by transmitting them to the yCrash server. Isn’t it interesting? You only need to use three APIs to build the script.
This guide shows you how to build a script
# The Three yCrash APIs:
| API Name | Purpose |
|---|---|
| Receiver API(./yc-receiver) | This API call is used to upload diagnostics GC logs, thread dumps, top, vmstat, disk usage, netstat, dmesg, kernel, and your script-generated files |
| Receiver Heap API (./yc-receiver-heap) | This API is used specifically to upload heap dump files. |
| Fin API(./yc-fin) | The final API call is to generate the URL to view the RCA report and detailed analysis. |
# Required URL Parameters:
Each API call requires a set of query parameters in the URL. Here’s a breakdown of the parameters used in :
| Parameter | Description |
|---|---|
| apiKey | Your unique API key is provided by yCrash for authentication in the license file. The format of the API_KEY should be in {OU@apikey}. The value for the OU is the licensee name, which is provided in the license file. For example, the licensee and UserNo fields in license.lic are ORG1 and UserNo is 123-45sdf-sdd, then APIKey will be ORG1@123-45sdf-sdd. |
| de | Device/host name from which data is being uploaded (e.g., server hostname, IP address). |
| ts | Timestamp of the snapshot in format: yyyy-MM-dd'T'HH-mm-ss (e.g., 2025-07-22T11-45-00) |
| dt | You need to provide the type of file you are uploading to the yCrash server, like gc, td, top, vmstat, df, ps, ns. The detailed summary of each data type is explained below the table. |
| filename | The name of the uploaded file (e.g., heap_dump.zip). |
# Summary of Accepted "dt" (Data Type) Values for API
| Data Type(dt) | Description |
|---|---|
gc | Use this data type whenever you are transmitting the Garbage Collection logs to the server. |
td | Use this data type when transmitting the Thread dumps to the server |
top | Use this data type when transmitting the top output to the server |
vmstat | Use this data type while uploading the virtual memory statistics |
df | Use this data type for Disk usage info |
ed | If you have your own script which will generate any other files, then while uploading them those external data to yCrash server use this data type. |
ns | Use this data type while uploading the Network statistics |
# Steps to create Script:
To transmit the files like gc,td,top,df,ns,... you need to create the AJAX function as like below:
$.ajax({
url: "./yc-receiver?apiKey={API_KEY}&de={HOST_NAME}&ts={TIMESTAMP}&dt={Type of File}&filename={FILE_NAME}",
type: 'POST',
data: yourDiagnosticFileBlob
});
2
3
4
5
Example:
./yc-receiver?apiKey=ORG1@123-45sdf-sdd&de=host123&ts=2025-07-22T11-45-00&dt=gc&filename=gcLog.zip
# Upload Heap Dump (Receiver Heap API):
To upload heap dumps, you need to create a separate AJAX function as mentioned below:
$.ajax({
url: "./yc-receiver-heap?apiKey=******&de={HOST_NAME}&ts={TIMESTAMP}&filename={FILENAME}",
type: 'POST',
data: heapDumpFileBlob
});
2
3
4
5
Example:
./yc-receiver-heap?apiKey=ORG1@123-45sdf-sdd&de=host123&ts=2025-07-22T11-45-00&filename=heap_dump.hprof
# Final call to get the RCA Report URL (Fin API):
To get the RCA report URL you need to create an AJAX function and make call to ./yc-fin API as mentioned below:
$.ajax({
url: "./yc-fin?apiKey=******&de={HOST_NAME}&ts={TIMESTAMP}",
type: 'POST',
success: function (response) {
console.log("RCA Report URL:", response.dashboardReportURL);
}
});
2
3
4
5
6
7
Example (masked):
./yc-fin?apiKey=ORG1@123-45sdf-sdd&de=host123&ts=2025-07-22T11-45-00
Sample Response:
{
"dashboardReportURL": "https://your-ycrash-server/yc-report.jsp?ou=ORG1&de=host123&app=myApp&ts=2025-07-22T11-45-00"
}
2
3
# Final Checklist
Ensure your timestamps follow this strict format:
yyyy-MM-dd'T'HH-mm-ssAlways invoke
Fin APIafter uploading all diagnostic filesLog the
RCAReportURLfor traceabilityKeep your
apiKeysecure and do not expose it publicly