Projects
Description of the JSON object structure describing a project
| Field | Type | Description | 
|---|---|---|
| id | String | Unique project ID | 
| title | String | Project name | 
| description | String | Project description | 
| alias | String | Project alias | 
| defaultBranch | String | Default project branch | 
| workBranch | String | Working project branch | 
| siteUrl | String | Project website | 
| owner | Object | Project owner, structure description | 
| language | String | Project language | 
| forEducation | Boolean | Educational project trueor regularfalse | 
| 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: PULLandPUSH | 
| allowedMemory | String | Allowed memory for the project | 
| forkUrl | String | URL of the project from which the fork was made | 
| httpTransportUrl | String | HTTPS clone link for the project | 
| sshTransportUrl | String | SSH clone link for the project | 
| topics | Set (String) | Array containing project topics | 
| mirror | Boolean | Project is a mirror trueor notfalse | 
| private | Boolean | Project is private trueor publicfalse | 
Description of the JSON object structure describing the project owner
| Field | Type | Description | 
|---|---|---|
| alias | String | Owner alias | 
| type | String | Owner type. Possible values: USER,TEAM, andCOMPANY | 
Method to get the list of projects
GET /project?q={title}
The request returns an array of public projects, with the ability to configure the number of objects displayed per page
| Query Path Variable | Type | Description | 
|---|---|---|
| q | String | Optional parameter. Project name | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "_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.
Method to get a project by alias
GET /project/{ownerAlias}/{projectAlias}
The request returns the project with the specified alias
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "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.
Method to get a project by uuid
GET /project/{projectUuid}
The request returns the project with the specified UUID
| Query Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project ID | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "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.
Method to get the list of active user's projects
GET /project/my?q={title}
The request returns an array of the active user's projects, with the ability to configure the number of objects displayed per page
| Query Path Variable | Type | Description | 
|---|---|---|
| q | String | Optional parameter. Project name | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "_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.
Method to get the list of projects with user participation
GET /project/shared?q={title}
The request returns an array of projects with user participation, with the ability to configure the number of objects displayed per page
| Query Path Variable | Type | Description | 
|---|---|---|
| q | String | Optional parameter. Project name | 
Responses
Example response
    
