Documentation
Documentation
https://docs.gitlab.com/api/
APIReference
https://docs.gitlab.com/api/api_resources/
Authentication
https://docs.gitlab.com/api/rest/authentication/
swagger: '2.0'
info:
title: GitLab access_requests search API
version: v4
description: Operations related to access requests
host: gitlab.com
produces:
- application/json
tags:
- name: search
description: Operations about searches
paths:
/api/v4/groups/{id}/(-/)search:
get:
summary: Search on GitLab within a group
description: This feature was introduced in GitLab 10.5.
produces:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the group
type: string
required: true
- in: query
name: search
description: The expression it should be searched for
type: string
required: true
- in: query
name: scope
description: The scope of the search
type: string
enum:
- wiki_blobs
- blobs
- commits
- notes
- projects
- issues
- work_items
- merge_requests
- milestones
- users
required: true
- in: query
name: state
description: Filter results by state
type: string
enum:
- all
- opened
- closed
- merged
required: false
- in: query
name: confidential
description: Filter results by confidentiality
type: boolean
required: false
- in: query
name: type
description: 'Filter work items by type. Only applies to work_items scope. Available types: issue, task, epic, incident, test_case, requirement, objective, key_result, ticket.'
type: array
items:
type: string
required: false
- in: query
name: include_archived
description: Includes archived projects in the search. Introduced in GitLab 18.9.
type: boolean
default: false
required: false
- in: query
name: fields
description: Array of fields you wish to search. Available with advanced search.
type: array
items:
type: string
enum:
- title
required: false
- in: query
name: exclude_forks
description: Excludes forked projects in the search. Available with exact code search. Introduced in GitLab 18.9.
type: boolean
required: false
- in: query
name: num_context_lines
description: Number of context lines around each match. Available with advanced and exact code search. Introduced in GitLab 18.11.
type: integer
format: int32
minimum: 0
maximum: 20
required: false
- in: query
name: regex
description: Performs a regex code search. Available with exact code search. Introduced in GitLab 18.9
type: boolean
required: false
- in: query
name: page
description: Current page number
type: integer
format: int32
default: 1
required: false
example: 1
- in: query
name: per_page
description: Number of items per page
type: integer
format: int32
default: 20
required: false
example: 20
responses:
'200':
description: Search on GitLab within a group
tags:
- search
operationId: getApiV4GroupsId(-)search
/api/v4/projects/{id}/(-/)search:
get:
summary: Search on GitLab within a project
description: This feature was introduced in GitLab 10.5.
produces:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- in: query
name: search
description: The expression it should be searched for
type: string
required: true
- in: query
name: scope
description: The scope of the search
type: string
enum:
- issues
- work_items
- merge_requests
- milestones
- notes
- wiki_blobs
- commits
- blobs
- users
required: true
- in: query
name: ref
description: The name of a repository branch or tag. If not given, the default branch is used
type: string
required: false
- in: query
name: state
description: Filter results by state
type: string
enum:
- all
- opened
- closed
- merged
required: false
- in: query
name: confidential
description: Filter results by confidentiality
type: boolean
required: false
- in: query
name: type
description: 'Filter work items by type. Only applies to work_items scope. Available types: issue, task, epic, incident, test_case, requirement, objective, key_result, ticket.'
type: array
items:
type: string
required: false
- in: query
name: fields
description: Array of fields you wish to search. Available with advanced search.
type: array
items:
type: string
enum:
- title
required: false
- in: query
name: num_context_lines
description: Number of context lines around each match. Available with advanced and exact code search. Introduced in GitLab 18.11.
type: integer
format: int32
minimum: 0
maximum: 20
required: false
- in: query
name: regex
description: Performs a regex code search. Available with exact code search. Introduced in GitLab 18.9
type: boolean
required: false
- in: query
name: page
description: Current page number
type: integer
format: int32
default: 1
required: false
example: 1
- in: query
name: per_page
description: Number of items per page
type: integer
format: int32
default: 20
required: false
example: 20
responses:
'200':
description: Search on GitLab within a project
tags:
- search
operationId: getApiV4ProjectsId(-)search
/api/v4/search:
get:
summary: Search on GitLab
description: This feature was introduced in GitLab 10.5.
produces:
- application/json
parameters:
- in: query
name: search
description: The expression it should be searched for
type: string
required: true
- in: query
name: scope
description: The scope of the search
type: string
enum:
- wiki_blobs
- blobs
- commits
- notes
- projects
- issues
- work_items
- merge_requests
- milestones
- snippet_titles
- users
required: true
- in: query
name: state
description: Filter results by state
type: string
enum:
- all
- opened
- closed
- merged
required: false
- in: query
name: confidential
description: Filter results by confidentiality
type: boolean
required: false
- in: query
name: type
description: 'Filter work items by type. Only applies to work_items scope. Available types: issue, task, epic, incident, test_case, requirement, objective, key_result, ticket.'
type: array
items:
type: string
required: false
- in: query
name: include_archived
description: Includes archived projects in the search. Introduced in GitLab 18.9.
type: boolean
default: false
required: false
- in: query
name: fields
description: Array of fields you wish to search. Available with advanced search.
type: array
items:
type: string
enum:
- title
required: false
- in: query
name: exclude_forks
description: Excludes forked projects in the search. Available with exact code search. Introduced in GitLab 18.9.
type: boolean
required: false
- in: query
name: num_context_lines
description: Number of context lines around each match. Available with advanced and exact code search. Introduced in GitLab 18.11.
type: integer
format: int32
minimum: 0
maximum: 20
required: false
- in: query
name: regex
description: Performs a regex code search. Available with exact code search. Introduced in GitLab 18.9
type: boolean
required: false
- in: query
name: page
description: Current page number
type: integer
format: int32
default: 1
required: false
example: 1
- in: query
name: per_page
description: Number of items per page
type: integer
format: int32
default: 20
required: false
example: 20
responses:
'200':
description: Search on GitLab
tags:
- search
operationId: getApiV4Search
securityDefinitions:
access_token_header:
type: apiKey
name: PRIVATE-TOKEN
in: header
access_token_query:
type: apiKey
name: private_token
in: query