9.4. Add Team Member
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 | URL Structure |
|---|---|
POST | /broker/rest/team/:id/members |
| 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 |
{
"role": "view",
"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
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.
{
"api_version": 1.6,
"data": {
"explicit_role": "view",
"id": "533369f861b322dfc1000003",
"links": {
"GET": {
"href": "https://openshift.redhat.com/broker/rest/team/5333d8b2a9429d1c3e0000ae/member/533369f861b322dfc1000003",
"method": "GET",
"optional_params": [
],
"rel": "Get member",
"required_params": [
]
},
},
"login": "member@example.com",
"owner": false,
"role": "view",
"type": "user"
},
"messages": [
{
"exit_code": 0,
"field": null,
"index": null,
"severity": "info",
"text": "Added 1 member."
}
],
"status": "ok",
"supported_api_versions": [
1.0,
1.1,
1.2,
1.3,
1.4,
1.5,
1.6
],
"type": "member",
"version": "1.6"
}

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.