Add validation before API import from BitBucket Server
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Work on this issue](https://contributors.gitlab.com/manage-issue?action=work&projectId=278964&issueIid=429234)
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=429234)
</details>
<!--IssueSummary end-->
### Problem
BitBucket Server importer used via the UI and API uses the same logic to import the project + repo, apart from extra [validation](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/controllers/import/bitbucket_server_controller.rb#L100-L108) done (before the import) on the UI and not the API. See [comment](https://gitlab.com/gitlab-org/gitlab/-/issues/295622#note_1616127209).
### Solution
Consider to add the same validation done in the UI to the API.
issue