Projects
Description of JSON Object Structures
Project
| Field | Type | Description |
|---|---|---|
id |
String | Unique project ID |
title |
String | Project title |
description |
String | Project description |
alias |
String | Project alias |
defaultBranch |
String | Project default branch |
workBranch |
String | Project working branch |
siteUrl |
String | Project website |
owner |
Object | Project owner, structure description |
language |
String | Project language |
forEducation |
Boolean | Educational project true or regular false |
forkedFromId |
String | ID of the project from which the fork was made |
mirrorUrl |
String | URL of the project from which the mirror was made |
mirrorType |
String | Mirror type. Possible values: PULL and PUSH |
allowedMemory |
String | Allowed memory for the project |
forkUrl |
String | URL of the project from which the fork was made |
httpTransportUrl |
String | HTTPS project clone link |
sshTransportUrl |
String | SSH project clone link |
topics |
Set (String) | Array containing project topics |
mirror |
Boolean | Project is a mirror true or not false |
private |
Boolean | Project is private true or public false |
Project Owner
| Field | Type | Description |
|---|---|---|
alias |
String | Owner alias |
type |
String | Project owner type. Possible values: USER, TEAM and COMPANY |
File
| Field | Type | Description |
|---|---|---|
uploadFileUuid |
String | File UUID |
filePath |
String | Relative path where the file is stored on the file system |
webFilePath |
String | Relative path where the file is available for download |
fileName |
String | File name |
fileSize |
String | File size |
uploadDate |
LocalDate | File upload date |
Project Retrieval Methods
Get List of Public Projects
GET /project?q={title}
Request returns an array of public projects, with configurable number of displayed objects per page
| Query Parameter | Type | Description |
|---|---|---|
q |
String | Optional parameter. Project title |
Responses
STATUS 200 - example JSON:
Response example
{
"_embedded": {
"projectList": [
{
"id": "06a973fb-aaaa-aaaa-aaaa-d72a21b16087",
"title": "Project",
"description": "Repository example",
"alias": "project",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "team",
"type": "TEAM"
},
"language": "Markdown",
"forEducation": false,
"forkedFromId": "87c79f93-aaaa-aaaa-aaaa-60d08fbbca7b",
"pullMirrorUrl": null,
"allowedMemory": "4GB",
"forkUrl": "https://gitflic.ru/project/team/project",
"httpTransportUrl": "https://gitflic.ru/project/team/project.git",
"sshTransportUrl": "git@gitflic.ru:team/project.git",
"topics": [
"gitflic",
"docs"
],
"private": false,
"mirror": false
},
{
"id": "0ed38c25-aaaa-aaaa-aaaa-462c972efcc5",
"title": "gitflic",
"description": "example",
"alias": "gitflic",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user",
"type": "USER"
},
"language": "java",
"forEducation": false,
"forkedFromId": null,
"pullMirrorUrl": null,
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "https://gitflic.ru/project/user/gitflic.git",
"sshTransportUrl": "git@gitflic.ru:user/gitflic.git",
"topics": [
"gitflic"
],
"private": false,
"mirror": true
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get Project by Alias
GET /project/{ownerAlias}/{projectAlias}
Request returns a project with the specified alias
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Responses
STATUS 200 - example JSON:
Response example
{
"id": "0ed38c25-aaaa-aaaa-aaaa-462c972efcc5",
"title": "gitflic",
"description": "example",
"alias": "gitflic",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user",
"type": "USER"
},
"language": "java",
"forEducation": false,
"forkedFromId": null,
"pullMirrorUrl": null,
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "https://gitflic.ru/project/user/gitflic.git",
"sshTransportUrl": "git@gitflic.ru:user/gitflic.git",
"topics": [
"gitflic"
],
"private": false,
"mirror": true
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get Project by UUID
GET /project/{projectUuid}
Request returns a project with the specified UUID
| Path Variable | Type | Description |
|---|---|---|
projectUuid |
String | Project ID |
Responses
STATUS 200 - example JSON:
Response example
{
"id": "90a99ad1-aaaa-aaaa-aaaa-9cba78b96ebf",
"title": "projectname",
"description": "test",
"alias": "projectname",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "gitflicuser",
"type": "USER"
},
"language": "Markdown",
"forEducation": false,
"forkedFromId": null,
"mirrorUrl": null,
"mirrorType": null,
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "http://localhost:8080/project/gitflicuser/projectname.git",
"sshTransportUrl": "git@localhost:8080:gitflicuser/projectname.git",
"topics": [
"gitflic"
],
"mirror": false,
"private": true
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get List of Active User's Projects
GET /project/my?q={title}
Request returns an array of active user's projects, with configurable number of displayed objects per page
| Query Parameter | Type | Description |
|---|---|---|
q |
String | Optional parameter. Project title |
Responses
STATUS 200 - example JSON:
Response example
{
"_embedded": {
"projectList": [
{
"id": "06a973fb-aaaa-aaaa-aaaa-d72a21b16087",
"title": "Project",
"description": "Repository example",
"alias": "project",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user",
"type": "USER"
},
"language": "Markdown",
"forEducation": false,
"forkedFromId": "87c79f93-aaaa-aaaa-aaaa-60d08fbbca7b",
"pullMirrorUrl": null,
"allowedMemory": "4GB",
"forkUrl": "https://gitflic.ru/project/team/project",
"httpTransportUrl": "https://gitflic.ru/project/user/project.git",
"sshTransportUrl": "git@gitflic.ru:team/project.git",
"topics": [
"gitflic"
],
"private": false,
"mirror": false
},
{
"id": "0ed38c25-aaaa-aaaa-aaaa-462c972efcc5",
"title": "gitflic",
"description": "example",
"alias": "gitflic",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user",
"type": "USER"
},
"language": "java",
"forEducation": false,
"forkedFromId": null,
"pullMirrorUrl": null,
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "https://gitflic.ru/project/user/gitflic.git",
"sshTransportUrl": "git@gitflic.ru:user/gitflic.git",
"topics": [
"gitflic"
],
"private": false,
"mirror": true
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get List of Projects with User Participation
GET /project/shared?q={title}
Request returns an array of projects with user participation, with configurable number of displayed objects per page
| Query Parameter | Type | Description |
|---|---|---|
q |
String | Optional parameter. Project title |
Responses
Response example
{
"_embedded": {
"projectList": [
{
"id": "06a973fb-aaaa-aaaa-aaaa-d72a21b16087",
"title": "Project",
"description": "Repository example",
"alias": "project",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user",
"type": "USER"
},
"language": "Markdown",
"forEducation": false,
"forkedFromId": "87c79f93-aaaa-aaaa-aaaa-60d08fbbca7b",
"pullMirrorUrl": null,
"allowedMemory": "4GB",
"forkUrl": "https://gitflic.ru/project/team/project",
"httpTransportUrl": "https://gitflic.ru/project/user/project.git",
"sshTransportUrl": "git@gitflic.ru:team/project.git",
"topics": [
"gitflic"
],
"private": false,
"mirror": false
},
{
"id": "0ed38c25-aaaa-aaaa-aaaa-462c972efcc5",
"title": "gitflic",
"description": "example",
"alias": "gitflic",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user",
"type": "USER"
},
"language": "java",
"forEducation": false,
"forkedFromId": null,
"pullMirrorUrl": null,
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "https://gitflic.ru/project/user/gitflic.git",
"sshTransportUrl": "git@gitflic.ru:user/gitflic.git",
"topics": [
"gitflic"
],
"private": false,
"mirror": true
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get List of Project Forks
GET /project/{ownerAlias}/{projectAlias}/forked
Request returns an array of public forks of the project, with configurable number of displayed objects per page
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Responses
STATUS 200 - example JSON:
Response example
{
"_embedded": {
"projectList": [
{
"id": "a8c92b63-aaaa-aaaa-aaaa-9fbedc8e3876",
"title": "project-fork",
"description": "",
"alias": "project-fork",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "adminuser",
"type": "USER"
},
"language": "Markdown",
"forEducation": false,
"forkedFromId": "d1e64fd6-aaaa-aaaa-aaaa-76e68db48ed0",
"mirrorUrl": null,
"mirrorType": null,
"allowedMemory": "4GB",
"forkUrl": "https://localhost:8080/project/adminuser/project",
"httpTransportUrl": "https://localhost:8080/project/adminuser/project.git",
"sshTransportUrl": "ssh://gitlocalhost:8080:22/adminuser/project-fork.git",
"topics": [],
"mirror": false,
"private": false
}
]
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Project Creation Methods
Create Project
POST /project
Request creates a project and returns information about it
Request
Supported JSON format
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
title |
String | Project title |
isPrivate |
Boolean | Private project or not. Accepts true or false |
alias |
String | Project alias |
ownerAlias |
String | Owner alias |
ownerAliasType |
String | Project owner type. Accepts USER, TEAM or COMPANY |
language |
String | Programming language |
description |
String | Project description, optional field |
JSON Object Example
{
"title": "my project",
"isPrivate": "true",
"alias": "example",
"ownerAlias": "example-user",
"ownerAliasType": "USER",
"language": "java",
"description": "description"
}
Responses
STATUS 200 - example JSON:
Response example
{
"id": "2f58c38f-aaaa-aaaa-aaaa-3819c74b2c36",
"title": "my project",
"description": "description",
"alias": "example",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "example-user",
"type": "USER"
},
"language": "java",
"forEducation": false,
"forkedFromId": null,
"pullMirrorUrl": null,
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "https://gitflic.ru/project/example-user/example.git",
"sshTransportUrl": "git@gitflic.ru:example-user/example.git",
"topics": [
"gitflic"
],
"private": true,
"mirror": false
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Import Project
POST /project/import-base
Request imports a project and returns information about it
Request
Supported JSON format
POST request body structure:
| Parameter | Type | Description |
|---|---|---|
title |
String | Project title |
isPrivate |
Boolean | Private project or not. Accepts true or false |
alias |
String | Project alias |
ownerAlias |
String | Project owner alias |
ownerAliasType |
String | Project owner type. Accepts USER, TEAM or COMPANY |
language |
String | Programming language |
gitSource |
String | Link to the imported project |
login |
String | Login. Required for importing private project |
token |
String | Token. Required for importing private project |
description |
String | Project description, optional field |
JSON Object Example
{
"title": "example",
"isPrivate": false,
"alias": "import",
"ownerAlias": "user",
"ownerAliasType": "USER",
"language": "java",
"gitSource": "https://gitflic.ru/project/user/example.git",
"login": "user",
"token": "e2ff0fa4-aaaa-aaaa-aaaa-c86f7c0d0ab0",
"description": "example"
}
Responses
STATUS 200 - example JSON:
Response example
{
"id": "4bfe5723-aaaa-aaaa-aaaa-347804f2d47e",
"title": "example",
"description": "example",
"alias": "example",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user",
"type": "USER"
},
"language": "java",
"forEducation": false,
"forkedFromId": null,
"mirrorUrl": null,
"mirrorType": null,
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "https://gitflic.ru/project/example/example.git",
"sshTransportUrl": "git@gitflic.ru:example/example.git",
"topics": [
"gitflic"
],
"private": false,
"mirror": false
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Create Mirror
POST /project/create-mirror
Request creates a project of type mirror and returns information about it
Request
Supported JSON format
POST request body structure:
| Parameter | Description |
|---|---|
title |
Project title |
description |
Description, optional parameter |
isPrivate |
Private project or not. Accepts true or false |
alias |
Project alias |
ownerAlias |
Project owner alias |
ownerAliasType |
Project owner type. Accepts USER, TEAM or COMPANY |
language |
Programming language |
gitSource |
Link to git repository |
mirrorType |
Mirror type. Accepts PULL or PUSH |
login |
Login. Required for access to private project |
token |
Token. Required for access to private project |
refSpecs |
RefSpec configuration for mirroring specific branches or tags |
{
"title": "mirror",
"description": "mirror",
"isPrivate": true,
"alias": "mirror",
"ownerAlias": "user",
"ownerAliasType": "USER",
"language": "java",
"gitSource": "https://gitflic.ru/project/user/project.git",
"mirrorType": "PULL",
"login": "",
"token": "",
"refSpecs": ["refs/heads/master:refs/heads/main"]
}
Responses
STATUS 200 - example JSON:
Response example
{
"id": "4ad463df-aaaa-aaaa-aaaa-137d65545fa3",
"title": "example",
"description": "example",
"alias": "example",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "example",
"type": "USER"
},
"language": "Java",
"forEducation": false,
"forkedFromId": null,
"mirrorUrl": "example.git",
"mirrorType": "PULL",
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "http://gitflic.ru/project/example/example.git",
"sshTransportUrl": "git@gitflic.ru:example/example.git",
"topics": [
"gitflic"
],
"mirror": true,
"private": true
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Convert Existing Project to PUSH Mirror
POST /project/{ownerAlias}/{projectAlias}/to-push-mirror
Request changes the project type to PUSH mirror and returns information about it
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Request
Supported JSON format
POST request body structure:
| Parameter | Description |
|---|---|
source |
Link to git repository |
login |
Login. Required for access to private project |
token |
Token. Required for access to private project |
controlString |
Control string. Has the form ownerAlias/projectAlias, where ownerAlias is the project owner alias and projectAlias is the project alias |
{
"source": "https://gitflic.ru/project/user/project.git",
"login": "example",
"token": "example",
"controlString": "user/example"
}
Responses
STATUS 200 - example JSON:
Response example
{
"id": "4ad463df-aaaa-aaaa-aaaa-137d65545fa3",
"title": "example",
"description": "example",
"alias": "example",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user",
"type": "USER"
},
"language": "java",
"forEducation": false,
"forkedFromId": null,
"mirrorUrl": "example.git",
"mirrorType": "PUSH",
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "http://gitflic.ru/project/example/example.git",
"sshTransportUrl": "git@gitflic.ru:example/example.git",
"topics": [
"gitflic"
],
"mirror": true,
"private": true
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Update Mirror
POST /project/{ownerAlias}/{projectAlias}/manual-update
Request updates the mirror and returns information about the project. This request is executed without additional information in the body.
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Responses
STATUS 200 - example JSON:
Response example
{
"id": "4ad463df-aaaa-aaaa-aaaa-137d65545fa3",
"title": "example",
"description": "example",
"alias": "example",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "example",
"type": "USER"
},
"language": "Java",
"forEducation": false,
"forkedFromId": null,
"mirrorUrl": "example.git",
"mirrorType": "PULL",
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "http://gitflic.ru/project/example/example.git",
"sshTransportUrl": "git@gitflic.ru:example/example.git",
"topics": [
"gitflic"
],
"mirror": true,
"private": true
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Create Project Fork
POST /project/{ownerAlias}/{projectAlias}/create-fork
Request creates a fork of the project and returns information about it
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Request
Supported JSON format
POST request body structure:
| Parameter | Description |
|---|---|
title |
Project title |
description |
Description, optional parameter |
isPrivate |
Private project or not. Accepts true or false |
alias |
Project alias |
ownerAlias |
Project owner alias |
ownerAliasType |
Project owner type. Accepts USER, TEAM or COMPANY |
language |
Programming language |
{
"title": "fork",
"description": "fork description",
"isPrivate": true,
"alias": "fork",
"ownerAlias": "user",
"ownerAliasType": "USER",
"language": "java",
}
Responses
STATUS 200 - example JSON:
Response example
{
"id": "4ad463df-aaaa-aaaa-aaaa-137d65545fa3",
"title": "fork",
"description": "fork description",
"alias": "fork",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": null,
"owner": {
"alias": "user,
"type": "USER"
},
"language": "Java",
"forEducation": false,
"forkedFromId": "38ee2d74-aaaa-aaaa-aaaa-291aec22db4e"
"mirrorUrl": null,
"mirrorType": null,
"allowedMemory": "4GB",
"forkUrl": http://gitflic.ru/project/example/example.git,
"httpTransportUrl": "http://gitflic.ru/project/user/fork.git",
"sshTransportUrl": "git@gitflic.ru:user/fork.git",
"topics": [],
"mirror": true,
"private": true
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get Allowed Owners When Creating Project
GET /project/allowed-owners
Request returns a list of possible owners for which the current user can create a project
Responses
This request returns a unique object consisting of three arrays:
Set "companySet":
| Response Parameters | Type | Description |
|---|---|---|
id |
String | Company UUID |
alias |
String | Company alias |
uuid |
String | Company UUID |
title |
String | Company name |
description |
String | Company description |
url |
String | Company website link |
contactPhone |
String | Company phone |
contactEmail |
String | Company email |
ownerAlias |
String | Company owner alias |
avatar |
String | Company avatar link |
private |
Boolean | Company is private true or public false |
selectorTitle |
String | Company name in project owner selection selector |
selectorId |
String | Project owner selection selector UUID |
selectorAlias |
String | Project owner selection selector alias |
selectorColor |
String | Project owner selection selector color |
selectorHash |
String | Project owner selection selector hash |
hexColor |
String | Project owner selection selector color code in HEX format |
selectorOwnerAlias |
String | Project owner selection selector owner alias |
isDeleted |
Boolean | Company is deleted true or not false |
links |
Deprecated | Deprecated parameter. Returns empty array by default |
Set "teamSet":
| Response Parameters | Type | Description |
|---|---|---|
id |
String | Team UUID |
alias |
String | Team alias |
title |
String | Team name |
description |
String | Team description |
isPrivate |
Boolean | Team is private true or public false |
ownerAlias |
String | Team owner alias |
avatar |
String | Team avatar link |
selectorTitle |
String | Team name in project owner selection selector |
selectorOwnerAlias |
String | Project owner selection selector owner alias |
selectorId |
String | Project owner selection selector UUID |
selectorAlias |
String | Project owner selection selector alias |
selectorColor |
String | Project owner selection selector color |
selectorHash |
String | Project owner selection selector hash |
hexColor |
String | Project owner selection selector color code in HEX format |
isDeleted |
Boolean | Team is deleted true or not false |
links |
Deprecated | Deprecated parameter. Returns empty array by default |
Set "user":
| Response Parameters | Type | Description |
|---|---|---|
id |
String | Owner UUID |
username |
String | User alias |
name |
String | User name |
surname |
String | User surname |
fullName |
String | User full name |
avatar |
String | Avatar link |
links |
Deprecated | Deprecated parameter. Returns empty array by default |
STATUS 200 - example JSON:
Response example
{
"companySet": [
{
"id": "43f8bb0e-aaaa-aaaa-aaaa-b421e0782626",
"alias": "example-company",
"uuid": "43f8bb0e-aaaa-aaaa-aaaa-b421e0782626",
"title": "example-company",
"description": "example description",
"url": "https://example.ru",
"contactPhone": "+79999999999",
"contactEmail": "example@email.ru",
"ownerAlias": "adminuser",
"avatar": "http://localhost:8079/upload/img/1e528f78-aaaa-aaaa-aaaa-fe65b5a4b59a.png",
"private": true,
"selectorTitle": "example-company",
"selectorId": "43f8bb0e-aaaa-aaaa-aaaa-b421e0782626",
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
"hexColor": null,
"selectorOwnerAlias": null,
"isDeleted": false,
"links": []
}
],
"teamSet": [
{
"id": "41f9c3fa-aaaa-aaaa-aaaa-ed615d6548dd",
"alias": "example-team",
"title": "example-team",
"description": "example description",
"isPrivate": true,
"ownerAlias": "adminuser",
"avatar": "http://localhost:8079/upload/img/a187f9f0-aaaa-aaaa-aaaa-748c0ac84648.png",
"selectorTitle": "example-team",
"selectorOwnerAlias": "adminuser",
"selectorId": "41f9c3fa-aaaa-aaaa-aaaa-ed615d6548dd",
"selectorAlias": null,
"selectorColor": null,
"selectorHash": null,
"hexColor": null,
"isDeleted": false,
"links": []
}
],
"user": {
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"username": "adminuser",
"name": "Admin user",
"surname": null,
"fullName": "Admin user",
"avatar": null,
"links": []
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
General Project Methods
Get Project Files Information
GET /project/{ownerAlias}/{projectAlias}/files?filepath={filepath}&branch={branchName}
Request returns an array of project files, with configurable number of displayed objects per page
| Path/Query Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
filepath |
String | Optional parameter. Additional file path |
branch |
String | Optional parameter. Branch name |
Responses
STATUS 200 - example JSON:
Response example
{
"path": "README.md",
"baseName": "README",
"filename": "README.md",
"isTree": false,
"lastCommitSha": null,
"lastCommit": null,
"timeDifference": null,
"tree": false
},
{
"path": "folder",
"baseName": "folder",
"filename": "folder",
"isTree": true,
"lastCommitSha": null,
"lastCommit": null,
"timeDifference": null,
"tree": true
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get Project Followers Information
GET /project/{ownerAlias}/{projectAlias}/followers
Request returns an array of project followers, with configurable number of displayed objects per page
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Responses
STATUS 200 - example JSON:
Response example
{
"_embedded": {
"userList": [
{
"id": "67248766-aaaa-aaaa-aaaa-624a59869252",
"username": "test",
"name": "testname",
"surname": "testSURNAME",
"fullName": "testname testSURNAME",
"avatar": "https://gitflic.ru/upload/img/6ce797dd-aaaa-aaaa-aaaa-37a55d6c8057.jpg",
"cover": null
},
{
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"username": "superuser",
"name": "Василий",
"surname": "Сметанин",
"fullName": "Василий Сметанин",
"avatar": "https://gitflic.ru/static/image/avatar.jpg",
"cover": null
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get Information About Users Who Starred the Project
GET /project/{ownerAlias}/{projectAlias}/stars
Request returns an array of users who added the project to favorites, with configurable number of displayed objects per page
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Responses
STATUS 200 - example JSON:
Response example
{
"_embedded": {
"userList": [
{
"id": "67248766-aaaa-aaaa-aaaa-624a59869252",
"username": "test",
"name": "testname",
"surname": "testSURNAME",
"fullName": "testname testSURNAME",
"avatar": "https://gitflic.ru/upload/img/6ce797dd-aaaa-aaaa-aaaa-37a55d6c8057.jpg",
"cover": null
}
]
},
"page": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Run Custom Script
POST /project{ownerAlias}/{projectAlias}/script/{scriptUuid}
Request executes a custom script with the specified UUID
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
scriptUuid |
String | Script UUID to execute |
Responses
STATUS 200 - example JSON:
Description of JSON object structure describing custom script
| Parameter | Type | Description |
|---|---|---|
executionUuid |
String | Execution result UUID |
scriptUuid |
String | Custom script UUID |
triggerType |
String | Trigger type. Always returns REQUEST |
triggerName |
String | Trigger name. Always returns rest-api |
triggeringUserUuid |
String | UUID of user who triggered the script |
executionStartTimestamp |
Long | Script execution start time |
executionEndTimestamp |
Long | Script execution end time |
queueAppendTimestamp |
Long | Time added to execution queue |
result |
String | Execution result. Possible values: SUCCESS - successful execution, RUNTIME_ERROR - runtime error, TIME_EXCEEDED - execution time exceeded and UNKNOWN_ERROR - unknown error |
returnedValue |
String | Returned value |
Response example
{
"executionUuid": "f88973b1-aaaa-aaaa-aaaa-ced340466db6",
"scriptUuid": "1c8722cf-aaaa-aaaa-aaaa-3ea880353a75",
"triggerType": "REQUEST",
"triggerName": "rest-api",
"triggeringUserUuid": "44f4d17d-aaaa-aaaa-aaaa-805754a16fba",
"executionStartTimestamp": 1729511625673,
"executionEndTimestamp": 1729511626052,
"queueAppendTimestamp": 1729511625673,
"result": "SUCCESS",
"returnedValue": null
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Project Settings Methods
These methods are available only to users with role not lower than Administrator
Update Project Information
PUT /project/{ownerAlias}/{projectAlias}/setting/change-setting
Request changes information about the project and returns it
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Request
Supported JSON format
PUT request body structure:
| Parameter | Type | Description |
|---|---|---|
title |
String | Project title |
description |
String | Project description |
language |
String | Programming language |
topics |
Set (String) | Array with project topics |
Responses
STATUS 200 - example JSON:
Response example
{
"id": "c94aedd2-aaaa-aaaa-aaaa-67fbf1112a82",
"title": "project",
"description": "description",
"alias": "project",
"defaultBranch": "master",
"workBranch": "master",
"siteUrl": "https://gitflic.ru",
"owner": {
"alias": "adminuser",
"type": "USER"
},
"language": "Markdown",
"forEducation": false,
"forkedFromId": null,
"mirrorUrl": null,
"mirrorType": null,
"allowedMemory": "4GB",
"forkUrl": null,
"httpTransportUrl": "https://gitflic.ru/project/adminuser/project.git",
"sshTransportUrl": "git@gitflic.ru:adminuser/project.git",
"defaultIssueStatus": null,
"topics": [
"docs",
"gitflic"
],
"private": true,
"mirror": false
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get Project Size
GET /project/{projectUuid}/project-size
Request returns the size of categories, as well as the full storage size of the project
Responses
This request returns a unique set of parameters:
| Response Parameters | Type | Description |
|---|---|---|
readableDirectorySize |
String | Git repository size |
readableLfsFilesSize |
String | Large file storage size |
readableRegistryFilesSize |
String | Package registry files size |
readableReleaseFilesSize |
String | Release files size |
readableArtifactFilesSize |
String | Artifact files size |
readableFilledSpace |
String | Total occupied storage size |
STATUS 200 - example JSON:
Response example
{
"readableDirectorySize": "3,4MB",
"readableLfsFilesSize": 103,3MB",
"readableRegistryFilesSize": "1,7MB",
"readableReleaseFilesSize": "83,3MB",
"readableArtifactFilesSize": "13,2MB",
"readableFilledSpace": "204,9MB"
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Create Deployment Token
POST /project/{ownerAlias}/{projectAlias}/setting/deploy-token/create
Request creates a deployment token with the specified set of permissions
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Project owner alias |
projectAlias |
String | Project alias |
Request
Supported JSON format
POST request body structure:
| Parameter | Description |
|---|---|
expiresAt |
Token expiration date |
title |
Token name |
scopes |
Array with permissions: REPOSITORY_READ - Pull repository, REPOSITORY_WRITE - Push repository |
{
"expiresAt" : "2030-01-01",
"title" : "Token via API",
"scopes" : [
"REPOSITORY_READ",
"REPOSITORY_WRITE"
]
}
Responses
STATUS 200 - example JSON:
Description of JSON object structure describing deployment token
| Parameter | Type | Description |
|---|---|---|
token |
String | Deployment token |
tokenUuid |
String | Deployment token UUID |
expiresAt |
ZonedDateTime | Token expiration date |
title |
String | Token name |
scopes |
List |
Array with permissions: REPOSITORY_READ - Pull repository, REPOSITORY_WRITE - Push repository |
Response example
{
"token": "d36f5ae4-aaaa-aaaa-aaaa-5de5aae3dc3f",
"tokenUuid": "b1f23eb4-aaaa-aaaa-aaaa-2f04e8564855",
"expiresAt": "2025-01-01T00:00:00",
"title": "Token via API",
"scopes": [
"REPOSITORY_READ",
"REPOSITORY_WRITE"
]
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Project Access Management Methods
Add User to Project
POST /project/{projectUuid}/member/invite
Request adds a user to the project with the specified role
| Path Variable | Type | Description |
|---|---|---|
projectUuid |
String | UUID of project to which user needs to be added |
Request
Supported JSON format
POST request body structure:
| Parameter | Description |
|---|---|
userAlias |
Alias of user to be added to project |
role |
Role with which user will be added. Possible values: GUEST - guest, REPORTER - reporter, DEVELOPER - developer, ADMIN - administrator and OWNER - owner |
{
"userAlias" : "user",
"role" : "OWNER"
}
Responses
STATUS 200 - User has been invited to the project.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Get Project Users List
GET /project/{projectUuid}/member?q={userName}
Request returns a list of project participants, with configurable number of displayed objects per page
| Path/Query Variable | Type | Description |
|---|---|---|
projectUuid |
String | UUID of project from which to get user list |
q |
String | Optional parameter. User name for search |
Responses
STATUS 200 - Successfully returned list of project participants.
Response example
{
"_embedded": {
"userList": [
{
"id": "67248766-aaaa-aaaa-aaaa-624a59869252",
"username": "test",
"name": "testname",
"surname": "testSURNAME",
"fullName": "testname testSURNAME",
"avatar": "https://gitflic.ru/upload/img/6ce797dd-aaaa-aaaa-aaaa-37a55d6c8057.jpg",
"cover": null
},
{
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"username": "superuser",
"name": "Василий",
"surname": "Сметанин",
"fullName": "Василий Сметанин",
"avatar": "https://gitflic.ru/static/image/avatar.jpg",
"cover": null
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Change User Role in Project
PUT /project/{projectUuid}/member/role
Request changes user role in the project
| Path Variable | Type | Description |
|---|---|---|
projectUuid |
String | UUID of project in which to change user role |
Request
Supported JSON format
PUT request body structure:
| Parameter | Description |
|---|---|
userAlias |
Alias of user whose role will be changed in project |
role |
New project participant role. Possible values: GUEST - guest, REPORTER - reporter, DEVELOPER - developer, ADMIN - administrator and OWNER - owner |
{
"userAlias" : "user",
"role" : "OWNER"
}
Responses
STATUS 200 - User role changed.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Remove User from Project
DELETE /project/{projectUuid}/member/{userAlias}
Request removes user from the project
| Path Variable | Type | Description |
|---|---|---|
projectUuid |
String | UUID of project from which to remove user |
userAlias |
String | Alias of user to remove from project |
Responses
STATUS 200 - User removed from project.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Add Team to Project
POST /project/{projectUuid}/member/team/invite
Request adds a team to the project with the specified role
| Path Variable | Type | Description |
|---|---|---|
projectUuid |
String | UUID of project to which team needs to be added |
Request
Supported JSON format
POST request body structure:
| Parameter | Description |
|---|---|
teamAlias |
Alias of team to be added to project |
maxRole |
Role with which team will be added. Possible values: GUEST - guest, REPORTER - reporter, DEVELOPER - developer and ADMIN - administrator |
{
"teamAlias" : "team",
"maxRole" : "DEVELOPER"
}
Responses
STATUS 200 - Team added to project.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Change Team Role in Project
PUT /project/{projectUuid}/member/team/role
Request changes team role in the project
| Path Variable | Type | Description |
|---|---|---|
projectUuid |
String | UUID of project in which to change team role |
Request
Supported JSON format
PUT request body structure:
| Parameter | Description |
|---|---|
teamAlias |
Alias of team whose role will be changed in project |
maxRole |
New team project role. Possible values: GUEST - guest, REPORTER - reporter, DEVELOPER - developer and ADMIN - administrator |
{
"teamAlias" : "team",
"maxRole" : "GUEST"
}
Responses
STATUS 200 - Team role changed.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Remove Team from Project
DELETE /project/{projectUuid}/member/team/{teamAlias}
Request removes team from the project
| Path Variable | Type | Description |
|---|---|---|
projectUuid |
String | UUID of project from which to remove team |
teamAlias |
String | Alias of team to remove from project |
Responses
STATUS 200 - Team removed from project.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Methods for Project Attached Files
Files attached to the project are available for attaching to issues.
Get List of Files Attached to Project
GET /project/{ownerAlias}/{projectAlias}/upload-files
Request returns a list of files attached to the project.
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Owner alias of project whose attached files will be returned |
projectAlias |
String | Project alias whose attached files will be returned |
Responses
STATUS 200 - Successfully returned list of files attached to project
Response example
{
"_embedded": {
"restProjectUploadFileModelList": [
{
"uploadFileUuid": "8be8f27c-aaaa-aaaa-aaaa-1024dd2f5d80",
"filePath": "project/1b/1b7f0fca-aaaa-aaaa-aaaa-140978fab4e2/attachment/45b0f1a4-aaaa-aaaa-aaaa-86a0c3ae8e3d/gitflic.jar",
"webFilePath": "/upload/-/project/1b7f0fca-aaaa-aaaa-aaaa-140978fab4e2/attachment/45b0f1a4-aaaa-aaaa-aaaa-86a0c3ae8e3d/gitflic.jar",
"fileName": "gitflic.jar",
"fileSize": "400MB",
"uploadDate": "2025-01-01T12:00:00.000000"
},
{
"uploadFileUuid": "0cfc3414-aaaa-aaaa-aaaa-03faa70b5639",
"filePath": "project/1b/1b7f0fca-aaaa-aaaa-aaaa-140978fab4e2/attachment/8a216b75-aaaa-aaaa-aaaa-dfb573a770d3/error.log",
"webFilePath": "/upload/-/project/1b7f0fca-aaaa-aaaa-aaaa-140978fab4e2/attachment/8a216b75-aaaa-aaaa-aaaa-dfb573a770d3/error.log",
"fileName": "error.log",
"fileSize": "150KB",
"uploadDate": "2025-01-01T12:00:00.000000"
}
]
},
"page": {
"size": 10,
"totalElements": 2,
"totalPages": 1,
"number": 0
}
}
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Attach File to Project
POST /project/{ownerAlias}/{projectAlias}/upload
Request attaches a file to the project and returns it.
For gitflic.ru there is a limit of 10 MB.
| Path Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Owner alias of project to which file will be attached |
projectAlias |
String | Project alias to which file will be attached |
Request
Supported format: multipart/form-data
| Key | Type |
|---|---|
attachment |
file |
Responses
STATUS 200 - File successfully attached to project and returned.
Response example
{
"uploadFileUuid": "0cfc3414-aaaa-aaaa-aaaa-03faa70b5639",
"filePath": "project/1b/1b7f0fca-aaaa-aaaa-aaaa-140978fab4e2/attachment/8a216b75-aaaa-aaaa-aaaa-dfb573a770d3/error.log",
"webFilePath": "/upload/-/project/1b7f0fca-aaaa-aaaa-aaaa-140978fab4e2/attachment/8a216b75-aaaa-aaaa-aaaa-dfb573a770d3/error.log",
"fileName": "error.log",
"fileSize": "150KB",
"uploadDate": "2025-01-01T12:00:00.000000"
}
STATUS 400 - Selected file is too large.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
STATUS 413 - The file cannot be loaded if less than 10 percent of the project memory is free.
Delete File Attached to Project
DELETE /project/{ownerAlias}/{projectAlias}/delete-file?uploadFileUuid={fileUuid}
Request deletes a file attached to the project.
| Path/Query Variable | Type | Description |
|---|---|---|
ownerAlias |
String | Owner alias of project in which file will be deleted |
projectAlias |
String | Project alias in which file will be deleted |
fileUuid |
String | UUID of file to delete |
Responses
STATUS 200 - File attached to project successfully deleted
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Delete Project
DELETE /project/{projectUuid}/delete
Request deletes a project.
| Path Variable | Type | Description |
|---|---|---|
projectUuid |
String | UUID of project to delete |
Responses
STATUS 200 - Project deleted.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Automated translation!
This page was translated using automatic translation tools. The text may contain inaccuracies.