Companies
Description of the JSON object structure describing a company
Field | Type | Description |
---|---|---|
id |
String | Unique company ID |
alias |
String | Company alias |
title |
String | Company name |
description |
String | Company description |
url |
String | Company website link |
contactPhone |
String | Company contact phone |
contactEmail |
String | Company contact email |
ownerAlias |
String | Company owner alias |
avatar |
String | Company avatar link |
private |
Boolean | Private company (true ) or public (false ) |
selectorTitle |
String | Company selector title |
selectorId |
String | Selector ID |
isDeleted |
Boolean | Company deleted (true ) or not (false ) |
selectorOwnerAlias |
String | Selector owner alias |
hexColor |
String | Color code |
selectorAlias |
String | Company selector alias |
selectorColor |
String | Selector color |
selectorHash |
String | Selector hash |
Description of the JSON object structure describing company template settings state
Field | Type | Description |
---|---|---|
allowImportBranchProtection |
Boolean | If true , the Apply branch protection to created company projects setting is active |
allowImportEnvironmentProtection |
Boolean | If true , the Apply environment protection to created company projects setting is active |
allowImportTagProtection |
Boolean | If true , the Apply tag protection to created company projects setting is active |
allowImportMrApprovalConfigAndRules |
Boolean | If true , the Apply merge request approval rules to created company projects setting is active |
allowImportPipelineLifetimeSetting |
Boolean | If true , the Apply pipeline lifetime setting to created company projects setting is active |
Method for getting the list of companies
GET /company
The request returns an array of public companies, with the ability to configure the number of objects displayed per page
Responses
STATUS 200
- List of public companies successfully returned.
Example response
{
"_embedded": {
"companyList": [
{
"id": "7c7e495a-aaaa-aaaa-aaaa-68becefbde5f",
"alias": "testovaya-kompaniya",
"title": "test company",
"description": "Example description",
"url": "test1.com",
"contactPhone": null,
"contactEmail": "user@gitflic.ru",
"ownerAlias": "user1",
"avatar": "https://gitflic.ru/upload/img/6c482659-aaaa-aaaa-aaaa-d4086f2d8251.jpg",
"private": false,
"selectorTitle": "test company",
"selectorId": "7c7e495a-aaaa-aaaa-aaaa-68becefbde5f",
"selectorOwnerAlias": null,
"hexColor": null,
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
},
{
"id": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"alias": "public-company",
"title": "public company",
"description": "Example description",
"url": null,
"contactPhone": "+79991234567",
"contactEmail": "user@gitflic.ru",
"ownerAlias": "user1",
"avatar": "https://gitflic.ru/upload/img/4b0fab04-aaaa-aaaa-aaaa-ec70560fcae2.jpg",
"private": false,
"selectorTitle": "public company",
"selectorId": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"selectorOwnerAlias": null,
"hexColor": null,
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403
- No access rights.
STATUS 404
- Data not found.
Method for getting companies of the active user
GET /company/my
The request returns an array of companies of the active user, with the ability to configure the number of objects displayed per page
Responses
STATUS 200
- List of active user's companies successfully returned.
Example response
{
"_embedded": {
"companyList": [
{
"id": "7c7e495a-aaaa-aaaa-aaaa-68becefbde5f",
"alias": "testovaya-kompaniya",
"title": "test company",
"description": "Example description",
"url": "test1.com",
"contactPhone": null,
"contactEmail": "user@gitflic.ru",
"ownerAlias": "user1",
"avatar": "https://gitflic.ru/upload/img/6c482659-aaaa-aaaa-aaaa-d4086f2d8251.jpg",
"private": false,
"selectorTitle": "test company",
"selectorId": "7c7e495a-aaaa-aaaa-aaaa-68becefbde5f",
"selectorOwnerAlias": null,
"hexColor": null,
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
},
{
"id": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"alias": "public-company",
"title": "public company",
"description": "Example description",
"url": null,
"contactPhone": "+79991234567",
"contactEmail": "user@gitflic.ru",
"ownerAlias": "user1",
"avatar": "https://gitflic.ru/upload/img/4b0fab04-aaaa-aaaa-aaaa-ec70560fcae2.jpg",
"private": false,
"selectorTitle": "public company",
"selectorId": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"selectorOwnerAlias": null,
"hexColor": null,
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403
- No access rights.
STATUS 404
- Data not found.
Method for getting companies with user participation
GET /company/shared
The request returns an array of companies with user participation, with the ability to configure the number of objects displayed per page
Responses
STATUS 200
- List of companies with user participation successfully returned
Example response
{
"_embedded": {
"companyList": [
{
"id": "7c7e495a-aaaa-aaaa-aaaa-68becefbde5f",
"alias": "testovaya-kompaniya",
"title": "test company",
"description": "Example description",
"url": "test1.com",
"contactPhone": null,
"contactEmail": "user@gitflic.ru",
"ownerAlias": "user1",
"avatar": "https://gitflic.ru/upload/img/6c482659-aaaa-aaaa-aaaa-d4086f2d8251.jpg",
"private": false,
"selectorTitle": "test company",
"selectorId": "7c7e495a-aaaa-aaaa-aaaa-68becefbde5f",
"selectorOwnerAlias": null,
"hexColor": null,
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
},
{
"id": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"alias": "public-company",
"title": "public company",
"description": "Example description",
"url": null,
"contactPhone": "+79991234567",
"contactEmail": "user@gitflic.ru",
"ownerAlias": "user1",
"avatar": "https://gitflic.ru/upload/img/4b0fab04-aaaa-aaaa-aaaa-ec70560fcae2.jpg",
"private": false,
"selectorTitle": "public company",
"selectorId": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"selectorOwnerAlias": null,
"hexColor": null,
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403
- No access rights.
STATUS 404
- Data not found.
Method for getting a company by alias
GET /company/{companyAlias}
The request returns a company
Path variable | Type | Description |
---|---|---|
companyAlias |
String | Company alias |
Responses
STATUS 200
- Company successfully returned.
Example response
{
"id": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"alias": "public-company",
"title": "public company",
"description": "Example description",
"url": null,
"contactPhone": "+79991234567",
"contactEmail": "user@gitflic.ru",
"ownerAlias": "user1",
"avatar": "https://gitflic.ru/upload/img/4b0fab04-aaaa-aaaa-aaaa-ec70560fcae2.jpg",
"private": false,
"selectorTitle": "public company",
"selectorId": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"selectorOwnerAlias": null,
"hexColor": null,
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
}
STATUS 403
- No access rights.
STATUS 404
- Data not found.
Method for creating a company
POST /company
The request creates and returns a company
Request
Supported JSON format
POST request body structure:
Parameter | Description |
---|---|
title |
Company name |
isPrivate |
Private company or not. Accepts true or false |
alias |
Company alias |
description |
Company description |
Example JSON object
{
"title": "company",
"isPrivate": "true",
"alias": "company",
"description": "description"
}
Responses
STATUS 200
- Company successfully created.
Example response
{
"id": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"alias": "company",
"title": "company",
"description": "description",
"url": null,
"contactPhone": null,
"contactEmail": null,
"ownerAlias": "user",
"avatar": "https://gitflic.ru/upload/img/4b0fab04-aaaa-aaaa-aaaa-ec70560fcae2.jpg",
"private": true,
"selectorTitle": "company",
"selectorId": "f931a10b-aaaa-aaaa-aaaa-16f4d4decda1",
"selectorOwnerAlias": null,
"hexColor": null,
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
}
STATUS 403
- No access rights.
STATUS 404
- Data not found.
Method for inviting a user to a company
POST /company/{companyAlias}/member/invite
The request adds a user to a company with the specified role
Path variable | Type | Description |
---|---|---|
companyAlias |
String | Alias of the company 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 company |
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 for changing a user's role in a company
PUT /company/{companyAlias}/member/role
The request changes the user's role in a company
Path variable | Type | Description |
---|---|---|
companyAlias |
String | Alias of the company 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 company |
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 for removing a user from a company
DELETE /company/{companyAlias}/member/{userAlias}
The request removes a user from a company
Path variable | Type | Description |
---|---|---|
companyAlias |
String | Alias of the company to remove the user from |
userAlias |
String | Alias of the user to be removed from the company |
Responses
STATUS 200
- User removed from the company.
STATUS 403
- No access rights.
STATUS 404
- Data not found.
Company template settings methods
Company settings have templates that can be applied to all projects of the company:
Method for getting the state of company template settings
GET /company/{companyAlias}/setting/import
The request returns the state of template settings - their availability for application to child projects.
Path variable | Type | Description |
---|---|---|
companyAlias |
String | Company 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 for changing the state of company template settings
POST /company/{companyAlias}/setting/import
The request returns the state of company template settings - their availability for application to child projects.
Path variable | Type | Description |
---|---|---|
companyAlias |
String | Company alias |
Request
Supported JSON format.
POST request body structure:
Parameter | Type | Description |
---|---|---|
allowImportBranchProtection |
Boolean | If true , the Apply branch protection to created company projects setting is active |
allowImportEnvironmentProtection |
Boolean | If true , the Apply environment protection to created company projects setting is active |
allowImportTagProtection |
Boolean | If true , the Apply tag protection to created company projects setting is active |
allowImportMrApprovalConfigAndRules |
Boolean | If true , the Apply merge request approval rules to created company projects setting is active |
allowImportPipelineLifetimeSetting |
Boolean | If true , the Apply pipeline lifetime setting to created 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 company branch protection rules
- get list of company branch protection rules
- get company branch protection rule by UUID
- create company branch protection rule
- edit company branch protection rule
- delete company branch protection rule
- apply branch protection rules to company projects
You can find out more about these methods here
Methods for company tag protection rules
- get list of company tag protection rules
- get company tag protection rule by UUID
- create company tag protection rule
- edit company tag protection rule
- delete company tag protection rule
- apply tag protection rules to company projects
You can find out more about these methods here
Methods for company merge request settings
- get list of company merge request approval rules
- get company merge request approval rule
- create company merge request approval rule
- edit company merge request approval rule
- delete company merge request approval rule
- get list of company merge request settings
- edit company merge request settings
- get company squash commit setting
- edit company squash commit setting
- get company merge methods
- edit company merge methods
- get company merge message templates
- edit company merge message templates
- apply merge request settings to company projects
You can find out more about these methods here
Methods for company CI/CD settings
- get company pipeline lifetime setting
- edit company pipeline lifetime setting
- apply pipeline lifetime settings to company projects
You can find out more about these methods here
Methods for company environment protection rules
- get list of company environment protection rules
- get company environment protection rule by UUID
- create company environment protection rule
- edit company environment protection rule
- delete company environment protection rule
- apply environment protection rules to company projects
You can find out more about these methods here
Automated translation!
This page was translated using automatic translation tools. The text may contain inaccuracies.