It is often both difficult and tedious to manually create relationships between different workspace items (as the picture below illustrates). It would save a lot of time to be able to write scripts to automatically add relationships between workspace items.
Even tying the ability to add relationships into the function createItem('WS_WORKSPACE_ID') would be a huge time saver.