Kaltura api 301 status

Hello,

I trying to use Kaltura Api Client for Java, but I have some problem with urls. I want to retrieve media info.
Java Client generates “http://dev1/api_v3/service/media/action/get” url and fails because Kaltura returns 301 Moved permamently status and redirects to “http://dev1/api_v3/index.php/service/media/action/get” url.

What can be cause of this issue ?

KalturaConfiguration config = new KalturaConfiguration();
config.setEndpoint("http://dev1");
		
KalturaClient client = new KalturaClient(config);
		
		
String sessionId = client.generateSessionV2("666666666666666666666", "test@test.com", KalturaSessionType.ADMIN, 666, 38400, "");
client.setSessionId(sessionId);
		
client.getMediaService().get("");

Java exception:

[Fatal Error] :1:50: White spaces are required between publicId and systemId.
Exception in thread "main" com.kaltura.client.KalturaApiException: Failed while parsing response.
	at com.kaltura.client.utils.XmlUtils.parseXml(XmlUtils.java:70)
	at com.kaltura.client.KalturaClientBase.doQueue(KalturaClientBase.java:279)
	at com.kaltura.client.services.KalturaMediaService.get(KalturaMediaService.java:219)
	at com.kaltura.client.services.KalturaMediaService.get(KalturaMediaService.java:208)
	at asdasd.kaltura_tests.AppOldApi.main(AppOldApi.java:19)

Response returned by Kaltura:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://dev1/api_v3/index.php/service/media/action/get">here</a>.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at 123.123.123.213 Port 80</address>
</body></html>

Regards

client.getMediaService().get("");
Should accept an entry ID, you cannot pass an empty string.
If you want to get a list of entries use list() instead.

Also, NEVER share your partner secret. Please edit your original post to mask it.

I edited my code and provided the ID of existing media entry, and it don`t help me.
Have You any other idea about this ?

EDIT:
I use Kaltura 10.8.0