How to get the session details of my test in Java + selenium?

I am using Java + Selenium.

After launching an automated test, I would like to (automatically) retrieve the url at which the test can be viewed (video, logs, etc…).

How can I do that?

Based on the url format LambdaTest Automation it seems like I need the testID and the build id, but how can I retrieve them?

When looking in the doc, I saw it can easily be done in playwright (Test Execution Setup | LambdaTest) but is there anyway to do the same thing using Java + selenium?

You can refer - LambdaTest API Documentation | LambdaTest

Adding below the API you can use to fetch details like testID and the build id