API docs: wrong attribute names for autocomplete and SSH key rate limits in settings.md

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

doc/api/settings.md lists four application settings attributes under names that PUT /application/settings does not accept and GET /application/settings does not return.

Documented name Name accepted by the API
autocomplete_users autocomplete_users_limit
autocomplete_users_unauthenticated autocomplete_users_unauthenticated_limit
users_api_limit_key users_api_limit_ssh_key
users_api_limit_keys users_api_limit_ssh_keys

Evidence

  • lib/api/settings.rb declares optional :autocomplete_users_limit and optional :autocomplete_users_unauthenticated_limit. It has used these names since the setting was introduced in 17.10 (checked tags v17.10.0-ee, v17.11.0-ee, v18.0.0-ee and master).
  • app/models/application_setting.rb defines the JSONB accessors autocomplete_users_limit (default 300) and autocomplete_users_unauthenticated_limit (default 100).
  • ApplicationSettingsHelper.visible_attributes includes users_api_limit_ssh_key and users_api_limit_ssh_keys; there is no users_api_limit_key or users_api_limit_keys anywhere in the code.
  • On GitLab 19.4.1-ee and 19.5.0-pre, PUT /application/settings?autocomplete_users=300 returns HTTP 400 with "at least one parameter must be provided", and the list of accepted parameters in that error message contains only the _limit and _ssh_key variants. GET /application/settings returns only those variants.

Impact

Clients that follow the docs send parameters that are silently ignored or rejected. gitlab-org/api/client-go copied the wrong names from this page in April 2025 (AutocompleteUsers, AutocompleteUsersUnauthenticated) and is now deprecating them in gitlab-org/api/client-go!3071 (merged).

Proposed fix

Rename the four rows in the "Available settings" table of doc/api/settings.md to the names accepted by the API.

Edited by 🤖 GitLab Bot 🤖