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 projects API
version: v4
description: Operations related to access requests
host: gitlab.com
produces:
- application/json
tags:
- name: projects
description: Operations related to projects
paths:
/api/v4/projects/{id}/runners:
get:
summary: List project's runners
description: List all runners available in the project, including from ancestor groups and any allowed shared runners.
produces:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project owned by the authenticated user
type: string
required: true
- in: query
name: scope
description: 'Deprecated: Use `type` or `status` instead. The scope of runners to return'
type: string
enum:
- specific
- shared
- instance_type
- group_type
- project_type
- active
- paused
- online
- offline
- never_contacted
- stale
required: false
- in: query
name: type
description: The type of runners to return
type: string
enum:
- instance_type
- group_type
- project_type
required: false
- in: query
name: paused
description: Whether to include only runners that are accepting or ignoring new jobs
type: boolean
required: false
- in: query
name: status
description: The status of runners to return
type: string
enum:
- active
- paused
- online
- offline
- never_contacted
- stale
required: false
- in: query
name: tag_list
description: A list of runner tags
type: array
items:
type: string
required: false
example: '[''macos'', ''shell'']'
- in: query
name: version_prefix
description: The version prefix of runners to return
type: string
required: false
example: '''15.1.'' or ''16.'''
- 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: Get runners available for project
schema:
$ref: '#/definitions/API_Entities_Ci_Runner'
'400':
description: Scope contains invalid value
'403':
description: No access granted
tags:
- projects
operationId: getApiV4ProjectsIdRunners
post:
summary: Assign a runner to project
description: Assign an available project runner to the project.
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project owned by the authenticated user
type: string
required: true
- name: postApiV4ProjectsIdRunners
in: body
required: true
schema:
$ref: '#/definitions/postApiV4ProjectsIdRunners'
responses:
'201':
description: Assign a runner to project
schema:
$ref: '#/definitions/API_Entities_Ci_Runner'
'400':
description: Bad Request
'403':
description: No access granted
'404':
description: Runner not found
tags:
- projects
operationId: postApiV4ProjectsIdRunners
/api/v4/projects/{id}/runners/{runner_id}:
delete:
summary: Unassign a project runner from the project
description: It is not possible to unassign a runner from the owner project. If so, an error is returned. Use the call to delete a runner instead.
produces:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project owned by the authenticated user
type: string
required: true
- in: path
name: runner_id
description: The ID of a runner
type: integer
format: int32
required: true
responses:
'400':
description: Bad Request
'204':
description: Unassign a runner from project
schema:
$ref: '#/definitions/API_Entities_Ci_Runner'
'403':
description: You cannot unassign a runner from the owner project. Delete the runner instead
'404':
description: Runner not found
'412':
description: Precondition Failed
tags:
- projects
operationId: deleteApiV4ProjectsIdRunnersRunnerId
/api/v4/projects/{id}/runners/reset_registration_token:
post:
summary: Reset the runner registration token for a project
description: Reset runner registration token
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
description: The ID of a project
type: string
required: true
responses:
'201':
description: Reset runner registration token
schema:
$ref: '#/definitions/API_Entities_Ci_ResetTokenResult'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Project Not Found
tags:
- projects
operationId: postApiV4ProjectsIdRunnersResetRegistrationToken
/api/v4/projects/{id}/issues:
get:
description: Get a list of project issues
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: with_labels_details
description: Return titles of labels and other details
type: boolean
default: false
required: false
- in: query
name: state
description: Return opened, closed, or all issues
type: string
default: all
enum:
- opened
- closed
- all
required: false
- in: query
name: closed_by_id
description: Return issues which were closed by the user with the given ID.
type: integer
format: int32
required: false
- in: query
name: order_by
description: Return issues ordered by `created_at`, `due_date`, `label_priority`, `milestone_due`, `popularity`, `priority`, `relative_position`, `title`, or `updated_at` fields.
type: string
default: created_at
enum:
- created_at
- due_date
- label_priority
- milestone_due
- popularity
- priority
- relative_position
- title
- updated_at
- weight
required: false
- in: query
name: sort
description: Return issues sorted in `asc` or `desc` order.
type: string
default: desc
enum:
- asc
- desc
required: false
- in: query
name: due_date
description: 'Return issues that have no due date (`0`), or whose due date is this week, this month, between two weeks ago and next month, or which are overdue. Accepts: `overdue`, `week`, `month`, `next_month_and_previous_two_weeks`, `0`'
type: string
enum:
- '0'
- any
- today
- tomorrow
- overdue
- week
- month
- next_month_and_previous_two_weeks
- ''
required: false
- in: query
name: issue_type
description: 'The type of the issue. Accepts: issue, incident, test_case, requirement, task, ticket'
type: string
enum:
- issue
- incident
- test_case
- requirement
- task
- ticket
required: false
- in: query
name: labels
description: Comma-separated list of label names
type: array
items:
type: string
required: false
- in: query
name: milestone
description: Milestone title
type: string
required: false
- in: query
name: milestone_id
description: Return issues assigned to milestones with the specified timebox value ("Any", "None", "Upcoming" or "Started")
type: string
enum:
- Any
- None
- Upcoming
- Started
required: false
- in: query
name: iids
description: The IID array of issues
type: array
items:
type: integer
format: int32
required: false
- in: query
name: search
description: Search issues for text present in the title, description, or any combination of these
type: string
required: false
- in: query
name: in
description: '`title`, `description`, or a string joining them with comma'
type: string
required: false
- in: query
name: author_id
description: Return issues which are authored by the user with the given ID
type: integer
format: int32
required: false
- in: query
name: author_username
description: Return issues which are authored by the user with the given username
type: string
required: false
- in: query
name: assignee_id
description: Return issues which are assigned to the user with the given ID
type: integer
format: int32
required: false
- in: query
name: assignee_username
description: Return issues which are assigned to the user with the given username
type: array
items:
type: string
required: false
- in: query
name: created_after
description: Return issues created after the specified time
type: string
format: date-time
required: false
- in: query
name: created_before
description: Return issues created before the specified time
type: string
format: date-time
required: false
- in: query
name: updated_after
description: Return issues updated after the specified time
type: string
format: date-time
required: false
- in: query
name: updated_before
description: Return issues updated before the specified time
type: string
format: date-time
required: false
- in: query
name: not[labels]
description: Comma-separated list of label names
type: array
items:
type: string
required: false
- in: query
name: not[milestone]
description: Milestone title
type: string
required: false
- in: query
name: not[milestone_id]
description: Return issues assigned to milestones without the specified timebox value ("Any", "None", "Upcoming" or "Started")
type: string
enum:
- Any
- None
- Upcoming
- Started
required: false
- in: query
name: not[iids]
description: The IID array of issues
type: array
items:
type: integer
format: int32
required: false
- in: query
name: not[author_id]
description: Return issues which are not authored by the user with the given ID
type: integer
format: int32
required: false
- in: query
name: not[author_username]
description: Return issues which are not authored by the user with the given username
type: string
required: false
- in: query
name: not[assignee_id]
description: Return issues which are not assigned to the user with the given ID
type: integer
format: int32
required: false
- in: query
name: not[assignee_username]
description: Return issues which are not assigned to the user with the given username
type: array
items:
type: string
required: false
- in: query
name: not[weight]
description: Return issues without the specified weight
type: integer
format: int32
required: false
- in: query
name: not[iteration_id]
description: Return issues which are not assigned to the iteration with the given ID
type: integer
format: int32
required: false
- in: query
name: not[iteration_title]
description: Return issues which are not assigned to the iteration with the given title
type: string
required: false
- in: query
name: scope
description: 'Return issues for the given scope: `created_by_me`, `assigned_to_me` or `all`'
type: string
enum:
- created-by-me
- assigned-to-me
- created_by_me
- assigned_to_me
- all
required: false
- in: query
name: my_reaction_emoji
description: Return issues reacted by the authenticated user by the given emoji
type: string
required: false
- in: query
name: confidential
description: Filter confidential or public issues
type: boolean
required: false
- in: query
name: weight
description: The weight of the issue
type: integer
format: int32
required: false
- in: query
name: epic_id
description: The ID of an epic associated with the issues
type: integer
format: int32
required: false
- in: query
name: health_status
description: 'The health status of the issue. Must be one of: on_track, needs_attention, at_risk, none, any'
type: string
enum:
- on_track
- needs_attention
- at_risk
- none
- any
required: false
- in: query
name: iteration_id
description: Return issues which are assigned to the iteration with the given ID
type: integer
format: int32
required: false
- in: query
name: iteration_title
description: Return issues which are assigned to the iteration with the given title
type: string
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
- in: query
name: cursor
description: Cursor for obtaining the next set of records
type: string
required: false
responses:
'200':
description: Get a list of project issues
schema:
$ref: '#/definitions/API_Entities_Issue'
tags:
- projects
operationId: getApiV4ProjectsIdIssues
post:
description: Create a new project issue
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- name: postApiV4ProjectsIdIssues
in: body
required: true
schema:
$ref: '#/definitions/postApiV4ProjectsIdIssues'
responses:
'201':
description: Create a new project issue
schema:
$ref: '#/definitions/API_Entities_Issue'
tags:
- projects
operationId: postApiV4ProjectsIdIssues
/api/v4/projects/{id}/issues_statistics:
get:
description: Get statistics for the list of project issues
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: labels
description: Comma-separated list of label names
type: array
items:
type: string
required: false
- in: query
name: milestone
description: Milestone title
type: string
required: false
- in: query
name: milestone_id
description: Return issues assigned to milestones with the specified timebox value ("Any", "None", "Upcoming" or "Started")
type: string
enum:
- Any
- None
- Upcoming
- Started
required: false
- in: query
name: iids
description: The IID array of issues
type: array
items:
type: integer
format: int32
required: false
- in: query
name: search
description: Search issues for text present in the title, description, or any combination of these
type: string
required: false
- in: query
name: in
description: '`title`, `description`, or a string joining them with comma'
type: string
required: false
- in: query
name: author_id
description: Return issues which are authored by the user with the given ID
type: integer
format: int32
required: false
- in: query
name: author_username
description: Return issues which are authored by the user with the given username
type: string
required: false
- in: query
name: assignee_id
description: Return issues which are assigned to the user with the given ID
type: integer
format: int32
required: false
- in: query
name: assignee_username
description: Return issues which are assigned to the user with the given username
type: array
items:
type: string
required: false
- in: query
name: created_after
description: Return issues created after the specified time
type: string
format: date-time
required: false
- in: query
name: created_before
description: Return issues created before the specified time
type: string
format: date-time
required: false
- in: query
name: updated_after
description: Return issues updated after the specified time
type: string
format: date-time
required: false
- in: query
name: updated_before
description: Return issues updated before the specified time
type: string
format: date-time
required: false
- in: query
name: not[labels]
description: Comma-separated list of label names
type: array
items:
type: string
required: false
- in: query
name: not[milestone]
description: Milestone title
type: string
required: false
- in: query
name: not[milestone_id]
description: Return issues assigned to milestones without the specified timebox value ("Any", "None", "Upcoming" or "Started")
type: string
enum:
- Any
- None
- Upcoming
- Started
required: false
- in: query
name: not[iids]
description: The IID array of issues
type: array
items:
type: integer
format: int32
required: false
- in: query
name: not[author_id]
description: Return issues which are not authored by the user with the given ID
type: integer
format: int32
required: false
- in: query
name: not[author_username]
description: Return issues which are not authored by the user with the given username
type: string
required: false
- in: query
name: not[assignee_id]
description: Return issues which are not assigned to the user with the given ID
type: integer
format: int32
required: false
- in: query
name: not[assignee_username]
description: Return issues which are not assigned to the user with the given username
type: array
items:
type: string
required: false
- in: query
name: not[weight]
description: Return issues without the specified weight
type: integer
format: int32
required: false
- in: query
name: not[iteration_id]
description: Return issues which are not assigned to the iteration with the given ID
type: integer
format: int32
required: false
- in: query
name: not[iteration_title]
description: Return issues which are not assigned to the iteration with the given title
type: string
required: false
- in: query
name: scope
description: 'Return issues for the given scope: `created_by_me`, `assigned_to_me` or `all`'
type: string
enum:
- created-by-me
- assigned-to-me
- created_by_me
- assigned_to_me
- all
required: false
- in: query
name: my_reaction_emoji
description: Return issues reacted by the authenticated user by the given emoji
type: string
required: false
- in: query
name: confidential
description: Filter confidential or public issues
type: boolean
required: false
- in: query
name: weight
description: The weight of the issue
type: integer
format: int32
required: false
- in: query
name: epic_id
description: The ID of an epic associated with the issues
type: integer
format: int32
required: false
- in: query
name: health_status
description: 'The health status of the issue. Must be one of: on_track, needs_attention, at_risk, none, any'
type: string
enum:
- on_track
- needs_attention
- at_risk
- none
- any
required: false
- in: query
name: iteration_id
description: Return issues which are assigned to the iteration with the given ID
type: integer
format: int32
required: false
- in: query
name: iteration_title
description: Return issues which are assigned to the iteration with the given title
type: string
required: false
responses:
'200':
description: Get statistics for the list of project issues
tags:
- projects
operationId: getApiV4ProjectsIdIssuesStatistics
/api/v4/projects/{id}/issues/{issue_iid}:
get:
description: Get a single project issue
produces:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- in: path
name: issue_iid
description: The internal ID of a project issue
type: integer
format: int32
required: true
responses:
'200':
description: Get a single project issue
schema:
$ref: '#/definitions/API_Entities_Issue'
tags:
- projects
operationId: getApiV4ProjectsIdIssuesIssueIid
put:
description: Update an existing issue
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- in: path
name: issue_iid
description: The internal ID of a project issue
type: integer
format: int32
required: true
- name: putApiV4ProjectsIdIssuesIssueIid
in: body
required: true
schema:
$ref: '#/definitions/putApiV4ProjectsIdIssuesIssueIid'
responses:
'200':
description: Update an existing issue
schema:
$ref: '#/definitions/API_Entities_Issue'
tags:
- projects
operationId: putApiV4ProjectsIdIssuesIssueIid
delete:
description: Delete a project issue
produces:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- in: path
name: issue_iid
description: The internal ID of a project issue
type: integer
format: int32
required: true
responses:
'204':
description: Delete a project issue
tags:
- projects
operationId: deleteApiV4ProjectsIdIssuesIssueIid
/api/v4/projects/{id}/issues/{issue_iid}/reorder:
put:
description: Reorder an existing issue
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- in: path
name: issue_iid
description: The internal ID of a project issue
type: integer
format: int32
required: true
- name: putApiV4ProjectsIdIssuesIssueIidReorder
in: body
required: true
schema:
$ref: '#/definitions/putApiV4ProjectsIdIssuesIssueIidReorder'
responses:
'200':
description: Reorder an existing issue
schema:
$ref: '#/definitions/API_Entities_Issue'
tags:
- projects
operationId: putApiV4ProjectsIdIssuesIssueIidReorder
/api/v4/projects/{id}/issues/{issue_iid}/move:
post:
description: Move an existing issue
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- in: path
name: issue_iid
description: The internal ID of a project issue
type: integer
format: int32
required: true
- name: postApiV4ProjectsIdIssuesIssueIidMove
in: body
required: true
schema:
$ref: '#/definitions/postApiV4ProjectsIdIssuesIssueIidMove'
responses:
'201':
description: Move an existing issue
schema:
$ref: '#/definitions/API_Entities_Issue'
tags:
- projects
operationId: postApiV4ProjectsIdIssuesIssueIidMove
/api/v4/projects/{id}/issues/{issue_iid}/clone:
post:
description: Clone an existing issue
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- in: path
name: issue_iid
description: The internal ID of a project issue
type: integer
format: int32
required: true
- name: postApiV4ProjectsIdIssuesIssueIidClone
in: body
required: true
schema:
$ref: '#/definitions/postApiV4ProjectsIdIssuesIssueIidClone'
responses:
'201':
description: Clone an existing issue
schema:
$ref: '#/definitions/API_Entities_Issue'
tags:
- projects
operationId: postApiV4ProjectsIdIssuesIssueIidClone
/api/v4/projects/{id}/issues/{issue_iid}/closed_by:
get:
description: List merge requests closing issue
produces:
- application/json
parameters:
- in: path
name: id
description: The ID or URL-encoded path of the project
type: string
required: true
- in: path
name: issue_iid
description: The internal ID of a project issue
type: integer
format: int32
required: true
responses:
'200':
description: List merge requests closing issue
schema:
$ref: '#/definitions/API_Entities_MergeRequestBasic'
tags:
- projects
operationId: getApiV4ProjectsIdIssuesIssueIidClosedBy
/api/v4/projects/{id}/uploads/authorize:
post:
summary: Workhorse authorize the file upload
description: This feature was introduced in GitLab 13.11
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
type: integer
format: int32
required: true
responses:
'200':
description: Workhorse authorize the file upload
'404':
description: Not found
tags:
- projects
operationId: postApiV4ProjectsIdUploadsAuthorize
/api/v4/projects/{id}/uploads:
post:
description: Upload a file
produces:
- application/json
consumes:
- application/json
parameters:
- in: path
name: id
type: integer
format: int32
required: true
- name: postApiV4ProjectsIdUploads
in: body
required: true
schema:
$ref: '#/definitions/postApiV4ProjectsIdUploads'
responses:
'201':
description: Upload a file
schema:
$ref: '#/definitions/API_Entities_ProjectUpload'
'404':
description: Not found
tags:
- projects
operationId: postApiV4ProjectsIdUploads
get:
description: Get the list of uploads of a project
produces:
- application/json
parameters:
- 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
- in: path
name: id
type: integer
format: int32
required: true
responses:
'200':
description: Get the list of uploads of a project
schema:
type: array
items:
$ref: '#/definitions/API_Entities_MarkdownUploadAdmin'
'403':
description: Unauthenticated
'404':
description: Not found
tags:
- projects
operationId: getApiV4ProjectsIdUploads
/api/v4/projects/{id}/uploads/{upload_id}:
get:
description: Download a single project upload by ID
produces:
- application/json
parameters:
- in: path
name: upload_id
description: The ID of a project upload
type: integer
format: int32
required: true
- in: path
name: id
type: integer
format: int32
required: true
responses:
'200':
description: Download a single project upload by ID
schema:
type: file
'403':
description: Unauthenticated
'404':
description: Not found
tags:
- projects
operationId: getApiV4ProjectsIdUploadsUploadId
delete:
description: Delete a single project upload by ID
produces:
- application/json
parameters:
- in: path
name: upload_id
description: The ID of a project upload
type: integer
format: int32
required: true
- in: path
name: id
type: integer
format: int32
required: true
responses:
'204':
description: Delete a single project upload by ID
'400':
description: Bad request
'403':
description: Unauthenticated
'404':
description: Not found
tags:
- projec
# --- truncated at 32 KB (240 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gitlab-ci/refs/heads/main/openapi/gitlab-ci-projects-api-openapi.yml