# 获取项目ID

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v4/projects:
    get:
      summary: 获取项目ID
      deprecated: false
      description: ''
      tags:
        - GitLab Api
      parameters:
        - name: search
          in: query
          description: 项目名称
          required: false
          example: edi
          schema:
            type: string
        - name: PRIVATE-TOKEN
          in: header
          description: GitLab个人Token
          example: glpat-q1csJCWcYYGum_xZxHhg
          schema:
            type: string
            default: glpat-q1csJCWcYYGum_xZxHhg
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    description:
                      type: string
                    name:
                      type: string
                    name_with_namespace:
                      type: string
                    path:
                      type: string
                    path_with_namespace:
                      type: string
                    created_at:
                      type: string
                    default_branch:
                      type: string
                    tag_list:
                      type: array
                      items:
                        type: string
                    topics:
                      type: array
                      items:
                        type: string
                    ssh_url_to_repo:
                      type: string
                    http_url_to_repo:
                      type: string
                    web_url:
                      type: string
                    readme_url:
                      type: string
                      nullable: true
                    avatar_url:
                      type: 'null'
                    forks_count:
                      type: integer
                    star_count:
                      type: integer
                    last_activity_at:
                      type: string
                    namespace:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        path:
                          type: string
                        kind:
                          type: string
                        full_path:
                          type: string
                        parent_id:
                          type: 'null'
                        avatar_url:
                          type: string
                          nullable: true
                        web_url:
                          type: string
                      required:
                        - id
                        - name
                        - path
                        - kind
                        - full_path
                        - parent_id
                        - avatar_url
                        - web_url
                    _links:
                      type: object
                      properties:
                        self:
                          type: string
                        issues:
                          type: string
                        merge_requests:
                          type: string
                        repo_branches:
                          type: string
                        labels:
                          type: string
                        events:
                          type: string
                        members:
                          type: string
                      required:
                        - self
                        - issues
                        - merge_requests
                        - repo_branches
                        - labels
                        - events
                        - members
                    packages_enabled:
                      type: boolean
                      nullable: true
                    empty_repo:
                      type: boolean
                    archived:
                      type: boolean
                    visibility:
                      type: string
                    owner:
                      type: object
                      properties:
                        id:
                          type: integer
                        username:
                          type: string
                        name:
                          type: string
                        state:
                          type: string
                        avatar_url:
                          type: string
                        web_url:
                          type: string
                      required:
                        - id
                        - username
                        - name
                        - state
                        - avatar_url
                        - web_url
                    resolve_outdated_diff_discussions:
                      type: boolean
                    container_expiration_policy:
                      type: object
                      properties:
                        cadence:
                          type: string
                        enabled:
                          type: boolean
                        keep_n:
                          type: integer
                        older_than:
                          type: string
                        name_regex:
                          type: string
                        name_regex_keep:
                          type: 'null'
                        next_run_at:
                          type: string
                      required:
                        - cadence
                        - enabled
                        - keep_n
                        - older_than
                        - name_regex
                        - name_regex_keep
                        - next_run_at
                    issues_enabled:
                      type: boolean
                    merge_requests_enabled:
                      type: boolean
                    wiki_enabled:
                      type: boolean
                    jobs_enabled:
                      type: boolean
                    snippets_enabled:
                      type: boolean
                    container_registry_enabled:
                      type: boolean
                    service_desk_enabled:
                      type: boolean
                    can_create_merge_request_in:
                      type: boolean
                    issues_access_level:
                      type: string
                    repository_access_level:
                      type: string
                    merge_requests_access_level:
                      type: string
                    forking_access_level:
                      type: string
                    wiki_access_level:
                      type: string
                    builds_access_level:
                      type: string
                    snippets_access_level:
                      type: string
                    pages_access_level:
                      type: string
                    operations_access_level:
                      type: string
                    analytics_access_level:
                      type: string
                    container_registry_access_level:
                      type: string
                    security_and_compliance_access_level:
                      type: string
                    emails_disabled:
                      type: 'null'
                    shared_runners_enabled:
                      type: boolean
                    lfs_enabled:
                      type: boolean
                    creator_id:
                      type: integer
                    import_status:
                      type: string
                    open_issues_count:
                      type: integer
                    ci_default_git_depth:
                      type: integer
                    ci_forward_deployment_enabled:
                      type: boolean
                      nullable: true
                    ci_job_token_scope_enabled:
                      type: boolean
                    ci_separated_caches:
                      type: boolean
                    public_jobs:
                      type: boolean
                    build_timeout:
                      type: integer
                    auto_cancel_pending_pipelines:
                      type: string
                    build_coverage_regex:
                      type: 'null'
                    ci_config_path:
                      type: 'null'
                    shared_with_groups:
                      type: array
                      items:
                        type: string
                    only_allow_merge_if_pipeline_succeeds:
                      type: boolean
                    allow_merge_on_skipped_pipeline:
                      type: 'null'
                    restrict_user_defined_variables:
                      type: boolean
                    request_access_enabled:
                      type: boolean
                    only_allow_merge_if_all_discussions_are_resolved:
                      type: boolean
                    remove_source_branch_after_merge:
                      type: boolean
                      nullable: true
                    printing_merge_request_link_enabled:
                      type: boolean
                    merge_method:
                      type: string
                    squash_option:
                      type: string
                    suggestion_commit_message:
                      type: 'null'
                    merge_commit_template:
                      type: 'null'
                    squash_commit_template:
                      type: 'null'
                    auto_devops_enabled:
                      type: boolean
                    auto_devops_deploy_strategy:
                      type: string
                    autoclose_referenced_issues:
                      type: boolean
                    keep_latest_artifact:
                      type: boolean
                    runner_token_expiration_interval:
                      type: 'null'
                    permissions:
                      type: object
                      properties:
                        project_access:
                          type: object
                          properties:
                            access_level:
                              type: integer
                            notification_level:
                              type: integer
                          required:
                            - access_level
                            - notification_level
                        group_access:
                          type: 'null'
                      required:
                        - project_access
                        - group_access
                    service_desk_address:
                      type: 'null'
                  required:
                    - id
                    - description
                    - name
                    - name_with_namespace
                    - path
                    - path_with_namespace
                    - created_at
                    - default_branch
                    - tag_list
                    - topics
                    - ssh_url_to_repo
                    - http_url_to_repo
                    - web_url
                    - readme_url
                    - avatar_url
                    - forks_count
                    - star_count
                    - last_activity_at
                    - namespace
                    - _links
                    - packages_enabled
                    - empty_repo
                    - archived
                    - visibility
                    - resolve_outdated_diff_discussions
                    - issues_enabled
                    - merge_requests_enabled
                    - wiki_enabled
                    - jobs_enabled
                    - snippets_enabled
                    - container_registry_enabled
                    - service_desk_enabled
                    - can_create_merge_request_in
                    - issues_access_level
                    - repository_access_level
                    - merge_requests_access_level
                    - forking_access_level
                    - wiki_access_level
                    - builds_access_level
                    - snippets_access_level
                    - pages_access_level
                    - operations_access_level
                    - analytics_access_level
                    - container_registry_access_level
                    - security_and_compliance_access_level
                    - emails_disabled
                    - shared_runners_enabled
                    - lfs_enabled
                    - creator_id
                    - import_status
                    - open_issues_count
                    - ci_default_git_depth
                    - ci_forward_deployment_enabled
                    - ci_job_token_scope_enabled
                    - ci_separated_caches
                    - public_jobs
                    - build_timeout
                    - auto_cancel_pending_pipelines
                    - build_coverage_regex
                    - ci_config_path
                    - shared_with_groups
                    - only_allow_merge_if_pipeline_succeeds
                    - allow_merge_on_skipped_pipeline
                    - restrict_user_defined_variables
                    - request_access_enabled
                    - only_allow_merge_if_all_discussions_are_resolved
                    - remove_source_branch_after_merge
                    - printing_merge_request_link_enabled
                    - merge_method
                    - squash_option
                    - suggestion_commit_message
                    - merge_commit_template
                    - squash_commit_template
                    - auto_devops_enabled
                    - auto_devops_deploy_strategy
                    - autoclose_referenced_issues
                    - keep_latest_artifact
                    - runner_token_expiration_interval
                    - permissions
              example:
                - id: 1773
                  description: ''
                  name: Ais Fuel Predict
                  name_with_namespace: 郭有根 / Ais Fuel Predict
                  path: ais_fuel_predict
                  path_with_namespace: guoyougen/ais_fuel_predict
                  created_at: '2024-08-28T13:53:13.870+08:00'
                  default_branch: master
                  tag_list: []
                  topics: []
                  ssh_url_to_repo: git@git.csntcorp.com:guoyougen/ais_fuel_predict.git
                  http_url_to_repo: https://git.csntcorp.com/guoyougen/ais_fuel_predict.git
                  web_url: https://git.csntcorp.com/guoyougen/ais_fuel_predict
                  readme_url: >-
                    https://git.csntcorp.com/guoyougen/ais_fuel_predict/-/blob/master/README.md
                  avatar_url: null
                  forks_count: 0
                  star_count: 0
                  last_activity_at: '2024-11-08T17:01:01.529+08:00'
                  namespace:
                    id: 1883
                    name: 郭有根
                    path: guoyougen
                    kind: user
                    full_path: guoyougen
                    parent_id: null
                    avatar_url: >-
                      https://secure.gravatar.com/avatar/7ab2b389764bd24060552298ddb7962d?s=80&d=identicon
                    web_url: https://git.csntcorp.com/guoyougen
                  _links:
                    self: https://git.csntcorp.com/api/v4/projects/1773
                    issues: https://git.csntcorp.com/api/v4/projects/1773/issues
                    merge_requests: >-
                      https://git.csntcorp.com/api/v4/projects/1773/merge_requests
                    repo_branches: >-
                      https://git.csntcorp.com/api/v4/projects/1773/repository/branches
                    labels: https://git.csntcorp.com/api/v4/projects/1773/labels
                    events: https://git.csntcorp.com/api/v4/projects/1773/events
                    members: https://git.csntcorp.com/api/v4/projects/1773/members
                  packages_enabled: true
                  empty_repo: false
                  archived: false
                  visibility: internal
                  owner:
                    id: 525
                    username: guoyougen
                    name: 郭有根
                    state: active
                    avatar_url: >-
                      https://secure.gravatar.com/avatar/7ab2b389764bd24060552298ddb7962d?s=80&d=identicon
                    web_url: https://git.csntcorp.com/guoyougen
                  resolve_outdated_diff_discussions: false
                  container_expiration_policy:
                    cadence: 1d
                    enabled: false
                    keep_n: 10
                    older_than: 90d
                    name_regex: .*
                    name_regex_keep: null
                    next_run_at: '2024-08-29T13:53:13.976+08:00'
                  issues_enabled: true
                  merge_requests_enabled: true
                  wiki_enabled: true
                  jobs_enabled: true
                  snippets_enabled: true
                  container_registry_enabled: true
                  service_desk_enabled: false
                  can_create_merge_request_in: true
                  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: private
                  operations_access_level: enabled
                  analytics_access_level: enabled
                  container_registry_access_level: enabled
                  security_and_compliance_access_level: private
                  emails_disabled: null
                  shared_runners_enabled: true
                  lfs_enabled: true
                  creator_id: 525
                  import_status: none
                  open_issues_count: 0
                  ci_default_git_depth: 20
                  ci_forward_deployment_enabled: true
                  ci_job_token_scope_enabled: false
                  ci_separated_caches: true
                  public_jobs: true
                  build_timeout: 3600
                  auto_cancel_pending_pipelines: enabled
                  build_coverage_regex: null
                  ci_config_path: null
                  shared_with_groups: []
                  only_allow_merge_if_pipeline_succeeds: false
                  allow_merge_on_skipped_pipeline: null
                  restrict_user_defined_variables: false
                  request_access_enabled: true
                  only_allow_merge_if_all_discussions_are_resolved: false
                  remove_source_branch_after_merge: true
                  printing_merge_request_link_enabled: true
                  merge_method: merge
                  squash_option: default_off
                  suggestion_commit_message: null
                  merge_commit_template: null
                  squash_commit_template: null
                  auto_devops_enabled: false
                  auto_devops_deploy_strategy: continuous
                  autoclose_referenced_issues: true
                  keep_latest_artifact: true
                  runner_token_expiration_interval: null
                  permissions:
                    project_access: null
                    group_access: null
                - id: 111
                  description: 航标SAP接口服务
                  name: edi
                  name_with_namespace: mmp / edi
                  path: edi
                  path_with_namespace: mmp/edi
                  created_at: '2019-11-22T17:09:39.418+08:00'
                  default_branch: dev
                  tag_list: []
                  topics: []
                  ssh_url_to_repo: git@git.csntcorp.com:mmp/edi.git
                  http_url_to_repo: https://git.csntcorp.com/mmp/edi.git
                  web_url: https://git.csntcorp.com/mmp/edi
                  readme_url: null
                  avatar_url: null
                  forks_count: 0
                  star_count: 0
                  last_activity_at: '2024-11-18T09:50:31.073+08:00'
                  namespace:
                    id: 66
                    name: mmp
                    path: mmp
                    kind: group
                    full_path: mmp
                    parent_id: null
                    avatar_url: null
                    web_url: https://git.csntcorp.com/groups/mmp
                  _links:
                    self: https://git.csntcorp.com/api/v4/projects/111
                    issues: https://git.csntcorp.com/api/v4/projects/111/issues
                    merge_requests: >-
                      https://git.csntcorp.com/api/v4/projects/111/merge_requests
                    repo_branches: >-
                      https://git.csntcorp.com/api/v4/projects/111/repository/branches
                    labels: https://git.csntcorp.com/api/v4/projects/111/labels
                    events: https://git.csntcorp.com/api/v4/projects/111/events
                    members: https://git.csntcorp.com/api/v4/projects/111/members
                  packages_enabled: null
                  empty_repo: false
                  archived: false
                  visibility: private
                  resolve_outdated_diff_discussions: false
                  issues_enabled: true
                  merge_requests_enabled: true
                  wiki_enabled: true
                  jobs_enabled: true
                  snippets_enabled: true
                  container_registry_enabled: true
                  service_desk_enabled: false
                  service_desk_address: null
                  can_create_merge_request_in: true
                  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: private
                  operations_access_level: enabled
                  analytics_access_level: enabled
                  container_registry_access_level: enabled
                  security_and_compliance_access_level: private
                  emails_disabled: null
                  shared_runners_enabled: true
                  lfs_enabled: true
                  creator_id: 62
                  import_status: none
                  open_issues_count: 0
                  ci_default_git_depth: 50
                  ci_forward_deployment_enabled: null
                  ci_job_token_scope_enabled: false
                  ci_separated_caches: true
                  public_jobs: true
                  build_timeout: 3600
                  auto_cancel_pending_pipelines: enabled
                  build_coverage_regex: null
                  ci_config_path: null
                  shared_with_groups: []
                  only_allow_merge_if_pipeline_succeeds: false
                  allow_merge_on_skipped_pipeline: null
                  restrict_user_defined_variables: false
                  request_access_enabled: true
                  only_allow_merge_if_all_discussions_are_resolved: false
                  remove_source_branch_after_merge: null
                  printing_merge_request_link_enabled: true
                  merge_method: merge
                  squash_option: default_off
                  suggestion_commit_message: null
                  merge_commit_template: null
                  squash_commit_template: null
                  auto_devops_enabled: false
                  auto_devops_deploy_strategy: continuous
                  autoclose_referenced_issues: true
                  keep_latest_artifact: true
                  runner_token_expiration_interval: null
                  permissions:
                    project_access:
                      access_level: 30
                      notification_level: 3
                    group_access: null
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: GitLab Api
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/5476045/apis/api-234585789-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
