I can't find documentation for all\any of the available properties that can be used to build up a query against the Cloudhub application log API method POST: https://anypoint.mulesoft.com/cloudhub/api/v2/applications/{domain}/logs
The documentation doesn't specify what properties can be used to build query in the request body, I have managed to figure out a few by trying different things.
Ultimately if I could filter by Line number, e.g. where line number between X and X would be perfect.
The purpose of this is to export application logs with minimal duplication or loss to another system, while not the recommend approach we would like to try this.
I have figured out (by inspection of network traffic in a web browser when querying the log of a worker via the UI) that I can filter the responses by adding the following to the body of the request
{
"deploymentId": "WORKERDEPLOYMENTIDREMEOVED",
"startTime": 1709672040000,
"endTime": 1709675699999,
"limit": 200
}
This returns an array of message objects with a time stamp between the start and end time.
[
{
"recordId": "REMOVEDID",
"deploymentId": "REMOVEDID",
"instanceId": "REMOVEDID-0",
"line": 3326,
"event": {
"loggerName": "org.mule.runtime.core.internal.processor.LoggerMessageProcessor",
"threadName": "[MuleRuntime].uber.1177: [REMOVED].Mobility-main.CPU_LITE @REMOVEDID",
"timestamp": 1709672403874,
"message": "event:56a39440-db33-11ee-90b3-02a0f54fc4af REMOVEDID",
"priority": "INFO",
"instanceId": "REMOVEDID-0"
}
}
]