How to set remote storage in through API?

I have a video sharing website that creates a new partner for each user via the API. After I create each partner I would like to setup remote AWS S3 storage and delivery which I feel I can do through the delieveryProfile and storageProfile services.

My question is how do I set the Remote Storage Policy? And set purge files on deletion from the api?

I can set them from the web interface, but not from the API. I noticed KalturaSystemPartnerConfiguration and the service systempartner exist on older version. I also noticed the file /opt/kaltura/app/deployment/permissions/service.systempartner.systempartner.ini, but I have no clue how to use it.

Hello,

The admin console uses a special client lib which you can find here:
/opt/kaltura/app/admin_console/lib/Kaltura/Client/

It is not really intended for external use although you could create scripts that use it.
You can start by looking at:
/opt/kaltura/app/admin_console/lib/Kaltura/Client/SystemPartner/SystemPartnerService.php