Create a permission record for the account the user is logged in to.
Table of Contents
Prerequisite: Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.
curl -i -H X_API_VERSION:1.5 -b mycookie -X POST -d permission[user_href]=/api/users/49052 -d permission[role_title]=observer https://my.rightscale.com/api/permissions
Note: Requires 'admin' role, as stated in the Permissions online reference information. Without 'admin' you will get an "HTTP 403 Forbidden" message.
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/permissions/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.