{"action":"created","issue":{"url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2303","repository_url":"https://api.github.com/repos/zaproxy/zaproxy","labels_url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2303/labels{/name}","comments_url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2303/comments","events_url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2303/events","html_url":"https://github.com/zaproxy/zaproxy/issues/2303","id":138583727,"number":2303,"title":"Spider Failing with \"Does Not Exist\" Upon API Call Java api 2.4 v10.","user":{"login":"ndoell","id":17654951,"avatar_url":"https://avatars.githubusercontent.com/u/17654951?v=3","gravatar_id":"","url":"https://api.github.com/users/ndoell","html_url":"https://github.com/ndoell","followers_url":"https://api.github.com/users/ndoell/followers","following_url":"https://api.github.com/users/ndoell/following{/other_user}","gists_url":"https://api.github.com/users/ndoell/gists{/gist_id}","starred_url":"https://api.github.com/users/ndoell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndoell/subscriptions","organizations_url":"https://api.github.com/users/ndoell/orgs","repos_url":"https://api.github.com/users/ndoell/repos","events_url":"https://api.github.com/users/ndoell/events{/privacy}","received_events_url":"https://api.github.com/users/ndoell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-04T20:52:49Z","updated_at":"2016-03-05T00:37:49Z","closed_at":null,"body":"Hi,\r\n\r\nI am using the stable docker container of owasp/zap2docker-stable to conduct spidering and attacking. Below I used bodgeit for the example.\r\n\r\nStep 1: docker run --name \"ZAP\" -d -p 8090:8090 -i owasp/zap2docker-stable zap.sh -daemon -port 8090 -host 0.0.0.0 -config api.disablekey=true\r\n\r\nStep 2: I use a java app using zap-api-2.4-v10.jar to automated this but I think it's easier to show on the ZAP docker container API UI.\r\n\r\nBy default the API sets the contextName parameter which can be left empty.  \r\nThe default request is not working containing contextName: \r\nhttp://<0.0.0.0>:8090/JSON/spider/action/scan/?zapapiformat=JSON&url=http%3A%2F%2F192.168.1.154%3A8080%2Fbodgeit%2F&maxChildren=&recurse=&contextName=\r\n\r\nReturns: {\"code\":\"does_not_exist\",\"message\":\"Does Not Exist\"}\r\n\r\nWhat works (Removed contextName param): \r\nhttp://<0.0.0.0>:8090/JSON/spider/action/scan/?zapapiformat=JSON&url=http%3A%2F%2Flocalhost%3A8080%2Fbodgeit%2F&maxChildren=&recurse=\r\n\r\nReturns: {\"scan\":\"0\"}"},"comment":{"url":"https://api.github.com/repos/zaproxy/zaproxy/issues/comments/192537857","html_url":"https://github.com/zaproxy/zaproxy/issues/2303#issuecomment-192537857","issue_url":"https://api.github.com/repos/zaproxy/zaproxy/issues/2303","id":192537857,"user":{"login":"thc202","id":4639210,"avatar_url":"https://avatars.githubusercontent.com/u/4639210?v=3","gravatar_id":"","url":"https://api.github.com/users/thc202","html_url":"https://github.com/thc202","followers_url":"https://api.github.com/users/thc202/followers","following_url":"https://api.github.com/users/thc202/following{/other_user}","gists_url":"https://api.github.com/users/thc202/gists{/gist_id}","starred_url":"https://api.github.com/users/thc202/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thc202/subscriptions","organizations_url":"https://api.github.com/users/thc202/orgs","repos_url":"https://api.github.com/users/thc202/repos","events_url":"https://api.github.com/users/thc202/events{/privacy}","received_events_url":"https://api.github.com/users/thc202/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T00:37:49Z","updated_at":"2016-03-05T00:37:49Z","body":"Note that you really need to set it to null:\r\n```Java\r\nApiResponse resp = api.spider.scan(apikey, target, \"\", \"\", null);\r\n```\r\nso the ZAP API client knows that it must not sent it."}}