The answer is in documentation:
http://sldn.softlayer.com/reference/datatypes/SoftLayer_Ticket
there you will see this:
attachedHardware
The hardware associated with a ticket. This is used in cases where a ticket is directly associated with one or more pieces of hardware.
attachedVirtualGuests
The virtual guests associated with a ticket. This is used in cases where a ticket is directly associated with one or more virtualized guests installations or Virtual Servers.
So you just need to look into those parameters your hostname. In order to do that ,the documentation again comes to the rescue. See this:
http://sldn.softlayer.com/article/Object-Filters
So you can call the Softlayer_Account::getTickets and limit your result to display only the tickets associated to a determined either Hardware or VSI
here an example using RESTFul for that:
for hardware:
URL: https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getTickets?objectMask=mask[attachedHardware, attachedVirtualGuests]&objectFilter={"tickets": {"attachedHardware": {"hostname": {"operation": "myHostname"}, "domain": {"operation": "myDomain.domain"}}}}
Method : Get
For VSI
URL : https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getTickets?objectMask=mask[attachedHardware, attachedVirtualGuests]&objectFilter={"tickets": {"attachedVirtualGuests": {"hostname": {"operation": "myHostname"}, "domain": {"operation": "myDomain.domain"} }}}
Note: replace "myHostname" and "myDomain.domain"
Regards