Skip to content

Teams


Description of the JSON object structure describing a team

Field Type Description
id String Unique team ID
alias String Team alias
title String Team name
description String Team description
ownerAlias String Team owner's alias
avatar String Team avatar URL
selectorTitle String Team selector title
private Boolean Private team (true) or public (false)
selectorId String Selector ID
isDeleted Boolean Team deleted (true) or not (false)
selectorOwnerAlias String Selector owner's alias
hexColor String Color code
selectorAlias String Team selector alias
selectorColor String Selector color
selectorHash String Selector hash

Description of the JSON object structure describing the team template settings state

Field Type Description
allowImportBranchProtection Boolean If true, the Apply branch protection to company projects setting is active
allowImportEnvironmentProtection Boolean If true, the Apply environment protection to company projects setting is active
allowImportTagProtection Boolean If true, the Apply tag protection to company projects setting is active
allowImportMrApprovalConfigAndRules Boolean If true, the Apply merge request approval rules to company projects setting is active
allowImportPipelineLifetimeSetting Boolean If true, the Apply pipeline lifetime setting to company projects setting is active

Method to get the list of teams

GET /team

The request returns an array of public teams, with the ability to configure the number of objects displayed per page

Responses

STATUS 200 - List of public teams successfully returned.

Example response
    
{
    "_embedded": {
        "teamList": [
            {
                "id": "aeed70f9-aaaa-aaaa-aaaa-9086a22a65a7",
                "alias": "test",
                "title": "test",
                "description": "description",
                "ownerAlias": "user2",
                "avatar": "https://gitflic.ru/upload/img/8dd2e03e-aaaa-aaaa-aaaa-dbdd98ff4b0f.jpg",
                "private": false,
                "selectorTitle": "test",
                "selectorId": "aeed70f9-aaaa-aaaa-aaaa-9086a22a65a7",
                "selectorOwnerAlias": null,
                "selectorAlias": null,
                "selectorColor": null,
                "selectorHash": null,
                "hexColor": null
            },
            {
                "id": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
                "alias": "gitflic",
                "title": "gitflic",
                "description": "description",
                "ownerAlias": "user1",
                "avatar": "https://gitflic.ru/upload/img/065abe2c-aaaa-aaaa-aaaa-3ffebd3a4f28.jpg",
                "private": false,
                "selectorTitle": "gitflic",
                "selectorId": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
                "selectorOwnerAlias": null,
                "selectorAlias": null,
                "selectorColor": null,
                "selectorHash": null,
                "hexColor": null
            }
        ]
    },
    "page": {
        "size": 10,
        "totalElements": 2,
        "totalPages": 1,
        "number": 0
    }
}
    
  

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to get the active user's teams

GET /team/my

The request returns an array of teams for the active user, with the ability to configure the number of objects displayed per page

Responses

STATUS 200 - List of active user's teams successfully returned.

Example response
    
    {
    "_embedded": {
        "teamList": [
            {
                "id": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
                "alias": "gitflic",
                "title": "gitflic",
                "description": "description",
                "ownerAlias": "user1",
                "avatar": "https://gitflic.ru/upload/img/065abe2c-aaaa-aaaa-aaaa-3ffebd3a4f28.jpg",
                "private": false,
                "selectorTitle": "gitflic",
                "selectorId": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
                "selectorOwnerAlias": null,
                "selectorAlias": null,
                "selectorColor": null,
                "selectorHash": null,
                "hexColor": null
            }
        ]
    },
    "page": {
        "size": 10,
        "totalElements": 1,
        "totalPages": 1,
        "number": 0
    }
}
    
  

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to get teams with user participation

GET /team/shared

The request returns an array of teams with user participation, with the ability to configure the number of objects displayed per page

Responses

STATUS 200 - List of teams with user participation successfully returned.

Example response
    
{
    "_embedded": {
        "teamList": [
            {
                "id": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
                "alias": "gitflic",
                "title": "gitflic",
                "description": "description",
                "ownerAlias": "user1",
                "avatar": "https://gitflic.ru/upload/img/065abe2c-aaaa-aaaa-aaaa-3ffebd3a4f28.jpg",
                "private": false,
                "selectorTitle": "gitflic",
                "selectorId": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
                "selectorOwnerAlias": null,
                "selectorAlias": null,
                "selectorColor": null,
                "selectorHash": null,
                "hexColor": null
            }
        ]
    },
    "page": {
        "size": 10,
        "totalElements": 1,
        "totalPages": 1,
        "number": 0
    }
}
   
  

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to get a team by alias

GET /team/{teamAlias}

The request returns a team

Path variable Type Description
teamAlias String Team alias

Responses

STATUS 200 - Team successfully returned.

Example response
    
            {
                "id": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
                "alias": "gitflic",
                "title": "gitflic",
                "description": "description",
                "ownerAlias": "user1",
                "avatar": "https://gitflic.ru/upload/img/065abe2c-aaaa-aaaa-aaaa-3ffebd3a4f28.jpg",
                "private": false,
                "selectorTitle": "gitflic",
                "selectorId": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
                "selectorOwnerAlias": null,
                "selectorAlias": null,
                "selectorColor": null,
                "selectorHash": null,
                "hexColor": null
            }
    
  

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to create a team

POST /team

The request creates and returns a team

Request

Supported JSON format

POST request body structure:

Parameter Description
title Team name
isPrivate Private team or not. Accepts true or false
alias Team alias
ownerAlias Team owner's alias
ownerAliasType Company owner type. Accepts USER or COMPANY
description Team description

Example JSON object

