This api call is covered in the guide (using Postman) 1.8 API Introduction
In code, you could use oAuth2 wrapper https://github.com/PeterMis/oauth2-xibo-cms/blob/master/src/Entity/XiboLibrary.php#L64
Simple example of using that wrapper - https://github.com/PeterMis/xibo-cms/blob/develop/tests/integration/LibraryTest.php#L69
Have a look here as well https://github.com/PeterMis/oauth2-xibo-cms/blob/master/example/file.php
Perhaps that will give you some ideas