Skip to content

Files

Latest commit

stevsmitSteven Smith
and
Steven Smith
Mar 13, 2025
16ee9b1 · Mar 13, 2025

History

History
35 lines (27 loc) · 1.56 KB

creating-a-team-api.adoc

File metadata and controls

35 lines (27 loc) · 1.56 KB

Creating a team by using the API

When you create a team for your organization with the API you can select the team name, choose which repositories to make available to the team, and decide the level of access to the team.

Use the following procedure to create a team for your organization repository.

Prerequisites
  • You have created an organization.

  • You have Created an OAuth access token.

  • You have set BROWSER_API_CALLS_XHR_ONLY: false in your config.yaml file.

Procedure
  1. Enter the following PUT /api/v1/organization/{orgname}/team/{teamname} command to create a team for your organization:

    $ curl -k -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H "Authorization: Bearer <bearer_token>"  --data '{"role": "creator"}' https://<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>
    Example output
    {"name": "example_team", "description": "", "can_view": true, "role": "creator", "avatar": {"name": "example_team", "hash": "dec209fd7312a2284b689d4db3135e2846f27e0f40fa126776a0ce17366bc989", "color": "#e7ba52", "kind": "team"}, "new_team": true}