Created
January 15, 2016 17:22
-
-
Save fatmcgav/5ff17978d388a7801221 to your computer and use it in GitHub Desktop.
Foreman API Creation attempt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curl -sS -u provisioner -k -H "Content-Type: application/json" -XPOST http://foreman.weareact.net/api/v2/hosts -d ' | |
{ | |
"host": { | |
"name": "test1.test.weareact.net", | |
"enabled": true, | |
"ipaddress": "10.106.81.15" | |
} | |
}' | |
Enter host password for user 'provisioner': | |
<html><body>You are being <a href="https://foreman.weareact.net/api/hosts">redirected</a>.</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016-01-15 17:21:29 [app] [I] | |
| | |
| Started POST "/api/v2/hosts" for 10.106.81.15 at 2016-01-15 17:21:29 +0000 | |
2016-01-15 17:21:29 [app] [I] Processing by Api::V2::HostsController#create as JSON | |
2016-01-15 17:21:29 [app] [I] Parameters: {"host"=>{"name"=>"test1.test.weareact.net", "enabled"=>true, "ipaddress"=>"10.106.81.15"}, "apiv"=>"v2"} | |
2016-01-15 17:21:29 [app] [I] Redirected to https://foreman.weareact.net/api/hosts | |
2016-01-15 17:21:29 [app] [I] Filter chain halted as #<Proc:0x000000072182a0@/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/force_ssl.rb:28> rendered or redirected | |
2016-01-15 17:21:29 [app] [I] Completed 301 Moved Permanently in 1ms (ActiveRecord: 0.0ms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment