Thumbly has two servers. One is a main server that generate thumbnail, the other is a restful API server that provide application information and additional functions.
You can request api via HTTP.
http://example.com:{port}/{domain}/{method}http://example.com:57901/app/env
http://example.com:57901/app/status
http://example.com:57901/app/hello
http://example.com:57901/app/pingDelete cached origin image (Purge)
{"data": true}Get secret url information
{
"data": "thumb-270x0-webp/thumbly_example1/product/ae/934/portfolio5a66f20fbe831.jpg"
}Set secret url
- Request
{
"data": [
{
"path":"thumb-270x0-webp/thumbly_example1/product/ae/934/portfolio5a66f20fbe831.jpg",
"expires":100
}
]
}- Response
{
"data": [
{
"path": "thumb-270x0-webp/thumbly_example1/product/ae/934/portfolio5a66f20fbe831.jpg",
"secretPath": "7dff0be6adda34635522bf457233843e20846ac9f5779dd3f05485c3828d1b17d2792991ebc5b001804ceb75473e2b53f44377edd162ce6b238b27a298c4253a"
}
]
}Get application environments
{
"data":{
"applicationVersion": "1.4.0",
"hostname": "hostname",
"osVersion": "10.11.6",
"jarFile": "code13k-thumbly-1.0.0-alpha.1.jar",
"javaVersion": "1.8.0_25",
"ip": "192.168.0.121",
"javaVendor": "Oracle Corporation",
"osName": "Mac OS X",
"cpuProcessorCount": 4
}
}Get application status
{
"data":{
"threadInfo":{...},
"cpuUsage": 2.88,
"threadCount": 25,
"currentDate": "2018-10-02T01:15:21.290+09:00",
"startedDate": "2018-10-02T01:14:40.995+09:00",
"runningTimeHour": 0,
"vmMemoryUsage":{...}
}
}Get application configuration
{
"data": {
"cluster": {
"nodes": [
"192.168.100.1",
"192.168.100.2"
],
"port": 57910
},
"cache": {
"totalSizeOfThumbnailImages": 1073741824,
"rootDirectory": ".cache",
"totalSizeOfOriginImages": 1073741824
},
"port": {
"mainHttp": 57900,
"apiHttp": 57901
}
}
}Hello, World
{"data":"world"}Ping-Pong
{"data":"pong"}