Saagie Log-proxy API
Get Your Token
To generate your token and save it in a variable, enter the following command line:
YOUR_TOKEN=$(curl -k -X "POST" -H "Content-Type: application/json" -H "Saagie-Realm: YOUR_REALM" "https://<your_saagie_host>/authentication/api/open/authenticate" -d '{"login":"<LOGIN>", "password":"<PASSWORD>"}')
Endpoint Servers
Queries:
-
Get all logs from a specific entity
-
log-proxy/api/logs
e.g.https://<your_saagie_host>/log-proxy/api/logs/...
-
-
Download a log file from a specific entity
-
log-proxy/api/download
e.g.https://<your_saagie_host>/log-proxy/api/download/...
-
Path params:
Path | Description |
---|---|
|
The realm (e.g. |
|
The platform ID (e.g. |
|
The project uuid |
|
The type of entity (e.g. |
|
The entity uuid |
Query params:
Query | Description |
---|---|
|
The streams to filter logs (e.g. |
|
The number of logs to skip |
|
The maximum number of logs to return (default 10000) |
|
The source of the logs (e.g. |
Examples:
curl --location 'https://<your_saagie_host>/api/logs/<realm>/platform/<platform_id>/project/<project_id>/<entity_type>/<entity_id>?streams=STDOUT,STDERR&limit=2&skip=0' \
--header 'Authorization: Bearer <SAAGIE_TOKEN>'
Response:
{
"logs": [
{
"index": 0,
"stream": "STDOUT",
"time": "2025-01-13T08:56:55.058057435Z",
"value": "Rewriting url based on Saagie Base Path"
},
{
"index": 1,
"stream": "STDOUT",
"time": "2025-01-13T08:56:55.370537625Z",
"value": "smart_replace - replacementsEverywhere - ASSET_DIR - .js"
}
],
"limit": 2,
"total": 3702,
"order": "asc",
"source": "elastic"
}