此内容没有您所选择的语言版本。
9.4. Add Team Member
Description
Add a member to an existing team. Note that the maximum number of members a team can have is determined by the MAX_MEMBERS_PER_RESOURCE
configuration parameter.
Method and URL Structure
Method | URL Structure |
---|---|
POST | /broker/rest/team/:id/members |
Request Parameters
Name | Description | Required | Default |
---|---|---|---|
role | Type of role user has on the team | Yes | |
id | Unique user identifier | No | |
login | User's login attribute | No |
See Section A.5, “Members” for more information about the valid options applicable to these request parameters.
Request
{ "role": "view", "login": "member@example.com" }
{
"role": "view",
"login": "member@example.com"
}
cURL Command Example
curl -X POST https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members --user user@example.com:password --data-urlencode role=view --data-urlencode login=member@example.com
$ curl -X POST https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/members --user user@example.com:password --data-urlencode role=view --data-urlencode login=member@example.com
JSON Response
The sample JSON response below shows that a new member has been added to the specified team. Unnecessary information and related resource links returned by the API have been removed for brevity.