Create a project for a user
Creates a project for a user. Administrators only.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The ID of a user
Example
1Request Body required
Section titled “ Request Body required ”object
The name of the project
Example
New ProjectThe path of the repository
Example
new_projectThe default branch of the project
Example
mainThe description of the project
The Git strategy. Defaults to fetch
Build timeout
Auto-cancel pending pipelines
The path to CI config file. Defaults to .gitlab-ci.yml
Disable or enable the service desk
Flag indication if the issue tracker is enabled
Flag indication if merge requests are enabled
Flag indication if the wiki is enabled
Flag indication if jobs are enabled
Flag indication if snippets are enabled
Issues access level. One of disabled, private or enabled
Repository access level. One of disabled, private or enabled
Merge requests access level. One of disabled, private or enabled
Forks access level. One of disabled, private or enabled
Wiki access level. One of disabled, private or enabled
Builds access level. One of disabled, private or enabled
Snippets access level. One of disabled, private or enabled
Controls visibility of the package registry. One of disabled, private, enabled or public. private will make the package registry accessible only to project members (reporter role and above). enabled will make the package registry accessible to everyone who has access to the project. public will make the package registry accessible to everyone. disabled will disable the package registry
Pages access level. One of disabled, private, enabled or public
Analytics access level. One of disabled, private or enabled
Controls visibility of the container registry. One of disabled, private or enabled. private will make the container registry accessible only to project members (reporter role and above). enabled will make the container registry accessible to everyone who has access to the project. disabled will disable the container registry
Security and compliance access level. One of disabled, private or enabled
Releases access level. One of disabled, private or enabled
Environments access level. One of disabled, private or enabled
Feature flags access level. One of disabled, private or enabled
Infrastructure access level. One of disabled, private or enabled
Monitor access level. One of disabled, private or enabled
Model experiments access level. One of disabled, private or enabled
Model registry access level. One of disabled, private or enabled
Deprecated: Use emails_enabled instead.
Enable email notifications
Show default award emojis
Include the code diff preview in merge request notification emails
Warn about potentially unwanted characters
Enforce auth check on uploads
Flag indication if shared runners are enabled for that project
Flag indication if group runners are enabled for that project
The process mode of the resource group
Automatically resolve merge request diff threads on lines changed with a push
Remove the source branch by default after merge
Deprecated: Use :package_registry_access_level instead. Enable project packages feature
Deprecated: Use :container_registry_access_level instead. Flag indication if the container registry is enabled for that project
Object that contains information on the container expiration policy
object
Container expiration policy cadence for recurring job
Container expiration policy number of images to keep
Container expiration policy remove images older than value
Container expiration policy regex for image removal
Container expiration policy regex for image retention
Flag indication if container expiration policy is enabled
Flag indication if Git LFS is enabled for that project
The visibility of the project.
Deprecated: Use public_jobs instead.
Perform public builds
Allow users to request member access
Only allow to merge if builds succeed
Allow to merge if pipeline is skipped
Only allow to merge if all threads are resolved
Deprecated: Use :topics instead
The list of topics for a project
Avatar image for project
Show link to create/view merge request when pushing from the command line
The merge method used when merging merge requests
The commit message used to apply merge request suggestions
Template used to create merge commit message
Template used to create squash commit message
Template used to create a branch from an issue
Flag indication if Auto DevOps is enabled
Auto Deploy strategy
Flag indication if referenced issues auto-closing is enabled
Which storage shard the repository is on. Available only to admins
Squash default for project. One of never, always, default_on, or default_off.
Merge requests of this forked project targets itself by default
Template used to generate the default merge request title. Maximum 100 characters.
Blocks merge requests from merging unless all status checks have passed
How many approvers should approve merge request by default
[Deprecated] Enables pull mirroring in a project
[Deprecated] Pull mirroring triggers builds
The classification label for the project
Requirements feature access level. One of disabled, private or enabled
Require an associated issue from Jira
Enable automatic reviews by GitLab Duo on merge requests
Enable GitLab Duo remote flows for this project
Enable GitLab Duo SAST false positive detection for this project
Enable GitLab Duo Secret Detection false positive detection for this project
Turn on Agentic Breaking Change Resolution for this project
Enable GitLab Duo SAST vulnerability resolution workflow for this project
Grant read-only access to security policy configurations for enforcement in linked CI/CD projects
The regex the Merge Request must adhere to
The description for the regex the Merge Request must adhere to
The object format of the project repository
Initialize a project with a README.md
Use custom template
Group ID that serves as the template source
Namespace ID for the new project. Default to the user namespace.
URL from which the project is imported
Name of template from which to create project
Project ID of template from which to create project
Responses
Section titled “ Responses ”Created
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The spp_repository_pipeline_access setting is only visible if the security_orchestration_policies feature is available.
Require all security policy pipelines to succeed before merge requests can be merged.
Example
{ "id": 1, "description": "desc", "name": "project1", "name_with_namespace": "John Doe / project1", "path": "project1", "path_with_namespace": "namespace1/project1", "created_at": "2020-05-07T04:27:17.016Z", "default_branch": "main", "tag_list": [ "tag" ], "topics": [ "topic" ], "ssh_url_to_repo": "git@gitlab.example.com:gitlab/gitlab.git", "http_url_to_repo": "https://gitlab.example.com/gitlab/gitlab.git", "web_url": "https://gitlab.example.com/gitlab/gitlab", "readme_url": "https://gitlab.example.com/gitlab/gitlab/blob/master/README.md", "forks_count": 1, "license_url": "https://gitlab.example.com/gitlab/gitlab/blob/master/LICENCE", "license": { "key": "gpl-3.0", "name": "GNU General Public License v3.0", "nickname": "GNU GPLv3", "html_url": "http://choosealicense.com/licenses/gpl-3.0" }, "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", "star_count": 1, "last_activity_at": "2013-09-30T13:46:02Z", "visibility": "public", "namespace": { "id": 2, "name": "project", "path": "my_project", "kind": "project", "full_path": "group/my_project", "parent_id": 1, "avatar_url": "https://example.com/avatar/12345", "web_url": "https://example.com/group/my_project" }, "custom_attributes": { "key": "foo", "value": "bar" }, "repository_storage": "default", "forked_from_project": { "id": 1, "description": "desc", "name": "project1", "name_with_namespace": "John Doe / project1", "path": "project1", "path_with_namespace": "namespace1/project1", "created_at": "2020-05-07T04:27:17.016Z", "default_branch": "main", "tag_list": [ "tag" ], "topics": [ "topic" ], "ssh_url_to_repo": "git@gitlab.example.com:gitlab/gitlab.git", "http_url_to_repo": "https://gitlab.example.com/gitlab/gitlab.git", "web_url": "https://gitlab.example.com/gitlab/gitlab", "readme_url": "https://gitlab.example.com/gitlab/gitlab/blob/master/README.md", "forks_count": 1, "license_url": "https://gitlab.example.com/gitlab/gitlab/blob/master/LICENCE", "license": { "key": "gpl-3.0", "name": "GNU General Public License v3.0", "nickname": "GNU GPLv3", "html_url": "http://choosealicense.com/licenses/gpl-3.0" }, "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", "star_count": 1, "last_activity_at": "2013-09-30T13:46:02Z", "visibility": "public", "namespace": { "id": 2, "name": "project", "path": "my_project", "kind": "project", "full_path": "group/my_project", "parent_id": 1, "avatar_url": "https://example.com/avatar/12345", "web_url": "https://example.com/group/my_project" }, "custom_attributes": { "key": "foo", "value": "bar" }, "repository_storage": "default" }, "container_registry_image_prefix": "registry.gitlab.example.com/gitlab/gitlab-client", "marked_for_deletion_at": "2020-05-07T04:27:17.016Z", "marked_for_deletion_on": "2020-05-07T04:27:17.016Z", "owner": { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" }, "repository_object_format": "sha1", "service_desk_address": "address@example.com", "issues_access_level": "enabled", "repository_access_level": "enabled", "merge_requests_access_level": "enabled", "forking_access_level": "enabled", "wiki_access_level": "enabled", "builds_access_level": "enabled", "snippets_access_level": "enabled", "pages_access_level": "enabled", "analytics_access_level": "enabled", "container_registry_access_level": "enabled", "security_and_compliance_access_level": "enabled", "releases_access_level": "enabled", "environments_access_level": "enabled", "feature_flags_access_level": "enabled", "infrastructure_access_level": "enabled", "monitor_access_level": "enabled", "model_experiments_access_level": "enabled", "model_registry_access_level": "enabled", "package_registry_access_level": "enabled", "creator_id": 1, "import_url": "https://gitlab.com/gitlab/gitlab.git", "import_type": "git", "import_status": "none", "import_error": "Import error", "open_issues_count": 1, "updated_at": "2020-05-07T04:27:17.016Z", "ci_default_git_depth": 20, "ci_delete_pipelines_in_seconds": 86400, "build_git_strategy": "fetch", "runner_token_expiration_interval": 3600, "resource_group_default_process_mode": "unordered", "auto_cancel_pending_pipelines": "enabled", "build_timeout": 3600, "auto_devops_deploy_strategy": "continuous", "runners_token": "b8547b1dc37721d05889db52fa2f02", "ci_config_path": "", "merge_method": "merge", "squash_option": "default_off", "suggestion_commit_message": "Suggestion message", "merge_commit_template": "%(title)", "squash_commit_template": "%(source_branch)", "mr_default_title_template": "%(source_branch)", "issue_branch_template": "%(title)", "statistics": { "commit_count": 37, "storage_size": 1038090, "repository_size": 1038090, "wiki_size": 0, "lfs_objects_size": 0, "job_artifacts_size": 0, "pipeline_artifacts_size": 0, "packages_size": 0, "snippets_size": 0, "uploads_size": 0, "container_registry_size": 0 }, "reviewer_assignment_strategy": "code_owners", "merge_request_title_regex": "/Title of merge request/", "merge_request_title_regex_description": "This requires the title to include a Jira label"}Bad request
Unauthenticated
Not found