애플리케이션 설정 API

Tier: Free, Premium, Ultimate Offering: Self-managed, GitLab Dedicated

이 API 호출을 통해 GitLab 인스턴스의 /admin/application_settings/general에 표시된대로 애플리케이션 설정을 읽고 수정할 수 있습니다. 이 작업을 수행하려면 관리자여야 합니다.

애플리케이션 설정은 캐싱되어 즉시 적용되지 않을 수 있습니다. 기본적으로 GitLab은 애플리케이션 설정을 60초 동안 캐시합니다. 인스턴스의 애플리케이션 설정 캐시를 제어하는 방법에 대한 정보는 애플리케이션 캐시 간격을 참조하십시오.

현재 애플리케이션 설정 가져오기

History
  • always_perform_delayed_deletion 피처 플래그는 GitLab 15.11에서 활성화되었습니다.
  • delayed_project_deletiondelayed_group_deletion 속성은 GitLab 16.0에서 제거되었습니다.
  • in_product_marketing_emails_enabled 속성은 GitLab 16.6에서 제거되었습니다.
  • repository_storages 속성은 GitLab 16.6에서 제거되었습니다.
  • user_email_lookup_limit 속성은 GitLab 16.7에서 제거되었습니다.

GitLab 인스턴스의 현재 애플리케이션 설정을 나열합니다.

GET /application/settings
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/application/settings"

예시 응답:

{
  "default_projects_limit" : 100000,
  "signup_enabled" : true,
  "id" : 1,
  "default_branch_protection" : 2,
  "default_preferred_language" : "en",
  "failed_login_attempts_unlock_period_in_minutes": 30,
  "restricted_visibility_levels" : [],
  "password_authentication_enabled_for_web" : true,
  "after_sign_out_path" : null,
  "max_attachment_size" : 10,
  "max_decompressed_archive_size": 25600,
  "max_export_size": 50,
  "max_import_size": 50,
  "max_import_remote_file_size": 10240,
  "max_login_attempts": 3,
  "user_oauth_applications" : true,
  "updated_at" : "2016-01-04T15:44:55.176Z",
  "session_expire_delay" : 10080,
  "home_page_url" : null,
  "default_snippet_visibility" : "private",
  "outbound_local_requests_whitelist": [],
  "domain_allowlist" : [],
  "domain_denylist_enabled" : false,
  "domain_denylist" : [],
  "created_at" : "2016-01-04T15:44:55.176Z",
  "default_ci_config_path" : null,
  "default_project_visibility" : "private",
  "default_group_visibility" : "private",
  "gravatar_enabled" : true,
  "container_expiration_policies_enable_historic_entries": true,
  "container_registry_cleanup_tags_service_max_list_size": 200,
  "container_registry_delete_tags_service_timeout": 250,
  "container_registry_expiration_policies_caching": true,
  "container_registry_expiration_policies_worker_capacity": 4,
  "container_registry_token_expire_delay": 5,
  "decompress_archive_file_timeout": 210,
  "repository_storages_weighted": {"default": 100},
  "plantuml_enabled": false,
  "plantuml_url": null,
  "diagramsnet_enabled": true,
  "diagramsnet_url": "https://embed.diagrams.net",
  "kroki_enabled": false,
  "kroki_url": null,
  "terminal_max_session_time": 0,
  "polling_interval_multiplier": 1.0,
  "rsa_key_restriction": 0,
  "dsa_key_restriction": 0,
  "ecdsa_key_restriction": 0,
  "ed25519_key_restriction": 0,
  "ecdsa_sk_key_restriction": 0,
  "ed25519_sk_key_restriction": 0,
  "first_day_of_week": 0,
  "enforce_terms": true,
  "terms": "Hello world!",
  "performance_bar_allowed_group_id": 42,
  "user_show_add_ssh_key_message": true,
  "allow_account_deletion": true,
  "updating_name_disabled_for_users": false,
  "local_markdown_version": 0,
  "allow_local_requests_from_hooks_and_services": true,
  "allow_local_requests_from_web_hooks_and_services": true,
  "allow_local_requests_from_system_hooks": false,
  "asset_proxy_enabled": true,
  "asset_proxy_url": "https://assets.example.com",
  "asset_proxy_whitelist": ["example.com", "*.example.com", "your-instance.com"],
  "asset_proxy_allowlist": ["example.com", "*.example.com", "your-instance.com"],
  "maven_package_requests_forwarding": true,
  "npm_package_requests_forwarding": true,
  "pypi_package_requests_forwarding": true,
  "snippet_size_limit": 52428800,
  "issues_create_limit": 300,
  "raw_blob_request_limit": 300,
  "wiki_page_max_content_bytes": 52428800,
  "require_admin_approval_after_user_signup": false,
  "personal_access_token_prefix": "glpat-",
  "rate_limiting_response_text": null,
  "keep_latest_artifact": true,
  "admin_mode": false,
  "floc_enabled": false,
  "external_pipeline_validation_service_timeout": null,
  "external_pipeline_validation_service_token": null,
  "external_pipeline_validation_service_url": null,
  "jira_connect_application_key": null,
  "jira_connect_public_key_storage_enabled": false,
  "jira_connect_proxy_url": null,
  "silent_mode_enabled": false,
  "package_registry_allow_anyone_to_pull_option": true,
  "bulk_import_max_download_file_size": 5120,
  "project_jobs_api_rate_limit": 600,
  "security_txt_content": null,
  "bulk_import_concurrent_pipeline_batch_limit": 25
}

