The following creates a new user in the RightScale Cloud Mangement Platform.
Table of Contents
Prerequisite: Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.
Note: A "\" has been added as a line-break for readability. The actual curl command must be interpreted by the shell as a single line/command.
#!/bin/sh -e curl -i -H X_API_VERSION:1.5 -b mycookie -X POST \ -d user[email]='email@example.com' \ -d user[password]='SomePassword' \ -d user[company]=RightDoe \ -d user[phone]=8051234567 \ -d user[first_name]=Greg \ -d user[last_name]=Doe \ https://my.rightscale.com/api/users
HTTP/1.1 201 Created Server: nginx/0.7.67 Date: Wed, 24 Aug 2011 21:53:30 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Status: 201 Created Location: /api/users/11 X-Runtime: 213 X-Request-Uuid: 7d1f40f69a5a451b8833b8f537498c83 Set-Cookie: _session_id=3c6e155612b283b6e24a8e972839c257; path=/; Secure; HttpOnly Cache-Control: no-cache
© 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.