{
    "_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.
Method to get the list of project forks
GET /project/{ownerAlias}/{projectAlias}/forked
The request returns an array of public forks of the project, with the ability to configure the number of objects displayed per page
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "_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.
Method to get information about project files
GET /project/{ownerAlias}/{projectAlias}/files?filepath={filepath}&branch={branchName}
The request returns an array of project files, with the ability to configure the number of objects displayed per page
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
| filepath | String | Optional parameter. Additional file path | 
| branch | String | Optional parameter. Branch name | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "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.
Method to get information about project followers
GET /project/{ownerAlias}/{projectAlias}/followers
The request returns an array of project followers, with the ability to configure the number of objects displayed per page
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "_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": "Vasiliy",
                "surname": "Smetanin",
                "fullName": "Vasiliy Smetanin",
                "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.
Method to get information about users who starred the project
GET /project/{ownerAlias}/{projectAlias}/stars
The request returns an array of users who added the project to favorites, with the ability to configure the number of objects displayed per page
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "_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.
Method to get project size
GET /project/{projectUuid}/project-size
The request returns the size of categories, as well as the total size of the project storage
Responses
This request returns a unique set of parameters:
| Response Parameter | 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 - JSON example:
Example response
    
{
    "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.
Method to get possible owners when creating a project
GET /project/allowed-owners
The request returns a list of possible owners for whom the current user can create a project
Responses
This request returns a unique object consisting of three arrays:
Set "companySet":
| Response Parameter | 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 trueor publicfalse | 
| selectorTitle | String | Company name in owner selector | 
| selectorId | String | Owner selector UUID | 
| selectorAlias | String | Owner selector alias | 
| selectorColor | String | Owner selector color | 
| selectorHash | String | Owner selector hash | 
| hexColor | String | Owner selector color code in HEX format | 
| selectorOwnerAlias | String | Owner selector owner alias | 
| isDeleted | Boolean | Company deleted trueor notfalse | 
| links | Deprecated | Deprecated parameter. Returns empty array by default | 
Set "teamSet":
| Response Parameter | Type | Description | 
|---|---|---|
| id | String | Team UUID | 
| alias | String | Team alias | 
| title | String | Team name | 
| description | String | Team description | 
| isPrivate | Boolean | Team is private trueor publicfalse | 
| ownerAlias | String | Team owner alias | 
| avatar | String | Team avatar link | 
| selectorTitle | String | Team name in owner selector | 
| selectorOwnerAlias | String | Owner selector owner alias | 
| selectorId | String | Owner selector UUID | 
| selectorAlias | String | Owner selector alias | 
| selectorColor | String | Owner selector color | 
| selectorHash | String | Owner selector hash | 
| hexColor | String | Owner selector color code in HEX format | 
| isDeleted | Boolean | Team deleted trueor notfalse | 
| links | Deprecated | Deprecated parameter. Returns empty array by default | 
Set "user":
| Response Parameter | 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 - JSON example:
Example response
    
{
    "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.
Method to create a project
POST /project
The request creates a project and returns its information
Request
Supported JSON format
POST request body structure:
| Parameter | Type | Description | 
|---|---|---|
| title | String | Project name | 
| isPrivate | Boolean | Private project or not. Accepts trueorfalse | 
| alias | String | Project alias | 
| ownerAlias | String | Owner alias | 
| ownerAliasType | String | Owner type. Accepts USER,TEAM, orCOMPANY | 
| language | String | Programming language | 
| description | String | Project description, optional field | 
Example JSON object
{
    "title": "my project",
    "isPrivate": "true",
    "alias": "example",
    "ownerAlias": "example-user",
    "ownerAliasType": "USER",
    "language": "java",
    "description": "description"
}
Responses
STATUS 200 - JSON example:
Example response
    
{
    "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.
Method to import a project
POST /project/import-base
The request imports a project and returns its information
Request
Supported JSON format
POST request body structure:
| Parameter | Type | Description | 
|---|---|---|
| title | String | Project name | 
| isPrivate | Boolean | Private project or not. Accepts trueorfalse | 
| alias | String | Project alias | 
| ownerAlias | String | Project owner alias | 
| ownerAliasType | String | Owner type. Accepts USER,TEAM, orCOMPANY | 
| language | String | Programming language | 
| gitSource | String | Link to the imported project | 
| login | String | Login. Required for importing a private project | 
| token | String | Token. Required for importing a private project | 
| description | String | Project description, optional field | 
Example JSON object
{
    "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 - JSON example:
Example response
    
{
    "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.
Method to create a mirror
POST /project/create-mirror
The request creates a project of type mirror and returns its information
Request
Supported JSON format
POST request body structure:
| Parameter | Description | 
|---|---|
| title | Team name | 
| description | Description, optional parameter | 
| isPrivate | Private project or not. Accepts trueorfalse | 
| alias | Project alias | 
| ownerAlias | Project owner alias | 
| ownerAliasType | Owner type. Accepts USER,TEAM, orCOMPANY | 
| language | Programming language | 
| gitSource | Git repository link | 
| mirrorType | Mirror type. Accepts PULLorPUSH | 
| login | Login. Required for access to a private project | 
| token | Token. Required for access to a private project | 
| refSpecs | RefSpec settings for mirroring specific branches or tags if available | 
{
    "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 - JSON example:
Example response
    
{
    "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.
Method to convert an existing project to a PUSH mirror
POST /project/{ownerAlias}/{projectAlias}/to-push-mirror
The request changes the project type to PUSH mirror and returns its information
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Request
Supported JSON format
POST request body structure:
| Parameter | Description | 
|---|---|
| source | Git repository link | 
| login | Login. Required for access to a private project | 
| token | Token. Required for access to a private project | 
| controlString | Control string. Format ownerAlias/projectAlias, whereownerAliasis the owner's alias, andprojectAliasis alias | 
{
    "source": "https://gitflic.ru/project/user/project.git",
    "login": "example",
    "token": "example",
    "controlString": "user/example"
}
Responses
STATUS 200 - JSON example:
Example response
    
    {
    "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.
Method to update a mirror
POST /project/{ownerAlias}/{projectAlias}/manual-update
The request updates the mirror and returns information about the project. This request is executed without additional information in the body.
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "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.
Method to create a project fork
POST /project/{ownerAlias}/{projectAlias}/create-fork
The request creates a fork of the project and returns its information
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Request
Supported JSON format
POST request body structure:
| Parameter | Description | 
|---|---|
| title | Project name | 
| description | Description, optional parameter | 
| isPrivate | Private project or not. Accepts trueorfalse | 
| alias | Project alias | 
| ownerAlias | Project owner alias | 
| ownerAliasType | Owner type. Accepts USER,TEAM, orCOMPANY | 
| language | Programming language | 
{
    "title": "fork",
    "description": "fork description",
    "isPrivate": true,
    "alias": "fork",
    "ownerAlias": "user",
    "ownerAliasType": "USER",
    "language": "java",
}
Responses
STATUS 200 - JSON example:
Example response
    
        {
        "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.
Method to update project information
PUT /project/{ownerAlias}/{projectAlias}/setting/change-setting
The request changes project information and returns it
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Request
Supported JSON format
PUT request body structure:
| Parameter | Type | Description | 
|---|---|---|
| title | String | Project name | 
| description | String | Project description | 
| language | String | Programming language | 
| topics | Set (String) | Array of project topics | 
Responses
STATUS 200 - JSON example:
Example response
    
{
    "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.
Method to create a deploy token
POST /project/{ownerAlias}/{projectAlias}/setting/deploy-token/create
The request creates a deploy token with the specified set of permissions
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
Request
Supported JSON format
POST request body structure:
| Parameter | Description | 
|---|---|
| expiresAt | Token expiration date | 
| title | Token name | 
| scopes | Array of 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 - JSON example:
Description of the JSON object structure describing the deploy token
| Parameter | Type | Description | 
|---|---|---|
| token | String | Deploy token | 
| tokenUuid | String | Deploy token UUID | 
| expiresAt | ZonedDateTime | Token expiration date | 
| title | String | Token name | 
| scopes | List | Array of permissions: REPOSITORY_READ- Pull repository,REPOSITORY_WRITE- Push repository | 
Example response
    
{
    "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.
Method to run a user script
POST /project{ownerAlias}/{projectAlias}/script/{scriptUuid}
The request runs a user script with the specified UUID
| Query Path Variable | Type | Description | 
|---|---|---|
| ownerAlias | String | Project owner's alias | 
| projectAlias | String | Project alias | 
| scriptUuid | String | Script UUID to run | 
Responses
STATUS 200 - JSON example:
Description of the JSON object structure describing the user script
| Parameter | Type | Description | 
|---|---|---|
| executionUuid | String | Execution result UUID | 
| scriptUuid | String | User script UUID | 
| triggerType | String | Trigger type. Always returns REQUEST | 
| triggerName | String | Trigger name. Always returns rest-api | 
| triggeringUserUuid | String | UUID of the user who ran 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,RUNTIME_ERROR- runtime error,TIME_EXCEEDED- timeout,UNKNOWN_ERROR- unknown error | 
| returnedValue | String | Returned value | 
Example response
    
{
    "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.
Method to add a user to a project
POST /project/{projectUuid}/member/invite
The request adds a user to a project with the specified role
| Query Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project UUID to add the user to | 
Request
Supported JSON format
POST request body structure:
| Parameter | Description | 
|---|---|
| userAlias | Alias of the user to be added to the project | 
| role | Role to add the user with. Possible values: GUEST- guest,REPORTER- reporter,DEVELOPER- developer,ADMIN- admin,OWNER- owner | 
{
    "userAlias" : "user",
    "role" : "OWNER"
}
Responses
STATUS 200 - Invitation sent to the user.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Method for Retrieving Project Users List
GET /project/{projectUuid}/member?q={userName}
The request returns a list of project members with configurable pagination settings.
| Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project UUID from which to retrieve the user list | 
| q | String | Optional parameter. Username to search for | 
Responses
STATUS 200 - Project members list successfully returned.
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": "Vasily",
                "surname": "Smetanin",
                "fullName": "Vasily Smetanin",
                "avatar": "https://gitflic.ru/static/image/avatar.jpg",
                "cover": null
            }
        ]
    },
    "page": {
        "size": 10,
        "totalElements": 2,
        "totalPages": 1,
        "number": 0
    }
}
    
  
STATUS 403 - Access denied.
STATUS 404 - Requested data not found.
Method to change a user's role in a project
PUT /project/{projectUuid}/member/role
The request changes the user's role in a project
| Query Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project UUID to change the user's role in | 
Request
Supported JSON format
PUT request body structure:
| Parameter | Description | 
|---|---|
| userAlias | Alias of the user whose role will be changed in the project | 
| role | New project member role. Possible values: GUEST- guest,REPORTER- reporter,DEVELOPER- developer,ADMIN- admin,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.
Method to remove a user from a project
DELETE /project/{projectUuid}/member/{userAlias}
The request removes a user from a project
| Query Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project UUID to remove the user from | 
| userAlias | String | Alias of the user to be removed from the project | 
Responses
STATUS 200 - User removed from the project.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Method to add a team to a project
POST /project/{projectUuid}/member/team/invite
The request adds a team to a project with the specified role
| Query Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project UUID to add the team to | 
Request
Supported JSON format
POST request body structure:
| Parameter | Description | 
|---|---|
| teamAlias | Alias of the team to be added to the project | 
| maxRole | Role to add the team with. Possible values: GUEST- guest,REPORTER- reporter,DEVELOPER- developer,ADMIN- admin | 
{
    "teamAlias" : "team",
    "maxRole" : "DEVELOPER"
}
Responses
STATUS 200 - Team added to the project.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Method to change a team's role in a project
PUT /project/{projectUuid}/member/team/role
The request changes the team's role in a project
| Query Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project UUID to change the team's role in | 
Request
Supported JSON format
PUT request body structure:
| Parameter | Description | 
|---|---|
| teamAlias | Alias of the team whose role will be changed in the project | 
| maxRole | New project team role. Possible values: GUEST- guest,REPORTER- reporter,DEVELOPER- developer,ADMIN- admin | 
{
    "teamAlias" : "team",
    "maxRole" : "GUEST"
}
Responses
STATUS 200 - Team role changed.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Method to remove a team from a project
DELETE /project/{projectUuid}/member/team/{teamAlias}
The request removes a team from a project
| Query Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project UUID to remove the team from | 
| teamAlias | String | Alias of the team to be removed from the project | 
Responses
STATUS 200 - Team removed from the project.
STATUS 403 - No access rights.
STATUS 404 - No data found for the request.
Method to delete a project
DELETE /project/{projectUuid}/delete
The request deletes a project
| Query Path Variable | Type | Description | 
|---|---|---|
| projectUuid | String | Project UUID 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.