Compute Resource (Openstack) Network ID

Through the API I am trying to create hosts. One of the parameters I need
to specify is host['compute_attributes']['nics'] which specify the compute
resource networks to attach to.

In the OpenStack world this equates to a hex string as such 17d51fbd-b78a-
4a4c-866d-d07fc71631bb. Outside of knowing that off hand, is there a way to
query the networks for a compute resource through the API?