Hi @z.dusatko,
Below are the requests needed to create a new playlist and attach it to a given channel. I’ve annotated each request, explaining the parameters. Note of course that the IDs will be different in your case and that you should call the list() action for the relevant service with the correct filter to obtain the right IDs.
The requests are in pure HTTP form since I don’t know which API client you using, you should call the corresponding service and action pair from your code.
You can generate the code samples for making each such request for your client by going to developer.kaltura.com and typing the SERVICE.ACTION in the search box and then clicking on “Try it out”.
# create a playlist called "myplay":
/api_v3/index.php?service=playlist&action=add&playlist:objectType=KalturaPlaylist&playlist:playlistType=3&playlist:name=myplay&playlist:description=&playlist:userId=__kmsInternalChannelPlaylistUser__&playlist:tags=&updateStats=&partnerId=101&ks=
# get a list of sub categories under MediaSpace>playlists:
/api_v3/index.php?service=category&action=list&filter:objectType=KalturaCategoryFilter&filter:fullNameEqual=MediaSpace>playlists&partnerId=101&ks=
# add a new category entry record/object with entryId=0_wbm71z1c, 0_wbm71z1c is the playlist ID returned from the
service=playlist&action=add request, categoryId=50 is MediaSpace>playlists on my ENV:
/api_v3/index.php?service=categoryentry&action=add&categoryEntry:objectType=KalturaCategoryEntry&categoryEntry:categoryId=50&categoryEntry:entryId=0_wbm71z1c&partnerId=101&ks=
# update the relevant metadata object:
# metadata ID 5 has:
# metadata_profile_id: 12 - that's the ID for the profile whose name is CategoryAdditionalInfo on my ENV]
# objectIdIn: 140 - the category ID for MediaSpace>site>channels>mbp which is the channel I want this playlist to be attached to
# <Value>0_wbm71z1c,0_jlpl1snw,0_9fxaraxx,</Value> - since this channel already has 2 priorly created playlists, we need to concat the new one, 0_wbm71z1c to those who already exist, hence the metadata->list request from before]
/api_v3/index.php?service=metadata_metadata&action=update&id=5&xmlData=<?xml version="1.0"?>
<metadata><Detail><Key>commentsPrivate</Key><Value/></Detail><Detail><Key>isSharedRepository</Key><Value>isSharedRepository_false</Value></Detail><Detail><Key>channelPlaylistsIds</Key><Value>0_wbm71z1c,0_jlpl1snw,0_9fxaraxx,</Value></Detail></metadata>
Hope this helps,