{
    "title": "team",
    "isPrivate": "true",
    "alias": "team",
    "ownerAlias": "alias",
    "ownerAliasType": "USER",
    "description": "description"
}

Responses

STATUS 200 - Team successfully created.

Example response
    
        {
            "id": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
            "alias": "team",
            "title": "team",
            "description": "description",
            "ownerAlias": "alias",
            "avatar": "https://gitflic.ru/upload/img/065abe2c-aaaa-aaaa-aaaa-3ffebd3a4f28.jpg",
            "private": true,
            "selectorTitle": "team",
            "selectorId": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
            "selectorOwnerAlias": null,
            "selectorAlias": null,
            "selectorColor": null,
            "selectorHash": null,
            "hexColor": null
        }
    
  

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to transfer a team

POST /team/transfer

The request transfers a team and returns its information

Note: To transfer a team to another user, the user must be an administrator of the team. Transferring a company is only possible if the current team owner is the company owner.

Request

Supported JSON format

POST request body structure:

Parameter Description
teamAlias Alias of the team to be transferred
ownerAlias Alias of the new team owner

Example JSON object

{
    "ownerAlias" : "alias",
    "teamAlias" : "team"
}

Responses

STATUS 200 - Team successfully transferred to the new owner.

Example response
    
        {
            "id": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
            "alias": "team",
            "title": "team",
            "description": "description",
            "ownerAlias": "alias",
            "avatar": "https://gitflic.ru/upload/img/065abe2c-aaaa-aaaa-aaaa-3ffebd3a4f28.jpg",
            "private": true,
            "selectorTitle": "team",
            "selectorId": "2bee3ea6-aaaa-aaaa-aaaa-2d98d59e71f7",
            "selectorOwnerAlias": null,
            "selectorAlias": null,
            "selectorColor": null,
            "selectorHash": null,
            "hexColor": null
        }
    
  

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to invite a user to a team

POST /team/{teamAlias}/member/invite

The request adds a user to a team with the specified role

Path variable Type Description
teamAlias String Alias of the team to add the user to

Request

Supported JSON format

POST request body structure:

Parameter Description
userAlias Alias of the user to be added to the team
role Role for the user. Possible values: GUEST - guest, REPORTER - reporter, DEVELOPER - developer, ADMIN - administrator
{
    "userAlias" : "user",
    "role" : "ADMIN"
}

Responses

STATUS 200 - Invitation sent to the user.

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to change a user's role in a team

PUT /team/{teamAlias}/member/role

The request changes a user's role in a team

Path variable Type Description
teamAlias String Alias of the team to change the user's role in

Request

Supported JSON format

POST request body structure:

Parameter Description
userAlias Alias of the user whose role will be changed in the team
role New user role. Possible values: GUEST - guest, REPORTER - reporter, DEVELOPER - developer, ADMIN - administrator
{
    "userAlias" : "user",
    "role" : "ADMIN"
}

Responses

STATUS 200 - User role changed.

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to remove a user from a team

DELETE /team/{teamAlias}/member/{userAlias}

The request removes a user from a team

Path variable Type Description
teamAlias String Alias of the team to remove the user from
userAlias String Alias of the user to be removed from the team

Responses

STATUS 200 - User removed from the team.

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Team template settings methods

Team settings include templates that can be applied to all projects of the team:

Method to get the state of team template settings

GET /team/{teamAlias}/setting/import

The request returns the state of team template settings - their availability for child projects.

Path variable Type Description
teamAlias String Team alias

Responses

STATUS 200 - Template settings state returned.

Example response
    
{
    "allowImportBranchProtection": true,
    "allowImportEnvironmentProtection": true,
    "allowImportTagProtection": true,
    "allowImportMrApprovalConfigAndRules": true,
    "allowImportPipelineLifetimeSetting": true
}
    
  

STATUS 403 - No access rights.

STATUS 404 - Data not found.


Method to change the state of team template settings

POST /team/{teamAlias}/setting/import

The request changes and returns the state of team template settings - their availability for child projects.

Path variable Type Description
teamAlias String Team alias

Request

Supported JSON format.

POST request body structure:

Parameter Type Description
allowImportBranchProtection Boolean If true, the Apply branch protection to company projects setting is active
allowImportEnvironmentProtection Boolean If true, the Apply environment protection to company projects setting is active
allowImportTagProtection Boolean If true, the Apply tag protection to company projects setting is active
allowImportMrApprovalConfigAndRules Boolean If true, the Apply merge request approval rules to company projects setting is active
allowImportPipelineLifetimeSetting Boolean If true, the Apply pipeline lifetime setting to company projects setting is active

Example JSON object

{
    "allowImportBranchProtection": true,
    "allowImportEnvironmentProtection": true,
    "allowImportTagProtection": true,
    "allowImportMrApprovalConfigAndRules": true,
    "allowImportPipelineLifetimeSetting": true
}

Responses

STATUS 200 - Template settings state returned.

Example response
    
{
    "allowImportBranchProtection": true,
    "allowImportEnvironmentProtection": true,
    "allowImportTagProtection": true,
    "allowImportMrApprovalConfigAndRules": true,
    "allowImportPipelineLifetimeSetting": true
}
    
  

STATUS 403 - No access rights.

STATUS 404 - Data not found.

Methods for team branch protection rules

You can find these methods here


Methods for team tag protection rules

You can find these methods here


Methods for team merge request settings

You can find these methods here


Methods for team CI/CD settings

You can find these methods here


Methods for team environment protection rules

You can find these methods here

Automated translation!

This page was translated using automatic translation tools. The text may contain inaccuracies.