{"action":"created","issue":{"url":"https://api.github.com/repos/CiscoDevNet/uniq/issues/29","repository_url":"https://api.github.com/repos/CiscoDevNet/uniq","labels_url":"https://api.github.com/repos/CiscoDevNet/uniq/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/CiscoDevNet/uniq/issues/29/comments","events_url":"https://api.github.com/repos/CiscoDevNet/uniq/issues/29/events","html_url":"https://github.com/CiscoDevNet/uniq/issues/29","id":168112173,"number":29,"title":"How to set a discovery to active","user":{"login":"NathanDotTo","id":13392790,"avatar_url":"https://avatars.githubusercontent.com/u/13392790?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanDotTo","html_url":"https://github.com/NathanDotTo","followers_url":"https://api.github.com/users/NathanDotTo/followers","following_url":"https://api.github.com/users/NathanDotTo/following{/other_user}","gists_url":"https://api.github.com/users/NathanDotTo/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanDotTo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanDotTo/subscriptions","organizations_url":"https://api.github.com/users/NathanDotTo/orgs","repos_url":"https://api.github.com/users/NathanDotTo/repos","events_url":"https://api.github.com/users/NathanDotTo/events{/privacy}","received_events_url":"https://api.github.com/users/NathanDotTo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-28T14:38:10Z","updated_at":"2016-07-29T04:55:42Z","closed_at":null,"body":"Hi\r\n\r\nI am trying to figure out how to use the DiscoveryAPI. The code I have put together is below, but it is not quite working.\r\n\r\nI am getting \" Bad Request for url: https://192.168.1.13/api/v1/discovery\" when calling the client.discovery.updateDiscovery() function.\r\n\r\nWhat should I be doing here please?\r\n\r\nMany thanks\r\n\r\nNathan\r\n\r\n```\r\nimport requests.exceptions\r\n\r\nfrom uniq.apis.nb.client_manager import NbClientManager\r\nfrom uniq.apis.nb.clients.inventory_manager_client.models.DiscoveryNIO import DiscoveryNIO\r\n\r\n\r\ntry:\r\n  client = NbClientManager(\r\n                server=\"192.168.1.13\",\r\n                username=\"admin\",\r\n                password=\"xxxxxx!\",\r\n                connect=True)\r\n\r\nexcept requests.exceptions.HTTPError as exc_info:\r\n  print(exc_info)\r\n  exit(1)\r\n\r\ndiscoveryNIO = DiscoveryNIO()\r\ndiscoveryNIO.discoveryStatus = \"active\"\r\n\r\ntry:\r\n  client.discovery.updateDiscovery(discovery = discoveryNIO, scope = \"All\")\r\nexcept requests.exceptions.HTTPError as exc_info:\r\n  print(exc_info)\r\n  exit(1)\r\n\r\nexit(0)\r\n```"},"comment":{"url":"https://api.github.com/repos/CiscoDevNet/uniq/issues/comments/236094384","html_url":"https://github.com/CiscoDevNet/uniq/issues/29#issuecomment-236094384","issue_url":"https://api.github.com/repos/CiscoDevNet/uniq/issues/29","id":236094384,"user":{"login":"NathanDotTo","id":13392790,"avatar_url":"https://avatars.githubusercontent.com/u/13392790?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanDotTo","html_url":"https://github.com/NathanDotTo","followers_url":"https://api.github.com/users/NathanDotTo/followers","following_url":"https://api.github.com/users/NathanDotTo/following{/other_user}","gists_url":"https://api.github.com/users/NathanDotTo/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanDotTo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanDotTo/subscriptions","organizations_url":"https://api.github.com/users/NathanDotTo/orgs","repos_url":"https://api.github.com/users/NathanDotTo/repos","events_url":"https://api.github.com/users/NathanDotTo/events{/privacy}","received_events_url":"https://api.github.com/users/NathanDotTo/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T04:55:42Z","updated_at":"2016-07-29T04:55:42Z","body":"Thanks for the response. \n\nDo you expect users of the API to pass JSON, or DiscoveryNIO, instances or does it not matter?\n\nRegards\n\nNathan\n\n> On 28 Jul 2016, at 23:39, himakoppu <notifications@github.com> wrote:\n> \n> Hi Nathan,\n> \n> Most of APIC-EM's POST and PUT requests need dict/json in the request body. DiscoveryNIO is a request model for updateDiscovery(). It represents what key/value pairs comprise the dict/json in the request.\n> \n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n\n"}}
{"actor":{"display_login":"NathanDotTo"}}