Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > RightScale API 1.5 > Appendix A - APEye Tools > Google Chrome Postman Plugin > Authenticate

Authenticate

Prerequisites

The following are prerequisites for completing this tutorial:

Overview

Authentication is of course required for using the RightScale API.  It's naturally the first and most important thing to accomplish before learning other more practical GET and POST operations with the API.

 

Notes:

  • Basic authentication is used (RS API and Postman both support OAuth however)
  • Because this is likely the first exposure to Postman and possibly the API, additional screen shots will be used in this tutorial. Not all Postman related tutorials will include as many images. 
  • Similarly, this tutorial shows you how to lookup the RightScale account ID from the URL within the Dashboard. Extracting information from the browser URL/address bar is not included in all examples.

Steps

RightScale Account Lookup

  1. Log into the Dashboard
  2. If you have multiple accounts tied to your RightScale user, switch to the account you wish to use (pull-down in upper right).  screen-Dash Account dropdown-v1.png
  3. Notice the Account ID within your browsers address bar. For example, 1234 below:

https://my.rightscale.com/acct/1234/

Sessions Resource Lookup

Use the online reference information so you can construct and send the correct information to the RightScale API.

  1. Lookup the Sessions resource in the RS API Online Reference information
  2. Read the overview information
  3. Click Create.  Note the following critical information (also shown in the example screen shot below):
  • URL for the POST operation
  • Required parameters:
    • account_href
    • email
    • password

screen-API1.5_SessionCreate-v1.png

Postman

Normal Tab
  • Specify the URL for the Session Create:  https://my.rightscale.com/api/sessions
  • Select the Method from the drop-down:  POST
  • Click the URL Params button and add the following Key/Value pairs:
URL Parameter Key Value (examples)
account_href /api/accounts/1234                    (where '1234' is your account number)
email greg.doe@example.com            (your RS username email)
password SomeSecurePassword               (your RS username's password)

Note:  As you add Parameters the URL to POST will dynamically change to include them.

 

  • Click the Headers button and add the following URL Parameter Key/Value:
Header Value
X_API_VERSION 1.5
Basic Auth Tab

Because you are actually authenticating, not using some other resource to create or get information, you can leave the this tab blank.  Leave the other Authentication tabs blank too.

POST

Click the Send button when ready. Your Postman form submission should look similar to the following:

screen-API1.5_SessionCreateSend-v1.png

 

Points of interest:

  • The response STATUS is "204 No Content". This is in accord with the online reference information for session creation.
  • The session ID cookie is set.  For example, click the Cookies tab and note the _session_id cookie value.
  • Although you only set one Header explicitly (X_API_VERSION), note that 7 were sent with your request.  Click the Headers tab to see all HTTP headers.

Post Tutorial Steps

Look over the Tips document to help you use Postman effectively.

See also

You must to post a comment.
Last modified
08:47, 20 Dec 2013

Tags

This page has no custom tags.

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.