Bug 1060743 - [Sprint 43] Please document subaccount creation via REST
Summary: [Sprint 43] Please document subaccount creation via REST
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Documentation
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Bilhar
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-03 13:48 UTC by Oleg Fayans
Modified: 2016-12-01 00:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-24 21:34:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Oleg Fayans 2014-02-03 13:48:54 UTC
Description of problem:
subj. 
There is a way to create a subaccount/subdomain via REST API, but this functionality is not documented at all

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Ravi Sankar 2014-03-25 23:45:31 UTC
Same as regular user creation but need to specify header 'X-Impersonate-User'

curl -k https://openshift.redhat.com/broker/rest/user -d 
--user <parent>:<password> -H "X-Impersonate-User: <child>"

This will create user <child> (subaccount of <parent>), only works if <parent> has subaccounts capability enabled.

Comment 3 Ravi Sankar 2014-04-02 18:54:10 UTC
Ah, user creation depends on the openshift authentication plugin. Only on development environment, GET call on /user will create a regular user.
curl -k -X GET https://openshift.redhat.com/broker/rest/user --user "[UserName]:[Password]"

So we should not document user creation REST api, it depends on the auth plugins (some will use command line utilities or plugin specific apis).In comment#1, I should have said "Same as view user information[1] but need to specify header 'X-Impersonate-User'.

curl -k -X GET https://openshift.redhat.com/broker/rest/user --user "[ParentUserName]:[Password]" -H "X-Impersonate-User: [ChildUserName]"

This creates sub-account "ChildUserName" for user "ParentUserName" when the user has subaccounts capability enabled.

[1] https://access.redhat.com/site/documentation/en-US/OpenShift/2.0/html-single/REST_API_Guide/index.html#sect-API_Guide-User_Information-View_User_Information


Note You need to log in before you can comment on or make changes to this bug.