{"action":"created","issue":{"url":"https://api.github.com/repos/vmware/govmomi/issues/1312","repository_url":"https://api.github.com/repos/vmware/govmomi","labels_url":"https://api.github.com/repos/vmware/govmomi/issues/1312/labels{/name}","comments_url":"https://api.github.com/repos/vmware/govmomi/issues/1312/comments","events_url":"https://api.github.com/repos/vmware/govmomi/issues/1312/events","html_url":"https://github.com/vmware/govmomi/issues/1312","id":381243278,"node_id":"MDU6SXNzdWUzODEyNDMyNzg=","number":1312,"title":"Read NSX security tags/groups","user":{"login":"ajruckman","id":40143425,"node_id":"MDQ6VXNlcjQwMTQzNDI1","avatar_url":"https://avatars2.githubusercontent.com/u/40143425?v=4","gravatar_id":"","url":"https://api.github.com/users/ajruckman","html_url":"https://github.com/ajruckman","followers_url":"https://api.github.com/users/ajruckman/followers","following_url":"https://api.github.com/users/ajruckman/following{/other_user}","gists_url":"https://api.github.com/users/ajruckman/gists{/gist_id}","starred_url":"https://api.github.com/users/ajruckman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajruckman/subscriptions","organizations_url":"https://api.github.com/users/ajruckman/orgs","repos_url":"https://api.github.com/users/ajruckman/repos","events_url":"https://api.github.com/users/ajruckman/events{/privacy}","received_events_url":"https://api.github.com/users/ajruckman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-15T16:36:17Z","updated_at":"2018-11-16T17:20:46Z","closed_at":null,"author_association":"NONE","body":"How can I read NSX Security Tags and Security Group Membership information for a VM with govmomi? You can see them from the Summary tab for a VM in vSphere. It looks like the tags come from this URL:\r\n\r\n```\r\nhttps://[vCenter hostname]/ui/nsxvhtml/rest/security-tags/[some UUID]/tagsonvm?vmMoid=vm-[VM ID]\r\n```\r\n\r\nI can access that URL in the browser just fine as long as I have a valid `JSESSIONID` cookie, but I can't figure out how to get that information from the Go client.\r\n\r\nI would like to either get the tags/groups using a govmomi function, or by a GET request to the tag URL with a JSESSIONID created by govmomi. For the latter option I tried using the generated HTTP client returned by `govmomi.NewClient` to GET the URL but I guess it doesn't have the right cookies. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vmware/govmomi/issues/comments/439464503","html_url":"https://github.com/vmware/govmomi/issues/1312#issuecomment-439464503","issue_url":"https://api.github.com/repos/vmware/govmomi/issues/1312","id":439464503,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTQ2NDUwMw==","user":{"login":"dougm","id":30171,"node_id":"MDQ6VXNlcjMwMTcx","avatar_url":"https://avatars3.githubusercontent.com/u/30171?v=4","gravatar_id":"","url":"https://api.github.com/users/dougm","html_url":"https://github.com/dougm","followers_url":"https://api.github.com/users/dougm/followers","following_url":"https://api.github.com/users/dougm/following{/other_user}","gists_url":"https://api.github.com/users/dougm/gists{/gist_id}","starred_url":"https://api.github.com/users/dougm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougm/subscriptions","organizations_url":"https://api.github.com/users/dougm/orgs","repos_url":"https://api.github.com/users/dougm/repos","events_url":"https://api.github.com/users/dougm/events{/privacy}","received_events_url":"https://api.github.com/users/dougm/received_events","type":"User","site_admin":false},"created_at":"2018-11-16T17:20:46Z","updated_at":"2018-11-16T17:20:46Z","author_association":"MEMBER","body":"There are several supported authentication methods: https://github.com/vmware/govmomi/blob/master/govc/USAGE.md#sessionlogin\r\n\r\nDon't know if the cookie can be used with the nsxvhtml URL."}}
{"actor":{"display_login":"dougm"}}