GitLab Premium 또는 Ultimate 사용자는 또한 이러한 매개변수를 볼 수 있습니다:

  • group_owners_can_manage_default_branch_protection
  • file_template_project_id
  • geo_node_allowed_ips
  • geo_status_timeout
  • default_project_deletion_protection
  • deletion_adjourned_period
  • disable_personal_access_tokens
  • security_policy_global_group_approvers_enabled
  • security_approval_policies_limit
  • delete_unconfirmed_users
  • unconfirmed_users_delete_after_days
  • duo_features_enabled
  • lock_duo_features_enabled
  • use_clickhouse_for_analytics
{
  "id": 1,
  "signup_enabled": true,
  "group_owners_can_manage_default_branch_protection": true,
  "file_template_project_id": 1,
  "geo_node_allowed_ips": "0.0.0.0/0, ::/0",
  "default_project_deletion_protection": false,
  "deletion_adjourned_period": 7,
  "disable_personal_access_tokens": false,
  "duo_features_enabled": true,
  "lock_duo_features_enabled": false
  ...
}

애플리케이션 설정 변경

  • always_perform_delayed_deletion 피처 플래그는 GitLab 15.11에서 활성화되었습니다.
  • delayed_project_deletiondelayed_group_deletion 속성은 GitLab 16.0에서 제거되었습니다.
  • user_email_lookup_limit 속성은 GitLab 16.7에서 제거되었습니다.

GitLab 인스턴스의 애플리케이션 설정을 수정하려면 API 호출을 사용하세요.

PUT /application/settings
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/application/settings?signup_enabled=false&default_project_visibility=internal"

예시 응답:

