Administrator methods
These methods work only with administrator permissions.
Description of the JSON object structure that describes service settings
| Field | Type | Description |
|---|---|---|
disableLdapAuth |
Boolean | New account registration via LDAP is available false or not true |
disableSamlAuth |
Boolean | New account registration via SAML is available false or not true |
disableMailAuth |
Boolean | New account registration via email is available false or not true |
fileDownloadIsEnabled |
Boolean | Downloading archives and files in the project is available true or not false |
pullRepoFromAnonUserIsEnabled |
Boolean | Anonymous users can pull public repositories true or not false |
downloadReleaseFromAnonUserIsEnabled |
Boolean | Anonymous users can download releases true or not false |
enableEmailValidation |
Boolean | General email validation is enabled true or not false |
enableDomainValidation |
Boolean | Email domain validation is enabled true or not false |
enableWhiteList |
Boolean | Allowlist validation is enabled true or denylist validation is enabled false |
whiteListDomains |
Set (String) | Array containing allowlisted domains |
blackListDomains |
Set (String) | Array containing denylisted domains |
userAutoConfirm |
Boolean | New users are automatically registered with a confirmed email address true or not false |
enableApiLimit |
Boolean | The hourly API request limit is enabled true or not false |
userApiCountLimit |
Integer | Maximum number of API requests per hour |
enableCustomSshPort |
Boolean | The SSH port is displayed in project remote URLs for all instances true or not false |
sshPort |
Integer | SSH port displayed in project remote URLs for all instances |
globalRegistryAnonymousAccess |
Boolean | Anonymous users can view packages uploaded to the global package registry true or not false |
publicRepositoryAutoPermission |
Boolean | All users can create public projects true or not false |
projectUpdateLag |
Integer | Available mirror project update frequency |
sessionMaxInactiveIntervalMinutes |
Integer | Maximum time in minutes that a user can remain inactive before the session is automatically terminated |
pullMirrorUpdateIntervalMinutes |
Integer | Interval in minutes for updating PULL mirrors |
pushMirrorUpdateIntervalMinutes |
Integer | Interval in minutes for updating PUSH mirrors |
projectCreatePermission |
Boolean | Project creation is available to all users true or configured separately false |
teamCreatePermission |
Boolean | Team creation is available to all users true or configured separately false |
companyCreatePermission |
Boolean | Company creation is available to all users true or configured separately false |
enableTwoFactor |
Boolean | Two-factor authentication is available for sign-in true or not false |
enableBasicAuth |
Boolean | Basic authentication for obtaining an API token is available true or not false |
defaultLoginPage |
String | Default authentication page. Possible values: BASIC, SAML, and LDAP |
enableBasicLoginPage |
Boolean | The standard authentication page is available true or not false |
enableLdapLoginPage |
Boolean | The LDAP authentication page is available true or not false |
enableSamlLoginPage |
Boolean | The SAML authentication page is available true or not false |
enableOidcLoginPage |
Boolean | The OIDC authentication page is available true or not false |
enableReports |
Boolean | The ability to submit reports about projects, teams, and companies is available true or not false |
lockUserAccountIfLoginAttemptsHasBeenExceeded |
Boolean | Account sign-in can be blocked when the number of sign-in attempts is exceeded true or not false |
maxUserArchivedPasswords |
Integer | Number of archived passwords |
timeToLockUser |
Integer | Blocking duration after exceeding sign-in attempts (in minutes) |
timeToCountFailUserLoginAttempts |
Integer | Time window for counting failed sign-in attempts (in seconds) |
archiveUserPasswordsIsEnabled |
Boolean | Archived passwords can be used true or not false |
maxAttemptsToLoginIntoAccount |
Integer | Maximum number of failed password attempts after which all subsequent attempts are rejected |
Methods for working with SSH keys
Adding an SSH key to a user
POST /admin/user/{userAlias}/key/create
The request adds an SSH key to the user
| Request path variable | Type | Description |
|---|---|---|
userAlias |
string | User alias |
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
publicKey |
string | User SSH key |
title |
string | Name for the user SSH key |
expiresAt |
string | Key expiration date in ISO format |
JSON object example
{
"publicKey" : "ssh-ed25519 AAAAC3NzaC1lZFHNRPTE5AAAAIDkxja/2VmTEsJDTtf3bI4XYDpb58fvKfSjy7/u8EZeI your_email@gitflic.ru",
"title": "Название ключа",
"expiresAt" : "2020-10-10"
}
Responses
STATUS 200 - SSH key added successfully:
Response example
{
"uuid":"089cdbe3-aaaa-aaaa-aaaa-b0edde8eda6d"
"publicKey":"ssh-ed25519 AAAAC3NzaC1lZFHNRPTE5AAAAIDkxja/2VmTEsJDTtf3bI4XYDpb58fvKfSjy7/u8EZeI your_email@gitflic.ru"
"title":"Key name"
"expiresAt": "2020-10-10"
"userUuid":"f1a94466-aaaa-aaaa-aaaa-744ec3bbd60c"
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
STATUS 422 - This key is already in use.
Getting the list of a user's SSH keys
GET /admin/user/{userAlias}/key
The request returns a list of all user SSH keys
| Request path variable | Type | Description |
|---|---|---|
userAlias |
string | User alias |
Responses
STATUS 200 - Information retrieved successfully.
Response example
{
"_embedded": {
"userPublicSshKeyModelList": [
{
"uuid": "b9c4e55a-aaaa-aaaa-aaaa-fb8dc25d9e3f",
"publicKey": "ssh-ed25519 AAAAB3NzaC1yc2EAAAADAQABAAABgQDB1AxIDFJr0mBl2MTeY2TOpUz0hDz7Fm5GzU= Михаил@DESKTOP-EPMR5HD\r\n",
"title": "Key1",
"expiresAt": null,
"userUuid": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51"
},
{
"uuid": "05e9982b-aaaa-aaaa-aaaa-ddc9bb0ec3d7",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZVF1NTE5AAAAIDkxja/2VmTEsIMRtf3bI4XYDpb5f8vLfSjy7/u8EZeI your_email@gitflic.ru\r\n",
"title": "Key2",
"expiresAt": null,
"userUuid": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51"
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Getting a user SSH key
GET admin/user/{userAlias}/key/{keyUuid}
The request returns information about the user SSH key
| Request path variable | Type | Description |
|---|---|---|
userAlias |
string | User alias |
keyUuid |
string | User key ID |
Responses
STATUS 200 - Information retrieved successfully.
Response example
{
"uuid":"0dee836e-aaaa-aaaa-aaaa-65318059de1f"
"publicKey":"ssh-ed25519 AAAAC3NzaC1lZFHNRPTE5AAAAIDkxja/2VmTEsJDTtf3bI4XYDpb58fvKfSjy7/u8EZeI your_email@gitflic.ru"
"title":"Key name"
"expiresAt":"2020-10-10T10-10-10Z"
"userUuid":"f1a94466-aaaa-aaaa-aaaa-744ec3bbd60c"
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Deleting a user SSH key
DELETE admin/user/{userAlias}/key/delete/{keyUuid}
The request deletes the user SSH key
| Request path variable | Type | Description |
|---|---|---|
userAlias |
string | User alias |
keyUuid |
string | User key ID |
Responses
STATUS 200 - Key deleted successfully.
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Methods for working with user data
Searching for users
GET admin/user?email={email}&username={userAlias}
The request returns a list of users found by the specified parameters. The number of objects displayed per page can be configured
| Request path variable | Type | Description |
|---|---|---|
email |
string | Optional parameter. User email |
userAlias |
string | Optional parameter. User alias |
Responses
STATUS 200 - JSON example:
Response example
{
"_embedded": {
"restUserAdminModelList": [
{
"id": "2cd3dd9e-aaaa-aaaa-aaaa-9799ce223f67",
"username": "adminuser",
"email": adminuser@admin.local,
"name": "admin",
"surname": "user",
"fullName": "admin user",
"avatar": "https://gitflic.ru/upload/img/b0ea82d9-aaaa-aaaa-aaaa-d75b4da79a67.png",
"cover": "/upload/img/f7f442e1-aaaa-aaaa-aaaa-fb963ac02506.jpg",
"confirmed": true
},
{
"id": "4fd50abd-aaaa-aaaa-aaaa-87186e8a5b67",
"username": "us",
"email": user@test.ru,
"name": "Ivan",
"surname": "Ivanов",
"fullName": "Ivan Ivanов",
"avatar": "https://rccw.gitflic.tech/upload/img/20b2f481-aaaa-aaaa-aaaa-ccf26df448e8.png",
"cover": "/upload/img/ff3gv3e1-aaaa-aaaa-aaaa1-5u963ak0f506.jpg",
"confirmed": true
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Creating a user
POST /user
The request returns information about the created user.
Request
Supported format: JSON
POST request body structure:
| Parameter | Description |
|---|---|
email |
Email of the user being created |
password |
Password of the user being created |
alias |
Alias of the user being created |
JSON object example
{
"email": "email@local.ru",
"password": "password",
"alias": "alias"
}
Responses
STATUS 200 - JSON example:
Response example
{
"id":"f3657c3c-aaaa-aaaa-aaaa-917acb676944"
"username":"alias"
"name":null
"surname":null
"fullName":null
"avatar":"http://localhost:8080/upload/img/5c10b16d-aaaa-aaaa-aaaa-76443bc44055.png"
"cover":null
}
STATUS 403 - Insufficient permissions.
STATUS 422 - A user with this data already exists or invalid data was entered.
Changing a user email address
PUT /admin/user/{userAlias}/change-email
The request changes the user email address
| Request path variable | Type | Description |
|---|---|---|
userAlias |
string | User alias |
Request
Supported format: JSON
POST request body structure:
| Parameter | Description |
|---|---|
email |
New user email |
JSON object example
{
"email": "email@local.ru"
}
Responses
STATUS 200 - User email changed successfully.
STATUS 403 - Insufficient permissions.
STATUS 422 - A user with this data already exists or invalid data was entered.
Changing a user alias
PUT /admin/user/{userAlias}/change-username
The request changes the user alias
| Request path variable | Type | Description |
|---|---|---|
userAlias |
string | User alias |
Request
Supported format: JSON
POST request body structure
| Parameter | Description |
|---|---|
username |
New user alias |
JSON object example
{
"username": "adminuser"
}
Responses
STATUS 200 - User alias changed successfully.
STATUS 403 - Insufficient permissions.
STATUS 422 - A user with this data already exists or invalid data was entered.
Changing a user password
PUT /admin/user/{userAlias}/change-password
| Request path variable | Type | Description |
|---|---|---|
userAlias |
string | User alias |
The request changes the user password.
Request
Supported format: JSON
POST request body structure
| Parameter | Description |
|---|---|
password |
New user password |
passwordConfirm |
Password confirmation |
JSON object example
{
"password": "qwerty123",
"passwordConfirm" : "qwerty123"
}
Responses
STATUS 200 - User password changed successfully.
STATUS 403 - Insufficient permissions.
STATUS 422 - A user with this data already exists or invalid data was entered.
Blocking a user
POST /admin/user/{userUuid}/account/ban
| Request path variable | Type | Description |
|---|---|---|
userUuid |
string | User UUID |
The request blocks the user account. The blocking reason can be specified in the request body.
Request
Supported format: JSON
POST request body structure
| Parameter | Description |
|---|---|
reason |
Account blocking reason. Maximum length is 128 characters. |
JSON object example
{
"reason": "Увольнение сотрудника"
}
Responses
STATUS 200 - Account blocked successfully.
STATUS 400 - The user is already blocked.
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
STATUS 422 - The blocking reason is longer than 128 characters.
Unblocking a user
POST /admin/user/{userUuid}/account/unban
| Request path variable | Type | Description |
|---|---|---|
userUuid |
string | User UUID |
The request unblocks the user account.
Responses
STATUS 200 - User account unblocked successfully.
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Commit statistics by file format for all users
GET /user/push-stats/all
The request returns data about all users and the file formats committed by each user. The data is presented as percentages of formats and commits created by the user. Format counting does not depend on the number of files with the same format in a single commit.
Responses
STATUS 200 - Information retrieved successfully.
Response example
{
"pushStats": [
{
"userSimple": {
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"username": "gitflicuser",
"name": "Gitflic user",
"surname": null,
"fullName": "Gitflic user",
"avatar": "https://gitflic.ru/static/image/avatar.jpg",
"cover": "https://gitflic.ru/static/image/user-cover.png"
},
"pushedFileExtensions": [
{
"fileExtension": "gitignore",
"percent": "7,69%"
},
{
"fileExtension": "",
"percent": "7,69%"
},
{
"fileExtension": "csv",
"percent": "7,69%"
},
{
"fileExtension": "md",
"percent": "15,38%"
},
{
"fileExtension": "log",
"percent": "7,69%"
},
{
"fileExtension": "png",
"percent": "7,69%"
},
{
"fileExtension": "txt",
"percent": "7,69%"
},
{
"fileExtension": "py",
"percent": "30,77%"
}
]
}
],
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
Commit statistics by file format for selected users
GET /user/push-stats/specified-users
The request returns data about selected users and the file formats committed by each user. The data is presented as percentages of formats and commits created by the user. Format counting does not depend on the number of files with the same format in a single commit.
Request
Supported format: JSON
GET request body structure
| Parameter | Description |
|---|---|
userUuids |
Array of user UUIDs |
JSON object example
{
"userUuids": ["6736240a-aaaa-aaaa-aaaa-cab026562172","131baa73-aaaa-aaaa-aaaa-b09f83c3afc0"]
}
Responses
STATUS 200 - Information retrieved successfully.
Response example
[
{
"userSimpleModel": {
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"username": "gitflicuser",
"name": "Gitflic user",
"surname": null,
"fullName": "Gitflic user",
"avatar": "https://gitflic.ru/static/image/avatar.jpg",
"cover": "https://gitflic.ru/static/image/user-cover.png",
"links": []
},
"pushedFileExtensionsModel": [
{
"fileExtension": "md",
"percent": "15.38%"
},
{
"fileExtension": "gitignore",
"percent": "7.69%"
},
{
"fileExtension": "",
"percent": "7.69%"
},
{
"fileExtension": "py",
"percent": "30.77%"
},
{
"fileExtension": "DS_Store",
"percent": "7.69%"
},
{
"fileExtension": "csv",
"percent": "7.69%"
},
{
"fileExtension": "log",
"percent": "7.69%"
},
{
"fileExtension": "png",
"percent": "7.69%"
},
{
"fileExtension": "txt",
"percent": "7.69%"
}
]
}
]
STATUS 403 - Insufficient permissions.
STATUS 422 - Invalid data was entered.
Methods for working with agents
Getting information for service-level agent registration
GET /admin/runners/registration-info
The request returns the URL and token required to register an agent at the service level.
Responses
STATUS 200 - Information retrieved successfully.
Response example
{
"id":"1"
"registrationUrl":"http://localhost:8080/-/runner/registration"
"registrationToken":"0d949a3a-aaaa-aaaa-aaaa-5fa8c3953e70"
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Resetting the service-level agent registration token
POST /admin/runners/reset-registration-token
The request resets the token used to register an agent at the service level.
Responses
STATUS 200 - Token reset successfully.
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Getting the list of agents
GET /admin/runners {#runnerAll}
The request returns a list of agents registered in the service. The number of objects displayed per page can be configured
Responses
STATUS 200 - JSON example:
Response example
{
"_embedded": {
"restPipelineRunnerModelList": [
{
"id": "74af2044-aaaa-aaaa-aaaa-47d0ef20639a",
"description": "Description agent для company",
"connectedAt": "2024-06-03T08:37:21.33104",
"active": false,
"name": "Gloin",
"platform": "Linux",
"architecture": "amd64",
"ipAddress": "127.0.0.1",
"tags": [
"4.4",
"4.5",
"4.6"
],
"ownerType": "COMPANY",
"ownerId": 4,
"runUntagged": true,
"locked": true,
"maxTimeoutInSec": 100,
"protected": true
},
{
"id": "c5c48d5f-aaaa-aaaa-aaaa-01aa12228f2d",
"description": "Description agent для project",
"connectedAt": "2024-06-17T09:06:37.966851",
"active": true,
"name": "The Lord of the Eagles",
"platform": "Linux",
"architecture": "amd64",
"ipAddress": "127.0.0.1",
"tags": [
"3.2.1",
"3.2.2",
"3.2.3"
],
"ownerType": "PROJECT",
"ownerId": 84,
"runUntagged": false,
"locked": false,
"maxTimeoutInSec": 100,
"protected": false
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Getting an agent by UUID
GET /admin/runners/{runnerUuid} {#runnerUuid}
The request returns information about the agent
| Request path variable | Type | Description |
|---|---|---|
runnerUuid |
String | Agent UUID |
Responses
STATUS 200 - JSON example:
Response example
{
"id": "74af2044-aaaa-aaaa-aaaa-47d0ef20639a",
"description": "Description agent",
"connectedAt": "2024-06-03T08:37:21.33104",
"active": true,
"name": "Gloin",
"platform": "Linux",
"architecture": "amd64",
"ipAddress": "127.0.0.1",
"tags": [
"4.4",
"4.5",
"4.6"
],
"ownerType": "COMPANY",
"ownerId": 4,
"runUntagged": false,
"locked": false,
"maxTimeoutInSec": 100,
"protected": true
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Getting the list of agents project
GET /admin/runners/project/{ownerAlias}/{projectAlias} {#runnerProjectAll}
The request returns a list of agents for the specified project. The number of objects displayed per page can be configured
| Request path variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Responses
STATUS 200 - JSON example:
Response example
{
"_embedded": {
"restPipelineRunnerModelList": [
{
"id": "c5c48d5f-aaaa-aaaa-aaaa-01aa12228f2d",
"description": "Description agent",
"connectedAt": "2024-06-17T09:06:37.966851",
"active": true,
"name": "The Lord of the Eagles",
"platform": "Linux",
"architecture": "amd64",
"ipAddress": "127.0.0.1",
"tags": [
"3.2.1",
"3.2.2",
"3.2.3"
],
"ownerType": "PROJECT",
"ownerId": 84,
"runUntagged": false,
"locked": false,
"maxTimeoutInSec": 100,
"protected": true
}
]
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Getting the list of agents company
GET /admin/runners/company/{companyAlias} {#runnerCompanyAll}
The request returns a list of agents for the specified company. The number of objects displayed per page can be configured
| Request path variable | Type | Description |
|---|---|---|
companyAlias |
String | Company alias |
Responses
STATUS 200 - JSON example:
Response example
{
"_embedded": {
"restPipelineRunnerModelList": [
{
"id": "74af2044-aaaa-aaaa-aaaa-47d0ef20639a",
"description": "Description agent",
"connectedAt": "2024-06-03T08:37:21.33104",
"active": true,
"name": "Gloin",
"platform": "Linux",
"architecture": "amd64",
"ipAddress": "127.0.0.1",
"tags": [
"4.4",
"4.5",
"4.6"
],
"ownerType": "COMPANY",
"ownerId": 4,
"runUntagged": false,
"locked": false,
"maxTimeoutInSec": 100,
"protected": true
}
]
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Getting jobs of all service agents
GET /admin/runners/all/jobs?jobStatus {#runnerJob}
The request returns information about jobs completed by all agents registered at the service level
Responses
STATUS 200 - JSON example:
Response example
{
"_embedded": {
"restPipelineJobModelList": [
{
"id": "c0f4ce7a-aaaa-aaaa-aaaa-f75d22415acc",
"localId": 2,
"finishedAt": "2024-06-21T11:38:15.229604Z",
"startedAt": null,
"name": "job 1",
"stageName": "test",
"tag": false,
"ref": "master",
"erasedAt": null,
"artifactsExpireAt": null,
"status": "SUCCESS",
"pipelineLocalId": 2
},
{
"id": "9bd6e1c7-aaaa-aaaa-aaaa-384e89f5e770",
"localId": 205,
"finishedAt": "2024-06-21T11:38:35.449307Z",
"startedAt": null,
"name": "job 2",
"stageName": "build",
"tag": false,
"ref": "master",
"erasedAt": null,
"artifactsExpireAt": null,
"status": "SUCCESS",
"pipelineLocalId": 36
}
]
},
"page": {
"size": 2,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Getting jobs of the service agent with the specified UUID
GET /admin/runners/{runnerUuid}/jobs?jobStatus {#runnerJobUuid}
The request returns information about jobs completed by the agent with the specified UUID registered at the service level
| Request path variable | Type | Description |
|---|---|---|
runnerUuid |
String | Agent UUID |
Responses
STATUS 200 - JSON example:
Response example
{
"_embedded": {
"restPipelineJobModelList": [
{
"id": "c0f4ce7a-aaaa-aaaa-aaaa-f75d22415acc",
"localId": 2,
"finishedAt": "2024-06-21T11:38:15.229604Z",
"startedAt": null,
"name": "job 1",
"stageName": "test",
"tag": false,
"ref": "master",
"erasedAt": null,
"artifactsExpireAt": null,
"status": "SUCCESS",
"pipelineLocalId": 2
},
{
"id": "9bd6e1c7-aaaa-aaaa-aaaa-384e89f5e770",
"localId": 205,
"finishedAt": "2024-06-21T11:38:35.449307Z",
"startedAt": null,
"name": "job 2",
"stageName": "build",
"tag": false,
"ref": "master",
"erasedAt": null,
"artifactsExpireAt": null,
"status": "SUCCESS",
"pipelineLocalId": 36
}
]
},
"page": {
"size": 2,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Method for shutting down an agent by UUID
POST /admin/runners/{runnerUuid}/shutdown {#runnerShutdownUuid}
The request shuts down the agent with the specified UUID
| Request path variable | Type | Description |
|---|---|---|
runnerUuid |
String | Agent UUID |
Responses
STATUS 200 - Agent shut down.
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Editing a company agent
POST /admin/runners/{runnerUuid}/edit {#runnerEdit}
The request edits the agent with the specified UUID and returns information about it
| Request path variable | Type | Description |
|---|---|---|
runnerUuid |
String | Agent UUID |
Request
Supported format: JSON
POST request body structure:
| Parameters | Type | Description |
|---|---|---|
name |
String | Agent name |
description |
String | Description agent |
isActive |
Boolean | Active agent true or not false |
maxTimeoutInSec |
Integer | Maximum job timeout in seconds |
tags |
Object | Object containing a list of tags. The agent will work only for the specified tags |
runUntagged |
Boolean | Whether this agent can pick jobs without tags true or not false |
isLocked |
Boolean | Whether the agent is locked true or not false. A locked agent cannot be assigned to other projects |
isProtected |
Boolean | The agent works only on protected branches true or not false |
JSON object example
{
"name": "Gloin",
"description": "Описание агента",
"isActive": true,
"maxTimeoutInSec": 100,
"ipAddress": "127.0.0.1",
"tags": ["4.4","4.5", "4.6"],
"runUntagged": false,
"isLocked": false,
"isProtected": true
}
Responses
STATUS 200 - JSON example:
Response example
{
"id": "74af2044-aaaa-aaaa-aaaa-47d0ef20639a",
"description": "Description agent",
"connectedAt": "2024-06-03T08:37:21.33104",
"active": true,
"name": "Gloin",
"platform": "Linux",
"architecture": "amd64",
"ipAddress": "127.0.0.1",
"tags": [
"4.4",
"4.5",
"4.6"
],
"ownerType": "COMPANY",
"ownerId": 4,
"runUntagged": false,
"locked": false,
"maxTimeoutInSec": 100,
"protected": true
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Deleting an agent
DELETE /admin/runners/{runnerUuid} {#runnerDeleteUuid}
The request deletes the agent with the specified UUID
| Request path variable | Type | Description |
|---|---|---|
runnerUuid |
String | Agent UUID |
Responses
STATUS 204 - Agent deleted.
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Methods for working with service settings
All methods in this section return a JSON object that describes the service settings.
Getting service settings
GET /admin/settings
The request returns an object containing all service settings.
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing registration availability in the service
POST /admin/settings/registration
The request changes the availability of new account registration via LDAP, SAML, or email.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
disableLdapAuth |
Boolean | Whether new account registration via LDAP is available (false) or disabled (true) |
disableSamlAuth |
Boolean | Whether new account registration via SAML is available (false) or disabled (true) |
disableOidcAuth |
Boolean | Whether new account registration via OIDC is available (false) or disabled (true) |
disableMailAuth |
Boolean | Whether new account registration via email is available (false) or disabled (true) |
JSON object example
{
"disableLdapAuth" : "false",
"disableSamlAuth" : "false",
"disableOidcAuth" : "false",
"disableMailAuth" : "false"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing availability of archive and file downloads in a project
POST /admin/settings/download
The request changes archive and file download availability in a project for all users.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
fileDownload |
Boolean | Whether project archives and files can be downloaded (true) or not (false) |
JSON object example
{
"fileDownload" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing public repository pull availability for anonymous users
POST /admin/settings/pull
The request changes public repository pull availability for anonymous users.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
pullRepoFromAnonUser |
Boolean | Whether anonymous users can pull public repositories (true) or not (false) |
JSON object example
{
"pullRepoFromAnonUser" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing release file download availability for anonymous users
POST /admin/settings/download-release
The request changes release file download availability for anonymous users.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
downloadFromAnonUserEnable |
Boolean | Whether anonymous users can download release files (true) or not (false) |
JSON object example
{
"downloadFromAnonUserEnable" : "false"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing automatic registration with a confirmed email address for new users
POST /admin/settings/auto-confirm
The request changes the ability to register with a confirmed email address.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
autoConfirm |
Boolean | New users are automatically registered with a confirmed email address (true) or not (false) |
JSON object example
{
"autoConfirm" : "false"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing email validation
POST /admin/settings/email-validation
The request enables or disables general email validation by top-level domain and mailbox name.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enableEmailValidation |
Boolean | General email validation is enabled (true) or disabled (false) |
JSON object example
{
"enableEmailValidation" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing email domain validation
POST /admin/settings/domain-validation
The request changes email domain validation settings.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enableDomainValidation |
Boolean | Whether email domain validation is enabled (true) or not (false) |
enableWhiteList |
Boolean | Whether allowlist validation is enabled (true) or denylist validation is enabled (false) |
blackListDomains |
Set (String) | Array containing domains to be added to the denylist. |
whiteListDomains |
Set (String) | Array containing domains to be added to the allowlist |
The contents of the
blackListDomainsandwhiteListDomainsparameters overwrite all previously saved domains.
JSON object example
{
"enableDomainValidation" : "false",
"enableWhiteList" : "true",
"blackListDomains" : [""],
"whiteListDomains" : ["local.ru"]
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing the API request limit per hour
POST /admin/settings/api-limit
The request changes the API request limit per hour.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
disableApiLimit |
Boolean | Whether the request count limit is enabled (false) or not (true) |
userApiCountLimit |
Long | Number of API requests that can be sent per hour |
JSON object example
{
"disableApiLimit" : "true",
"userApiCountLimit" : "400"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing the SSH port in project remote URLs for all instances
POST /admin/settings/ssh-port
The request enables or disables displaying the SSH port in the SSH project clone URL for all instances. The SSH port number to display can also be specified in the request.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enableCustomSshPort |
Boolean | The SSH port is displayed in project remote URLs (true) or not (false) |
sshPort |
Integer | SSH port number. The parameter can be provided if the enableCustomSshPort is set to true |
JSON object example
{
"enableCustomSshPort" : "true",
"sshPort" : "1122"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing anonymous access to packages uploaded to the global package registry
POST /admin/settings/anonymous-global-registry-access
The request changes anonymous access to packages uploaded to the global package registry
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
anonymousGlobalRegistryAccess |
Boolean | Whether anonymous users can view packages in the global registry (true) or not (false) |
JSON object example
{
"anonymousGlobalRegistryAccess" : "false"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing whether all users can create public projects
The request changes whether all users can create public projects
POST /admin/settings/public-repository-auto-permission
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enabled |
Boolean | Whether all users can create public projects (true) or not (false) |
JSON object example
{
"enabled" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing how often a user can update a mirror project
POST /admin/settings/mirror-update-lag
The request changes how often a user can update a mirror project. The time is specified in minutes.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
projectUpdateLag |
Integer | Time interval in minutes at which the user can update a mirror project |
JSON object example
{
"projectUpdateLag" : "60"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing session duration
POST /admin/settings/session-max-inactive-interval
The request changes the maximum number of minutes a user may remain inactive before the session is automatically terminated.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
sessionMaxInactiveIntervalMinutes |
Integer | Maximum session duration in minutes |
JSON object example
{
"sessionMaxInactiveIntervalMinutes" : "60"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing the mirror update interval
POST /admin/settings/mirror-update-interval
The request changes the update interval for PUSH and PULL mirrors.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
pushMirrorUpdateIntervalMinutes |
Integer | PUSH mirror update interval in minutes |
pullMirrorUpdateIntervalMinutes |
Integer | PULL mirror update interval in minutes |
JSON object example
{
"pushMirrorUpdateIntervalMinutes": 30,
"pullMirrorUpdateIntervalMinutes": 30
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing the ability to create projects, companies, and teams
POST /admin/settings/create-permissions
The request changes the ability to create projects, companies, or teams for all service users.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enableCreateProject |
Boolean | Whether project creation is available (true) or not (false) |
enableCreateTeam |
Boolean | Whether team creation is available (true) or not (false) |
enableCreateCompany |
Boolean | Whether company creation is available (true) or not (false) |
JSON object example
{
"enableCreateProject" : "true",
"enableCreateTeam" : "true",
"enableCreateCompany" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing the ability to enable two-factor authentication
POST rest-api/admin/settings/2factor
The request changes the ability to enable two-factor authentication for account sign-in.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enableTwoFactor |
Boolean | Whether two-factor authentication can be used to sign in to the account (true) or not (false) |
JSON object example
{
"enableTwoFactor" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing the ability to enable basic authentication for obtaining an API token
POST rest-api/admin/settings/basic-auth
The request changes the ability to enable basic authentication for obtaining an API token.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enableBasicAuth |
Boolean | Whether basic authentication can be used to obtain an API token (true) or not (false) |
JSON object example
{
"enableBasicAuth" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing the default authentication page
POST /admin/settings/login-page
The request changes the available sign-in methods and sets the default authentication page.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
loginPageUrl |
String | Default authentication page. Accepts the following values: BASIC, SAML, LDAP, and OIDC |
isEnableBasic |
Boolean | Whether the standard authentication page is available (true) or not (false) |
isEnableLdap |
Boolean | Whether the LDAP authentication page is available (true) or not (false) |
isEnableSaml |
Boolean | Whether the SAML authentication page is available (true) or not (false) |
isEnableOidc |
Boolean | Whether the OIDC authentication page is available (true) or not (false) |
JSON object example
{
"loginPageUrl" : "OIDC",
"isEnableBasic" : "true",
"isEnableLdap" : "false",
"isEnableSaml" : "false",
"isEnableOIDC" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing the ability to submit reports
POST rest-api/admin/settings/project-report
The request changes the ability to submit reports about projects, teams, or companies.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enableReport |
Boolean | Whether reports can be submitted (true) or not (false) |
JSON object example
{
"enableReport" : "true"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing account sign-in blocking when the number of sign-in attempts is exceeded
POST /admin/settings/lock-account
The request changes the account sign-in blocking rule applied when the number of sign-in attempts is exceeded.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
lockUser |
Boolean | Whether the number of sign-in attempts is limited (true) or not (false) |
maxAttempts |
Integer | Maximum number of failed password attempts after which all subsequent attempts are rejected |
timeToLockUser |
Integer | Blocking duration after exceeding sign-in attempts (in minutes) |
timeToCountFailUserLoginAttempts |
Integer | Time window for counting failed sign-in attempts (in seconds) |
JSON object example
{
"lockUser" : "false",
"maxAttempts" : "6",
"timeToLockUser" : "30",
"timeToCountFailUserLoginAttempts" : "10"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Changing whether an archived password can be reused when changing a password
POST /admin/settings/archive-password
The request changes whether an archived password can be reused.
Request
Supported format: JSON
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
enableArchiveUserPasswords |
Boolean | Whether the use of archived passwords is prohibited (true) or not (false) |
maxUserArchivedPasswords |
Integer | Number of archived passwords |
JSON object example
{
"enableArchiveUserPasswords" : "true",
"maxUserArchivedPasswords" : "4"
}
Responses
STATUS 200 JSON example:
JSON body example
{
"disableLdapAuth": false,
"disableSamlAuth": false,
"disableMailAuth": false,
"fileDownloadIsEnabled": true,
"pullRepoFromAnonUserIsEnabled": true,
"downloadReleaseFromAnonUserIsEnabled": false,
"enableEmailValidation": true,
"enableDomainValidation": false,
"enableWhiteList": true,
"whiteListDomains": [
"local.ru"
],
"blackListDomains": [],
"userAutoConfirm": false,
"enableApiLimit": false,
"userApiCountLimit": 400,
"enableCustomSshPort": true,
"sshPort": 1121,
"globalRegistryAnonymousAccess": false,
"publicRepositoryAutoPermission": false,
"projectUpdateLag": 60,
"sessionMaxInactiveIntervalMinutes": 60,
"pullMirrorUpdateIntervalMinutes": 30,
"pushMirrorUpdateIntervalMinutes": 30,
"projectCreatePermission": true,
"teamCreatePermission": true,
"companyCreatePermission": true,
"enableTwoFactor": true,
"enableBasicAuth": true,
"defaultLoginPage": "OIDC",
"enableBasicLoginPage": true,
"enableLdapLoginPage": false,
"enableSamlLoginPage": false,
"enableOidcLoginPage": true,
"enableReports": true,
"lockUserAccountIfLoginAttemptsHasBeenExceeded": false,
"maxUserArchivedPasswords": 4,
"timeToLockUser": 30,
"timeToCountFailUserLoginAttempts": 10,
"archiveUserPasswordsIsEnabled": true,
"maxAttemptsToLoginIntoAccount": 6
}
STATUS 403 - Insufficient permissions.
Methods for working with SAML connections
The methods described below allow SAML SSO connections to be managed through the REST API
Description of the JSON object structure that describes a SAML connection
| Field | Type | Description |
|---|---|---|
uuid |
String | SAML connection UUID |
name |
String | Display name of the SAML connection |
idpMetadataUrl |
String | URL for obtaining the identity provider SAML XML metadata (IDP metadata) |
idpIssuer |
String | Unique immutable issuerId of the identity provider (IDP issuerId) |
cert |
String | X.509 certificate of the identity provider (IDP certificate) |
idpInitiatedSsoUrl |
String | URL for signing in through the identity provider from the GitFlic authentication page |
Method for getting SAML connections
GET /admin/saml
The request returns a list of SAML connections. The number of objects displayed per page can be configured
Responses
STATUS 200 JSON example:
Response example
{
"_embedded": {
"samlAdminApiModelList": [
{
"uuid": "ebe95df1-aaaa-aaaa-aaaa-1419e9eae965",
"name": "Keycloack",
"idpMetadataUrl": "https://example.com",
"idpIssuer": "login-app",
"cert": "cert-cert-cert-cert-cert=",
"idpInitiatedSsoUrl": "https://example.com"
},
{
"uuid": "136d6402-aaaa-aaaa-aaaa-5afacc9ced10",
"name": "Gitflic",
"idpMetadataUrl": "https://example.com",
"idpIssuer": "Gitflic",
"cert": "cert-cert-cert-cert-cert",
"idpInitiatedSsoUrl": "https://example.com"
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Method for creating a SAML connection
POST /admin/saml
The request creates a SAML connection and returns information about it.
Request
Supported format: JSON
POST request body structure:
| JSON variable | Type | Description |
|---|---|---|
name |
String | Display name of the SAML connection |
idpMetadataUrl |
String | URL for obtaining the identity provider SAML XML metadata (IDP metadata) |
idpIssuer |
String | Unique immutable issuerId of the identity provider (IDP issuerId) |
idpInitiatedSsoUrl |
String | URL for signing in through the identity provider from the GitFlic authentication page |
cert |
String | X.509 certificate of the identity provider (IDP certificate) |
JSON object example
{
"name":"SAML-подключение",
"idpMetadataUrl":"https://example.com",
"idpIssuer":"Gitflic",
"idpInitiatedSsoUrl": "https://example.com",
"cert": "MIIFdzCCA14gaaaaaaaaaaaa1PgmIrUvdp7o"
}
Responses
STATUS 200 JSON example:
Response example
{
"uuid": "136d6402-aaaa-aaaa-aaaa-5afacc9ced10",
"name": "SAML-подключение",
"idpMetadataUrl": "https://example.com",
"idpIssuer": "Gitflic",
"cert": "MIIFdzCCA14gaaaaaaaaaaaa1PgmIrUvdp7o",
"idpInitiatedSsoUrl": "https://example.com"
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Method for editing an existing SAML connection
PUT /admin/saml/{samlUuid}
The request edits an existing SAML connection and returns information about it.
| Request path variable | Type | Description |
|---|---|---|
samlUuid |
String | SAML connection UUID |
Request
Supported format: JSON
PUT request body structure:
| JSON variable | Type | Description |
|---|---|---|
name |
String | Display name of the SAML connection |
idpMetadataUrl |
String | URL for obtaining the identity provider SAML XML metadata (IDP metadata) |
idpIssuer |
String | Unique immutable issuerId of the identity provider (IDP issuerId) |
idpInitiatedSsoUrl |
String | URL for signing in through the identity provider from the GitFlic authentication page |
cert |
String | X.509 certificate of the identity provider (IDP certificate) |
JSON object example
{
"name":"SAML-подключение",
"idpMetadataUrl":"https://example.com",
"idpIssuer":"Gitflic",
"idpInitiatedSsoUrl": "https://example.com",
"cert": "MIIFdzCCA14gaaaaaaaaaaaa1PgmIrUvdp7o"
}
Responses
STATUS 200 JSON example:
Response example
{
"uuid": "136d6402-aaaa-aaaa-aaaa-5afacc9ced10",
"name": "SAML-подключение",
"idpMetadataUrl": "https://example.com",
"idpIssuer": "Gitflic",
"cert": "MIIFdzCCA14gaaaaaaaaaaaa1PgmIrUvdp7o",
"idpInitiatedSsoUrl": "https://example.com"
}
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Method for enabling or disabling a SAML connection
PUT /admin/saml/{samlUuid}change-status/?isEnabled={samlStatus}
The request enables or disables a SAML connection
| Request path variable | Type | Description |
|---|---|---|
samlUuid |
String | SAML connection UUID |
samlStatus |
Boolean | The SAML connection is enabled true or disabled false |
Responses
STATUS 200 - SAML connection status changed successfully.
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Methods for working with LDAP connections
The methods described below allow LDAP connections to be managed through the REST API
Method for importing users through an LDAP connection
POST /admin/ldap/{ldapUuid}/users/import
The request starts user synchronization through the connected LDAP connection The response displays the list of users received from LDAP. Existing users are updated, and new users are created.
Responses
STATUS 200 JSON example:
Response example
[
{
"id": "b28a45da-d6c6-aaaaaaaaa-e00d931ba33d",
"username": "tester",
"name": "user1",
"surname": "Tester",
"fullName": "user1 Tester",
"avatar": "http://localhost:8080/upload/-/user/b28a45da-aaaaaaaaa-e00d931ba33d/avatar/0eccb1ea-aaaaaaaaaa-a1b7-f38467177c8d.png",
"links": []
},
{
"id": "bbe3448d-29a2-aaaaaaaaa-b2e7a8892fe0",
"username": "last2",
"name": "user2",
"surname": "last2",
"fullName": "user2 last2",
"avatar": "http://localhost:8080/upload/-/user/bbe3448d-aaaaaaaaaaaa-b2e7a8892fe0/avatar/4e9b905b-7c1a-aaaaaaa3cf6bfaca1.png",
"links": []
}
]
STATUS 403 - Insufficient permissions.
STATUS 404 - No data found for the request.
Automated translation!
This page has been automatically translated. The text may contain inaccuracies.