Search

9.4. Add Team Member

download PDF
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"
}

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

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.

{
  "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"
}

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.