{
  "id": 1,
  "default_projects_limit": 100000,
  "default_preferred_language": "en",
  "failed_login_attempts_unlock_period_in_minutes": 30,
  "signup_enabled": false,
  "password_authentication_enabled_for_web": true,
  "gravatar_enabled": true,
  "created_at": "2015-06-12T15:51:55.432Z",
  "updated_at": "2015-06-30T13:22:42.210Z",
  "home_page_url": "",
  "default_branch_protection": 2,
  "restricted_visibility_levels": [],
  "max_attachment_size": 10,
  "max_decompressed_archive_size": 25600,
  "max_export_size": 50,
  "max_import_size": 50,
  "max_import_remote_file_size": 10240,
  "max_login_attempts": 3,
  "session_expire_delay": 10080,
  "default_ci_config_path" : null,
  "default_project_visibility": "internal",
  "default_snippet_visibility": "private",
  "default_group_visibility": "private",
  "outbound_local_requests_whitelist": [],
  "domain_allowlist": [],
  "domain_denylist_enabled" : false,
  "domain_denylist" : [],
  "external_authorization_service_enabled": true,
  "external_authorization_service_url": "https://authorize.me",
  "external_authorization_service_default_label": "default",
  "external_authorization_service_timeout": 0.5,
  "user_oauth_applications": true,
  "after_sign_out_path": "",
  "container_expiration_policies_enable_historic_entries": true,
  "container_registry_cleanup_tags_service_max_list_size": 200,
  "container_registry_delete_tags_service_timeout": 250,
  "container_registry_expiration_policies_caching": true,
  "container_registry_expiration_policies_worker_capacity": 4,
  "container_registry_token_expire_delay": 5,
  "decompress_archive_file_timeout": 210,
  "package_registry_cleanup_policies_worker_capacity": 2,
  "plantuml_enabled": false,
  "plantuml_url": null,
  "diagramsnet_enabled": true,
  "diagramsnet_url": "https://embed.diagrams.net",
  "terminal_max_session_time": 0,
  "polling_interval_multiplier": 1.0,
  "rsa_key_restriction": 0,
  "dsa_key_restriction": 0,
  "ecdsa_key_restriction": 0,
  "ed25519_key_restriction": 0,
  "ecdsa_sk_key_restriction": 0,
  "ed25519_sk_key_restriction": 0,
  "first_day_of_week": 0,
  "enforce_terms": true,
  "terms": "Hello world!",
  "performance_bar_allowed_group_id": 42,
  "user_show_add_ssh_key_message": true,
  "file_template_project_id": 1,
  "local_markdown_version": 0,
  "asset_proxy_enabled": true,
  "asset_proxy_url": "https://assets.example.com",
  "asset_proxy_allowlist": ["example.com", "*.example.com", "your-instance.com"],
  "globally_allowed_ips": "",
  "geo_node_allowed_ips": "0.0.0.0/0, ::/0",
  "allow_local_requests_from_hooks_and_services": true,
  "allow_local_requests_from_web_hooks_and_services": true,
  "allow_local_requests_from_system_hooks": false,
  "maven_package_requests_forwarding": true,
  "npm_package_requests_forwarding": true,
  "pypi_package_requests_forwarding": true,
  "snippet_size_limit": 52428800,
  "issues_create_limit": 300,
  "raw_blob_request_limit": 300,
  "wiki_page_max_content_bytes": 52428800,
  "require_admin_approval_after_user_signup": false,
  "personal_access_token_prefix": "glpat-",
  "rate_limiting_response_text": null,
  "keep_latest_artifact": true,
  "admin_mode": false,
  "external_pipeline_validation_service_timeout": null,
  "external_pipeline_validation_service_token": null,
  "external_pipeline_validation_service_url": null,
  "can_create_group": false,
  "jira_connect_application_key": "123",
  "jira_connect_public_key_storage_enabled": true,
  "jira_connect_proxy_url": "http://gitlab.example.com",
  "user_defaults_to_private_profile": true,
  "projects_api_rate_limit_unauthenticated": 400,
  "silent_mode_enabled": false,
  "security_policy_global_group_approvers_enabled": true,
  "security_approval_policies_limit": 5,
  "package_registry_allow_anyone_to_pull_option": true,
  "bulk_import_max_download_file_size": 5120,
  "project_jobs_api_rate_limit": 600,
  "security_txt_content": null,
  "bulk_import_concurrent_pipeline_batch_limit": 25,
  "downstream_pipeline_trigger_limit_per_project_user_sha": 0
}

GitLab Premium 또는 Ultimate 사용자는 다음과 같은 매개변수도 볼 수 있습니다:

  • group_owners_can_manage_default_branch_protection
  • file_template_project_id
  • geo_node_allowed_ips
  • geo_status_timeout
  • default_project_deletion_protection
  • deletion_adjourned_period
  • disable_personal_access_tokens
  • security_policy_global_group_approvers_enabled
  • security_approval_policies_limit
  • delete_unconfirmed_users
  • unconfirmed_users_delete_after_days
  • duo_features_enabled
  • lock_duo_features_enabled
  • use_clickhouse_for_analytics

예시 응답:

  "file_template_project_id": 1,
  "geo_node_allowed_ips": "0.0.0.0/0, ::/0",
  "duo_features_enabled": true,
  "lock_duo_features_enabled": false,

```markdown ## API 호출을 통해 액세스할 수 있는 설정 디렉터리

  • 필드 housekeeping_full_repack_period, housekeeping_gc_period, 및 housekeeping_incremental_repack_period은 GitLab 15.8에서 사용 중지되었습니다. 대신 housekeeping_optimize_repository_period을 사용하세요.
  • 매개변수 sign_in_texthelp_text는 GitLab 16.2에서 사용 중지되었습니다. 대신 외형 APIdescription 매개변수를 사용하세요.
  • 매개변수 allow_account_deletion은 GitLab 16.1에서 도입되었습니다.

일반적으로 모든 설정은 선택 사항입니다. 그러나 활성화된 경우 일부 설정은 올바르게 작동하려면 다른 설정을 설정해야 할 수 있습니다. 이러한 요구 사항은 관련 설정의 설명에 나열되어 있습니다.

속성 유형 필수여부 설명
admin_mode boolean 아니요 관리자가 관리 작업을 위해 인증을 다시하기 전에 관리자 모드를 활성화해야 합니다.
admin_notification_email string 아니요 사용되지 않음: 대신, abuse_notification_email을 사용하세요. 설정 시, 항해 보고서는 이 주소로 전송됩니다. 항해 보고서는 항상 관리 영역에서 사용할 수 있습니다.
abuse_notification_email string 아니요 설정 시, 항해 보고서는 이 주소로 전송됩니다. 항해 보고서는 항상 관리 영역에서 사용할 수 있습니다.
notify_on_unknown_sign_in boolean 아니요 알 수 없는 IP 주소에서 로그인이 발생할 경우 알림을 보내도록 활성화합니다.
after_sign_out_path string 아니요 로그아웃 후 사용자를 리디렉션할 위치입니다.
email_restrictions_enabled boolean 아니요 이메일로 가입하는 데 제한을 활성화합니다.
email_restrictions string email_restrictions_enabled 필수 등록 중인 이메일과 일치하는 정규식입니다.
after_sign_up_text string 아니요 가입 후 사용자에게 표시되는 텍스트입니다.
akismet_api_key string akismet_enabled 필요 Akismet 스팸 방지를 위한 API 키입니다.
akismet_enabled boolean 아니요 (활성화되면 필요함: akismet_api_key) Akismet 스팸 방지를 활성화 또는 비활성화합니다.
allow_account_deletion boolean 아니요 사용자가 계정을 삭제할 수 있도록 true로 설정합니다. Premium 및

비활성 프로젝트 삭제 구성

비활성 프로젝트 삭제를 구성하거나 끌 수 있습니다.

속성 유형 필수 여부 설명
delete_inactive_projects 부울 아니요 비활성 프로젝트 삭제를 활성화합니다. 기본값은 false입니다. GitLab 14.10에서 도입되었습니다. GitLab 15.4에서 피처 플래그 없이 운영 가능합니다.
inactive_projects_delete_after_months 정수 아니요 delete_inactive_projectstrue인 경우, 비활성 프로젝트를 삭제하기 전 대기하는 시간(달). 기본값은 2입니다. GitLab 14.10에서 도입되었습니다. GitLab 15.0에서 운영 가능합니다.
inactive_projects_min_size_mb 정수 아니요 delete_inactive_projectstrue인 경우, 프로젝트가 비활동적인지 확인할 때의 최소 리포지터리 크기. 기본값은 0입니다. GitLab 14.10에서 도입되었습니다. GitLab 15.0에서 운영 가능합니다.
inactive_projects_send_warning_email_after_months 정수 아니요 delete_inactive_projectstrue인 경우, 프로젝트가 비활동적이기 때문에 삭제 예정임을 유지자에게 이메일로 통보하는 시간(달). 기본값은 1입니다. GitLab 14.10에서 도입되었습니다. GitLab 15.0에서 운영 가능합니다.

하우스키퍼 필드

15.8 이후

housekeeping_optimize_repository_period 필드가 정수로 설정된 경우, 지정한 Git 푸시 후 하우스키퍼 작업이 수행됩니다.

15.7 및 이전

housekeeping_enabled 필드는 Git 하우스키퍼를 활성화하거나 비활성화합니다. 이 필드가 올바르게 작동하려면 housekeeping_optimize_repository_period가 설정되거나 다음 값들 중 모두 설정되어야 합니다:

  • housekeeping_bitmaps_enabled
  • housekeeping_full_repack_period
  • housekeeping_gc_period

패키지 레지스트리: 패키지 파일 크기 제한

패키지 파일 크기 제한은 응용 프로그램 설정 API의 일부가 아닙니다. 대신 이러한 설정은 Plan limits API를 사용하여 액세스할 수 있습니다.