Skip to content

Instantly share code, notes, and snippets.

@nctiggy
Created October 10, 2014 20:31
Show Gist options
  • Save nctiggy/b8f22472e53cbac91955 to your computer and use it in GitHub Desktop.
Save nctiggy/b8f22472e53cbac91955 to your computer and use it in GitHub Desktop.
base_url = "https://[ip_addy]:4443"
test = RestClient::Request.execute(method: :get,
url: "#{base_url}/login",
user: 'root',
password: 'password',
verify_ssl: FALSE,
headers: {
accept: :json
})
token = test.headers[:x_sds_auth_token]
RestClient::Request.execute(method: :get,
url: "#{base_url}/compute/initiators/bulk",
verify_ssl: FALSE,
headers: {
:'x_sds_auth_token' => token,
accept: :json
})
RestClient::Request.execute(method: :get,
url: "#{base_url}/block/exports?initiators=",
verify_ssl: FALSE,
headers: {
:'x_sds_auth_token' => token,
accept: :json
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment