애플리케이션 설정 API

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

이 API 호출은 GitLab 인스턴스 내 /admin/application_settings/general에 나타나는 애플리케이션 설정을 읽고 수정할 수 있도록합니다. 이 작업을 수행하려면 관리자어야합니다.

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

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

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,
  ...
}

GitLab 프리미엄 또는 얼티밋 사용자는 또한 다음과 같은 매개변수를 볼 수 있습니다:

  • 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
  ...
}

애플리케이션 설정 변경

  • GitLab 15.11에서 always_perform_delayed_deletion 기능 플래그가 활성화되었습니다.
  • GitLab 16.0에서 delayed_project_deletiondelayed_group_deletion 속성이 제거되었습니다.
  • GitLab 16.7에서 user_email_lookup_limit 속성이 제거되었습니다.

GitLab 인스턴스의 애플리케이션 설정을 수정하려면 API 호출을 사용합니다 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,
  "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에서 사용 중지되었습니다. 대신 Appearance APIdescription 파라미터를 사용하십시오.
  • 파라미터 allow_account_deletion은 GitLab 16.1에 도입되었습니다.

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

속성 유형 필수 설명
admin_mode 부울 아니요 관리자는 관리 작업을 위해 다시 인증하여 관리자 모드를 활성화해야 합니다.
admin_notification_email 문자열 아니요 사용 중지: 대신 abuse_notification_email을 사용하십시오. 설정되면 남용 보고서가 이 주소로 전송됩니다. 남용 보고서는 언제나 관리 영역에서 사용할 수 있습니다.
abuse_notification_email 문자열 아니요 설정된 경우 남용 보고서가 이 주소로 전송됩니다. 남용 보고서는 언제나 관리자 영역에서 사용할 수 있습니다.
notify_on_unknown_sign_in 부울 아니요 알 수 없는 IP 주소에서 로그인이 발생하면 통지를 활성화합니다.
after_sign_out_path 문자열 아니요 로그아웃 후 사용자를 리디렉션할 위치입니다.
email_restrictions_enabled 부울 아니요 이메일로 가입하는 것을 제한합니다.
email_restrictions 문자열 email_restrictions_enabled에 의해 필요함 등록 중 사용되는 이메일에 대해 확인되는 정규식입니다.
after_sign_up_text 문자열 아니요 가입 후 사용자에게 표시되는 텍스트입니다.
akismet_api_key 문자열 akismet_enabled에 의해 필요함 Akismet 스팸 보호를 위한 API 키입니다.
akismet_enabled 부울 아니요 (활성화된 경우, 필수: akismet_api_key) Akismet 스팸 보호를 활성화하거나 비활성화합니다.
allow_account_deletion 부울 아니요 사용자가 계

비활성 프로젝트 삭제 구성

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

속성 유형 필수 설명
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를 사용하여 액세스할 수 있습니다.