Is there a way to combine Web and API tests?

I have made an example of using WebUI.* and WS.* keywords together in a test case. Have a look at the following post: