swagger: '2.0' info: title: GitLab access_requests deploy_resources API version: v4 description: Operations related to access requests host: gitlab.com produces: - application/json tags: - name: deploy_resources description: Operations about deploy_resources paths: /api/v4/groups/{id}/deploy_tokens: get: summary: List group deploy tokens description: Get a list of a group's deploy tokens. This feature was introduced in GitLab 12.9. produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the group owned by the authenticated user type: integer format: int32 required: true - 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: active description: Limit by active status type: boolean required: false responses: '200': description: List group deploy tokens schema: type: array items: $ref: '#/definitions/API_Entities_DeployToken' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - deploy_resources operationId: getApiV4GroupsIdDeployTokens post: summary: Create a group deploy token description: Creates a new deploy token for a group. This feature was introduced in GitLab 12.9. produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the group owned by the authenticated user type: integer format: int32 required: true - name: postApiV4GroupsIdDeployTokens in: body required: true schema: $ref: '#/definitions/postApiV4GroupsIdDeployTokens' responses: '201': description: Create a group deploy token schema: $ref: '#/definitions/API_Entities_DeployTokenWithToken' '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: postApiV4GroupsIdDeployTokens /api/v4/groups/{id}/deploy_tokens/{token_id}: get: summary: Get a group deploy token description: 'Get a single group''s deploy token by ID. This feature was introduced in GitLab 14.9. ' produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the group owned by the authenticated user type: integer format: int32 required: true - in: path name: token_id description: The ID of the deploy token type: integer format: int32 required: true responses: '200': description: Get a group deploy token schema: $ref: '#/definitions/API_Entities_DeployToken' '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: getApiV4GroupsIdDeployTokensTokenId delete: summary: Delete a group deploy token description: Removes a deploy token from the group. This feature was introduced in GitLab 12.9. produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the group owned by the authenticated user type: integer format: int32 required: true - in: path name: token_id description: The ID of the deploy token type: integer format: int32 required: true responses: '204': description: Delete a group deploy token '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: deleteApiV4GroupsIdDeployTokensTokenId /api/v4/projects/{id}/deploy_keys: get: summary: List deploy keys for project description: Get a list of a project's deploy keys. 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: 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: List deploy keys for project schema: type: array items: $ref: '#/definitions/API_Entities_DeployKeysProject' '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: getApiV4ProjectsIdDeployKeys post: summary: Add deploy key description: Creates a new deploy key for a project. If the deploy key already exists in another project, it's joined to the current project only if the original one is accessible by the same user. 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: postApiV4ProjectsIdDeployKeys in: body required: true schema: $ref: '#/definitions/postApiV4ProjectsIdDeployKeys' responses: '201': description: Add deploy key schema: $ref: '#/definitions/API_Entities_DeployKeysProject' '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: postApiV4ProjectsIdDeployKeys /api/v4/projects/{id}/deploy_keys/{key_id}: get: summary: Get a single deploy key description: Get a single key. 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: key_id description: The ID of the deploy key type: integer format: int32 required: true responses: '200': description: Get a single deploy key schema: $ref: '#/definitions/API_Entities_DeployKeysProject' '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: getApiV4ProjectsIdDeployKeysKeyId put: summary: Update deploy key description: Updates a deploy key for a 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 - in: path name: key_id description: The ID of the deploy key type: integer format: int32 required: true - name: putApiV4ProjectsIdDeployKeysKeyId in: body required: true schema: $ref: '#/definitions/putApiV4ProjectsIdDeployKeysKeyId' responses: '200': description: Update deploy key schema: $ref: '#/definitions/API_Entities_DeployKey' '400': description: Bad request '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - deploy_resources operationId: putApiV4ProjectsIdDeployKeysKeyId delete: summary: Delete deploy key description: Removes a deploy key from the project. If the deploy key is used only for this project, it's deleted from the system. 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: key_id description: The ID of the deploy key type: integer format: int32 required: true responses: '204': description: Delete deploy key '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: deleteApiV4ProjectsIdDeployKeysKeyId /api/v4/projects/{id}/deploy_keys/{key_id}/enable: post: summary: Enable a deploy key description: Enables a deploy key for a project so this can be used. Returns the enabled key, with a status code 201 when successful. This feature was added in GitLab 8.11. 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 - in: path name: key_id description: The ID of the deploy key type: integer format: int32 required: true responses: '201': description: Enable a deploy key schema: $ref: '#/definitions/API_Entities_DeployKey' '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: postApiV4ProjectsIdDeployKeysKeyIdEnable /api/v4/projects/{id}/deploy_tokens: get: summary: List project deploy tokens description: Get a list of a project's deploy tokens. This feature was introduced in GitLab 12.9. 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: 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: active description: Limit by active status type: boolean required: false responses: '200': description: List project deploy tokens schema: type: array items: $ref: '#/definitions/API_Entities_DeployToken' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - deploy_resources operationId: getApiV4ProjectsIdDeployTokens post: summary: Create a project deploy token description: Creates a new deploy token for a project. This feature was introduced in GitLab 12.9. 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: postApiV4ProjectsIdDeployTokens in: body required: true schema: $ref: '#/definitions/postApiV4ProjectsIdDeployTokens' responses: '201': description: Create a project deploy token schema: $ref: '#/definitions/API_Entities_DeployTokenWithToken' '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: postApiV4ProjectsIdDeployTokens /api/v4/projects/{id}/deploy_tokens/{token_id}: get: summary: Get a project deploy token description: Get a single project's deploy token by ID. This feature was introduced in GitLab 14.9. 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: token_id description: The ID of the deploy token type: integer format: int32 required: true responses: '200': description: Get a project deploy token schema: $ref: '#/definitions/API_Entities_DeployToken' '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: getApiV4ProjectsIdDeployTokensTokenId delete: summary: Delete a project deploy token description: This feature was introduced in GitLab 12.9. 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: token_id description: The ID of the deploy token type: integer format: int32 required: true responses: '204': description: Delete a project deploy token '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: deleteApiV4ProjectsIdDeployTokensTokenId /api/v4/projects/{id}/deployments: get: summary: List project deployments description: Get a list of deployments in a project. This feature was introduced in GitLab 8.11. 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: 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: order_by description: Return deployments ordered by either one of `id`, `iid`, `created_at`, `updated_at` or `ref` fields. Default is `id` type: string default: id enum: - id - iid - created_at - updated_at - finished_at required: false - in: query name: sort description: Return deployments sorted in `asc` or `desc` order. Default is `asc` type: string default: asc enum: - asc - desc required: false - in: query name: updated_after description: Return deployments updated after the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) type: string format: date-time required: false - in: query name: updated_before description: Return deployments updated before the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) type: string format: date-time required: false - in: query name: finished_after description: Return deployments finished after the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) type: string format: date-time required: false - in: query name: finished_before description: Return deployments finished before the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) type: string format: date-time required: false - in: query name: environment description: The name of the environment to filter deployments by type: string required: false - in: query name: status description: The status to filter deployments by. One of `created`, `running`, `success`, `failed`, `canceled`, or `blocked` type: string enum: - created - running - success - failed - canceled - skipped - blocked required: false responses: '200': description: List project deployments schema: type: array items: $ref: '#/definitions/API_Entities_Deployment' '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: getApiV4ProjectsIdDeployments post: summary: Create a deployment description: This feature was introduced in GitLab 12.4. 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: postApiV4ProjectsIdDeployments in: body required: true schema: $ref: '#/definitions/postApiV4ProjectsIdDeployments' responses: '201': description: Create a deployment schema: $ref: '#/definitions/API_Entities_DeploymentExtended' '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: postApiV4ProjectsIdDeployments /api/v4/projects/{id}/deployments/{deployment_id}: get: summary: Get a specific deployment description: This feature was introduced in GitLab 8.11. 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: deployment_id description: The ID of the deployment type: integer format: int32 required: true responses: '200': description: Get a specific deployment schema: $ref: '#/definitions/API_Entities_DeploymentExtended' '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: getApiV4ProjectsIdDeploymentsDeploymentId put: summary: Update a deployment description: This feature was introduced in GitLab 12.4. 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 - in: path name: deployment_id type: integer format: int32 required: true - name: putApiV4ProjectsIdDeploymentsDeploymentId in: body required: true schema: $ref: '#/definitions/putApiV4ProjectsIdDeploymentsDeploymentId' responses: '200': description: Update a deployment schema: $ref: '#/definitions/API_Entities_DeploymentExtended' '400': description: Bad request '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - deploy_resources operationId: putApiV4ProjectsIdDeploymentsDeploymentId delete: summary: Delete a specific deployment description: Delete a specific deployment that is not currently the last deployment for an environment or in a running state. This feature was introduced in GitLab 15.3. 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: deployment_id description: The ID of the deployment type: integer format: int32 required: true responses: '204': description: Deployment destroyed '403': description: Forbidden '400': description: '"Cannot destroy running deployment" or "Deployment currently deployed to environment"' tags: - deploy_resources operationId: deleteApiV4ProjectsIdDeploymentsDeploymentId /api/v4/projects/{id}/deployments/{deployment_id}/merge_requests: get: summary: List of merge requests associated with a deployment description: Retrieves the list of merge requests shipped with a given deployment. This feature was introduced in GitLab 12.7. 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: 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: deployment_id description: The ID of the deployment type: integer format: int32 required: true - in: query name: author_id description: Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. Combine with `scope=all` or `scope=assigned_to_me`. type: integer format: int32 required: false - in: query name: author_username description: Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. type: string required: false - in: query name: assignee_id description: Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee. type: integer format: int32 required: false - in: query name: assignee_username description: Returns merge requests created by the given `username`. Mutually exclusive with `author_id`. type: array items: type: string required: false - in: query name: reviewer_username description: Returns merge requests which have the user as a reviewer with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. Introduced in GitLab 13.8. type: string required: false - in: query name: labels description: Returns merge requests matching a comma-separated list of labels. `None` lists all merge requests with no labels. `Any` lists all merge requests with at least one label. Predefined names are case-insensitive. type: array items: type: string required: false - in: query name: milestone description: Returns merge requests for a specific milestone. `None` returns merge requests with no milestone. `Any` returns merge requests that have an assigned milestone. type: string required: false - in: query name: my_reaction_emoji description: Returns merge requests reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction. type: string required: false - in: query name: reviewer_id description: Returns merge requests which have the user as a reviewer with the given user `id`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_username`. type: integer format: int32 required: false - in: query name: state description: Returns `all` merge requests or just those that are `opened`, `closed`, `locked`, or `merged`. type: string default: all enum: - opened - closed - locked - merged - all required: false - in: query name: order_by description: Returns merge requests ordered by `created_at`, `label_priority`, `milestone_due`, `popularity`, `priority`, `title`, `updated_at` or `merged_at` fields. Introduced in GitLab 14.8. type: string default: created_at enum: - created_at - label_priority - milestone_due - popularity - priority - title - updated_at - merged_at required: false - in: query name: sort description: Returns merge requests sorted in `asc` or `desc` order. type: string default: desc enum: - asc - desc required: false - in: query name: with_labels_details description: 'If `true`, response returns more details for each label in labels field: `:name`,`:color`, `:description`, `:description_html`, `:text_color`' type: boolean default: false required: false - in: query name: with_merge_status_recheck description: If `true`, this projection requests (but does not guarantee) that the `merge_status` field be recalculated asynchronously. Introduced in GitLab 13.0. type: boolean default: false required: false - in: query name: created_after description: Returns merge requests created on or after the given time. Expected in ISO 8601 format. type: string format: date-time required: false example: '2019-03-15T08:00:00Z' - in: query name: created_before description: Returns merge requests created on or before the given time. Expected in ISO 8601 format. type: string format: date-time required: false example: '2019-03-15T08:00:00Z' - in: query name: updated_after description: Returns merge requests updated on or after the given time. Expected in ISO 8601 format. type: string format: date-time required: false example: '2019-03-15T08:00:00Z' - in: query name: updated_before description: Returns merge requests updated on or before the given time. Expected in ISO 8601 format. type: string format: date-time required: false example: '2019-03-15T08:00:00Z' - in: query name: view description: If simple, returns the `iid`, URL, title, description, and basic state of merge request type: string enum: - simple required: false - in: query name: scope description: 'Returns merge requests for the given scope: `created_by_me`, `assigned_to_me`, `reviews_for_me` or `all`' type: string enum: - created-by-me - assigned-to-me - created_by_me - assigned_to_me - reviews_for_me - all required: false - in: query name: source_branch description: Returns merge requests with the given source branch type: string required: false - in: query name: source_project_id description: Returns merge requests with the given source project id type: integer format: int32 required: false - in: query name: target_branch description: Returns merge requests with the given target branch type: string required: false - in: query name: search description: Search merge requests against their `title` and `description`. type: string required: false - in: query name: in description: Modify the scope of the search attribute. `title`, `description`, or a string joining them with comma. type: string required: false example: title,description - in: query name: wip description: Deprecated. Use `draft` instead. Filter merge requests against their `wip` status. `yes` to return only draft merge requests, `no` to return non-draft merge requests. type: string enum: - 'yes' - 'no' required: false - in: query name: draft description: Filter merge requests against their `draft` status. `true` to return only draft merge requests, `false` to return non-draft merge requests. type: boolean required: false - in: query name: not[author_id] description: '`` Returns merge requests created by the given user `id`. Mutually exclusive with `author_username`. Combine with `scope=all` or `scope=assigned_to_me`.' type: integer format: int32 required: false - in: query name: not[author_username] description: '`` Returns merge requests created by the given `username`. Mutually exclusive with `author_id`.' type: string required: false - in: query name: not[assignee_id] description: '`` Returns merge requests assigned to the given user `id`. `None` returns unassigned merge requests. `Any` returns merge requests with an assignee.' type: integer format: int32 required: false - in: query name: not[assignee_username] description: '`` Returns merge requests created by the given `username`. Mutually exclusive with `author_id`.' type: array items: type: string required: false - in: query name: not[reviewer_username] description: '`` Returns merge requests which have the user as a reviewer with the given `username`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_id`. Introduced in GitLab 13.8.' type: string required: false - in: query name: not[labels] description: '`` Returns merge requests matching a comma-separated list of labels. `None` lists all merge requests with no labels. `Any` lists all merge requests with at least one label. Predefined names are case-insensitive.' type: array items: type: string required: false - in: query name: not[milestone] description: '`` Returns merge requests for a specific milestone. `None` returns merge requests with no milestone. `Any` returns merge requests that have an assigned milestone.' type: string required: false - in: query name: not[my_reaction_emoji] description: '`` Returns merge requests reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction.' type: string required: false - in: query name: not[reviewer_id] description: '`` Returns merge requests which have the user as a reviewer with the given user `id`. `None` returns merge requests with no reviewers. `Any` returns merge requests with any reviewer. Mutually exclusive with `reviewer_username`.' type: integer format: int32 required: false - in: query name: deployed_before description: Returns merge requests deployed before the given date/time. Expected in ISO 8601 format. type: string required: false example: '2019-03-15T08:00:00Z' - in: query name: deployed_after description: Returns merge requests deployed after the given date/time. Expected in ISO 8601 format type: string required: false example: '2019-03-15T08:00:00Z' - in: query name: environment description: Returns merge requests deployed to the given environment type: string required: false example: '2019-03-15T08:00:00Z' - in: query name: approved description: Filters merge requests by their `approved` status. `yes` returns only approved merge requests. `no` returns only non-approved merge requests. type: string enum: - 'yes' - 'no' required: false - in: query name: merge_user_id description: Returns merge requests which have been merged by the user with the given user `id`. Mutually exclusive with `merge_user_username`. type: integer format: int32 required: false - in: query name: merge_user_username description: Returns merge requests which have been merged by the user with the given `username`. Mutually exclusive with `merge_user_id`. type: string required: false responses: '200': description: List of merge requests associated with a deployment schema: type: array items: $ref: '#/definitions/API_Entities_MergeRequestBasic' '401': description: Unauthorized '404': description: Not found tags: - deploy_resources operationId: getApiV4ProjectsIdDeploymentsDeploymentIdMergeRequests /api/v4/projects/{id}/deployments/{deployment_id}/approval: post: summary: Approve or reject a blocked deployment description: This feature was introduced in GitLab 14.8. 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 - in: path name: deployment_id description: The ID of the deployment type: integer format: int32 required: true - name: postApiV4ProjectsIdDeploymentsDeploymentIdApproval in: body required: true schema: $ref: '#/definitions/postApiV4ProjectsIdDeploymentsDeploymentIdApproval' responses: '201': description: Approve or reject a blocked deployment schema: $ref: '#/definitions/API_Entities_Deployments_Approval' tags: - deploy_resources operationId: postApiV4ProjectsIdDeploymentsDeploymentIdApproval /api/v4/deploy_keys: get: summary: List all deploy keys description: Get a list of all deploy keys across all projects of the GitLab instance. This endpoint requires administrator access and is not available on GitLab.com. 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: query name: public description: Only return deploy keys that are public type: boolean default: false required: false responses: '200': description: List all deploy keys schema: type: array items: $ref: '#/definitions/API_Entities_DeployKey' '401': description: Unauthorized '403': description: Forbidden tags: - deploy_resources operationId: getApiV4DeployKeys post: summary: Create a deploy key description: Create a deploy key for the GitLab instance. This endpoint requires administrator access. produces: - application/json consumes: - application/json parameters: - name: postApiV4DeployKeys in: body required: true schema: $ref: '#/definitions/postApiV4DeployKeys' responses: '201': description: Create a deploy key schema: $ref: '#/definitions/API_Entities_DeployKey' '400': description: Bad request '401': description: Unauthorized '403': description: Forbidden tags: - deploy_resources operationId: postApiV4DeployKeys /api/v4/deploy_tokens: get: summary: List all deploy tokens description: Get a list of all deploy tokens across the GitLab instance. This endpoint requires administrator access. This feature was introduced in GitLab 12.9. 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: query name: active description: Limit by active status type: boolean required: false responses: '200': description: List all deploy tokens schema: type: array items: $ref: '#/definitions/API_Entities_DeployToken' '401': description: Unauthorized '403': description: Forbidden tags: - deploy_resources operationId: getApiV4DeployTokens definitions: API_Entities_CustomAttribute: type: object properties: key: type: string example: foo value: type: string example: bar required: - key - value description: API_Entities_CustomAttribute model API_Entities_Ci_Runner: type: object properties: id: type: integer format: int32 example: 8 description: type: string example: test-1-20150125 ip_address: type: string example: 127.0.0.1 active: type: boolean example: true paused: type: boolean example: false is_shared: type: boolean example: true runner_type: type: string enum: - instance_type - group_type - project_type example: instance_type name: type: string example: test online: type: boolean example: true created_by: $ref: '#/definitions/API_Entities_UserBasic' created_at: type: string format: date-time example: '2025-05-03T00:00:00.000Z' status: type: string example: online job_execution_status: type: string enum: - active - idle example: idle required: - id - description - ip_address - active - paused - is_shared - runner_type - name - online - created_at - status - job_execution_status description: API_Entities_Ci_Runner model API_Entities_ProtectedEnvironments_ApprovalRuleForSummary: type: object properties: id: type: string user_id: type: string group_id: type: string access_level: type: string access_level_description: type: string required_approvals: type: string group_inheritance_type: type: string deployment_approvals: $ref: '#/definitions/API_Entities_Deployments_Approval' required: - id - user_id - group_id - access_level - access_level_description - required_approvals - group_inheritance_type - deployment_approvals API_Entities_Ci_RunnerManager: type: object properties: id: type: integer format: int32 example: 8 system_id: type: string example: runner-1 version: type: string example: 16.11.0 revision: type: string example: 91a27b2a platform: type: string example: linux architecture: type: string example: amd64 created_at: type: string example: '2023-10-24T01:27:06.549Z' contacted_at: type: string example: '2023-10-24T01:27:06.549Z' ip_address: type: string example: 127.0.0.1 status: type: string example: online job_execution_status: type: string enum: - active - idle example: idle required: - id - system_id - version - revision - platform - architecture - created_at - contacted_at - ip_address - status - job_execution_status description: API_Entities_Ci_RunnerManager model API_Entities_UserBasic: type: object properties: id: type: integer format: int32 example: 1 username: type: string example: admin public_email: type: string example: john@example.com name: type: string example: Administrator state: type: string example: active locked: type: boolean avatar_url: type: string example: https://gravatar.com/avatar/1 avatar_path: type: string example: /user/avatar/28/The-Big-Lebowski-400-400.png custom_attributes: type: array items: $ref: '#/definitions/API_Entities_CustomAttribute' web_url: type: string example: https://gitlab.example.com/root required: - id - username - public_email - name - state - locked - avatar_url - web_url description: API_Entities_UserBasic model API_Entities_IssuableTimeStats: type: object properties: time_estimate: type: integer format: int32 example: 12600 total_time_spent: type: integer format: int32 example: 3600 human_time_estimate: type: string example: 3h 30m human_total_time_spent: type: string example: 1h required: - time_estimate - total_time_spent - human_time_estimate - human_total_time_spent description: API_Entities_IssuableTimeStats model API_Entities_ProjectIdentity: type: object properties: id: type: integer format: int32 example: 1 description: type: string example: desc name: type: string example: project1 name_with_namespace: type: string example: John Doe / project1 path: type: string example: project1 path_with_namespace: type: string example: namespace1/project1 created_at: type: string format: date-time example: '2020-05-07T04:27:17.016Z' required: - id - description - name - name_with_namespace - path - path_with_namespace - created_at API_Entities_User: type: object properties: id: type: integer format: int32 example: 1 username: type: string example: admin public_email: type: string example: john@example.com name: type: string example: Administrator state: type: string example: active locked: type: boolean avatar_url: type: string example: https://gravatar.com/avatar/1 avatar_path: type: string example: /user/avatar/28/The-Big-Lebowski-400-400.png custom_attributes: type: array items: $ref: '#/definitions/API_Entities_CustomAttribute' web_url: type: string example: https://gitlab.example.com/root created_at: type: string bio: type: string location: type: string linkedin: type: string twitter: type: string discord: type: string website_url: type: string github: type: string job_title: type: string pronouns: type: string organization: type: string bot: type: boolean work_information: type: string followers: type: string following: type: string is_followed: type: string local_time: type: string required: - id - username - public_email - name - state - locked - avatar_url - web_url - bio - location - linkedin - twitter - discord - website_url - github - job_title - pronouns - organization - bot - work_information - local_time postApiV4ProjectsIdDeployKeys: type: object properties: key: type: string description: New deploy key title: type: string description: New deploy key's title can_push: type: boolean description: Can deploy key push to the project's repository expires_at: type: string format: date-time description: The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) required: - key - title description: Add deploy key API_Entities_Milestone: type: object properties: id: type: integer format: int32 iid: type: integer format: int32 project_id: type: integer format: int32 group_id: type: string title: type: string description: type: string state: type: string created_at: type: string updated_at: type: string due_date: type: string start_date: type: string expired: type: boolean web_url: type: string required: - id - iid - title - description - state - created_at - updated_at - due_date - start_date - expired - web_url API_Entities_Ci_PipelineBasic: type: object properties: id: type: integer format: int32 example: 1 iid: type: integer format: int32 example: 2 project_id: type: integer format: int32 example: 3 sha: type: string example: 0ec9e58fdfca6cdd6652c083c9edb53abc0bad52 ref: type: string example: feature-branch status: type: string example: success source: type: string example: push created_at: type: string format: date-time example: '2022-10-21T16:49:48.000+02:00' updated_at: type: string format: date-time example: '2022-10-21T16:49:48.000+02:00' web_url: type: string example: https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61 required: - id - iid - project_id - sha - ref - status - source - created_at - updated_at - web_url description: API_Entities_Ci_PipelineBasic model postApiV4GroupsIdDeployTokens: type: object properties: name: type: string description: New deploy token's name scopes: type: array description: Indicates the deploy token scopes. Must be at least one of `read_repository`, `read_registry`, `write_registry`, `read_package_registry`, or `write_package_registry` items: type: string enum: - read_repository - read_registry - write_registry - read_package_registry - write_package_registry - read_virtual_registry - write_virtual_registry expires_at: type: string format: date-time description: Expiration date for the deploy token. Does not expire if no value is provided. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) username: type: string description: Username for deploy token. Default is `gitlab+deploy-token-{n}` required: - name - scopes description: Create a group deploy token API_Entities_Ci_JobArtifact: type: object properties: file_type: type: string enum: - archive - metadata - trace - junit - sast - dependency_scanning - container_scanning - dast - codequality - license_scanning - performance - metrics - metrics_referee - network_referee - lsif - dotenv - cobertura - terraform - accessibility - cluster_applications - secret_detection - requirements - coverage_fuzzing - browser_performance - load_performance - api_fuzzing - cluster_image_scanning - cyclonedx - requirements_v2 - annotations - repository_xray - jacoco - scip - sarif - environment_key example: archive size: type: integer format: int32 example: 1000 filename: type: string example: artifacts.zip file_format: type: string enum: - raw - zip - gzip example: zip required: - file_type - size - filename - file_format postApiV4ProjectsIdDeploymentsDeploymentIdApproval: type: object properties: status: type: string description: The status of the approval (either `approved` or `rejected`) enum: - approved - rejected comment: type: string description: A comment to go with the approval represented_as: type: string description: The name of the User/Group/Role to use for the approval, when the user belongs to multiple approval rules required: - status description: Approve or reject a blocked deployment putApiV4ProjectsIdDeployKeysKeyId: type: object properties: title: type: string description: New deploy key's title can_push: type: boolean description: Can deploy key push to the project's repository description: Update deploy key API_Entities_Deployments_ApprovalSummary: type: object properties: rules: $ref: '#/definitions/API_Entities_ProtectedEnvironments_ApprovalRuleForSummary' required: - rules API_Entities_Commit: type: object properties: id: type: string example: 2695effb5807a22ff3d138d593fd856244e155e7 short_id: type: string example: 2695effb created_at: type: string format: date-time example: '2017-07-26T11:08:53.000+02:00' parent_ids: type: array items: type: string example: - 2a4b78934375d7f53875269ffd4f45fd83a84ebe title: type: string example: Initial commit message: type: string example: Initial commit author_name: type: string example: John Smith author_email: type: string example: john@example.com authored_date: type: string format: date-time example: '2012-05-28T04:42:42-07:00' committer_name: type: string example: Jack Smith committer_email: type: string example: jack@example.com committed_date: type: string format: date-time example: '2012-05-28T04:42:42-07:00' trailers: type: object example: Merged-By: Jane Doe janedoe@gitlab.com extended_trailers: type: object example: Signed-off-by: - John Doe - Jane Doe web_url: type: string example: https://gitlab.example.com/janedoe/gitlab-foss/-/commit/ed899a2f4b50b4370feeea94676502b42383c746 required: - id - short_id - created_at - parent_ids - title - message - author_name - author_email - authored_date - committer_name - committer_email - committed_date - trailers - extended_trailers - web_url description: API_Entities_Commit model API_Entities_Deployments_Approval: type: object properties: user: $ref: '#/definitions/API_Entities_UserBasic' status: type: string example: approved created_at: type: string format: date-time example: '2022-02-24T20:22:30.097Z' comment: type: string example: LGTM required: - user - status - created_at - comment description: API_Entities_Deployments_Approval model API_Entities_EnvironmentBasic: type: object properties: id: type: integer format: int32 example: 1 name: type: string example: deploy slug: type: string example: deploy external_url: type: string example: https://deploy.gitlab.example.com created_at: type: string format: date-time example: '2019-05-25T18:55:13.252Z' updated_at: type: string format: date-time example: '2019-05-25T18:55:13.252Z' required: - id - name - slug - external_url - created_at - updated_at description: API_Entities_EnvironmentBasic model postApiV4DeployKeys: type: object properties: key: type: string description: New deploy key title: type: string description: New deploy key's title expires_at: type: string format: date-time description: The expiration date of the SSH key in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ) required: - key - title description: Create a deploy key API_Entities_MergeRequestBasic: type: object properties: id: type: integer format: int32 example: 84 iid: type: integer format: int32 example: 14 project_id: type: integer format: int32 example: 4 title: type: string example: Impedit et ut et dolores vero provident ullam est description: type: string example: Repellendus impedit et vel velit dignissimos. state: type: string example: closed created_at: type: string format: date-time example: '2022-08-17T12:46:35.053Z' updated_at: type: string format: date-time example: '2022-11-14T17:22:01.470Z' merged_by: $ref: '#/definitions/API_Entities_UserBasic' merge_user: $ref: '#/definitions/API_Entities_UserBasic' merged_at: type: string format: date-time example: '2022-01-31T15:10:45.080Z' closed_by: $ref: '#/definitions/API_Entities_UserBasic' closed_at: type: string format: date-time example: '2022-01-31T15:10:45.080Z' title_html: type: string description_html: type: string target_branch: type: string source_branch: type: string user_notes_count: type: integer format: int32 upvotes: type: integer format: int32 downvotes: type: integer format: int32 author: $ref: '#/definitions/API_Entities_UserBasic' assignees: $ref: '#/definitions/API_Entities_UserBasic' assignee: $ref: '#/definitions/API_Entities_UserBasic' reviewers: $ref: '#/definitions/API_Entities_UserBasic' source_project_id: type: integer format: int32 target_project_id: type: integer format: int32 labels: type: array items: type: string draft: type: boolean imported: type: boolean imported_from: type: string example: bitbucket work_in_progress: type: boolean milestone: $ref: '#/definitions/API_Entities_Milestone' merge_when_pipeline_succeeds: type: boolean merge_status: type: string example: unchecked detailed_merge_status: type: string example: mergeable merge_after: type: string format: date-time example: '2022-01-31T15:10:45.080Z' sha: type: string example: 1234abcd merge_commit_sha: type: string example: 1234abcd squash_commit_sha: type: string example: 1234abcd discussion_locked: type: boolean should_remove_source_branch: type: boolean force_remove_source_branch: type: boolean prepared_at: type: string format: date-time example: '2022-01-31T15:10:45.080Z' allow_collaboration: type: boolean allow_maintainer_to_push: type: boolean reference: type: string example: '!1' references: $ref: '#/definitions/API_Entities_IssuableReferences' web_url: type: string example: https://gitlab.example.com/my-group/my-project/-/merge_requests/1 time_stats: $ref: '#/definitions/API_Entities_IssuableTimeStats' squash: type: boolean squash_on_merge: type: boolean task_completion_status: $ref: '#/definitions/API_Entities_TaskCompletionStatus' has_conflicts: type: boolean blocking_discussions_resolved: type: boolean approvals_before_merge: type: integer format: int32 example: 2 required: - id - iid - project_id - title - description - state - created_at - updated_at - merged_by - merge_user - merged_at - closed_by - closed_at - target_branch - source_branch - user_notes_count - upvotes - downvotes - author - assignees - assignee - reviewers - source_project_id - target_project_id - labels - draft - imported - imported_from - work_in_progress - milestone - merge_when_pipeline_succeeds - merge_status - detailed_merge_status - merge_after - sha - merge_commit_sha - squash_commit_sha - discussion_locked - should_remove_source_branch - force_remove_source_branch - prepared_at - reference - references - web_url - time_stats - squash - squash_on_merge - task_completion_status - has_conflicts - blocking_discussions_resolved - approvals_before_merge description: API_Entities_MergeRequestBasic model putApiV4ProjectsIdDeploymentsDeploymentId: type: object properties: status: type: string description: The new status of the deployment. One of `running`, `success`, `failed`, or `canceled` enum: - running - success - failed - canceled required: - status description: Update a deployment postApiV4ProjectsIdDeployments: type: object properties: environment: type: string description: The name of the environment to create the deployment for sha: type: string description: The SHA of the commit that is deployed ref: type: string description: The name of the branch or tag that is deployed tag: type: boolean description: A boolean that indicates if the deployed ref is a tag (`true`) or not (`false`) status: type: string description: The status of the deployment that is created. One of `running`, `success`, `failed`, or `canceled` enum: - running - success - failed - canceled required: - environment - sha - ref - tag - status description: Create a deployment postApiV4ProjectsIdDeployTokens: type: object properties: name: type: string description: New deploy token's name scopes: type: array description: Indicates the deploy token scopes. Must be at least one of `read_repository`, `read_registry`, `write_registry`, `read_package_registry`, `write_package_registry`, `read_virtual_registry`, or `write_virtual_registry`. items: type: string enum: - read_repository - read_registry - write_registry - read_package_registry - write_package_registry - read_virtual_registry - write_virtual_registry expires_at: type: string format: date-time description: Expiration date for the deploy token. Does not expire if no value is provided. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). username: type: string description: Username for deploy token. Default is `gitlab+deploy-token-{n}` required: - name - scopes description: Create a project deploy token API_Entities_DeployTokenWithToken: type: object properties: id: type: integer format: int32 example: 1 name: type: string example: MyToken username: type: string example: gitlab+deploy-token-1 expires_at: type: string format: date-time example: '2020-02-14T00:00:00.000Z' scopes: type: array example: - read_repository revoked: type: boolean expired: type: boolean token: type: string example: jMRvtPNxrn3crTAGukpZ required: - id - name - username - expires_at - scopes - revoked - expired - token description: API_Entities_DeployTokenWithToken model API_Entities_DeployKeysProject: type: object properties: id: type: integer format: int32 example: 1 title: type: string example: Sample key 25 created_at: type: string format: date-time example: '2015-09-03T07:24:44.627Z' expires_at: type: string format: date-time example: '2020-09-03T07:24:44.627Z' last_used_at: type: string format: date-time example: '2020-09-03T07:24:44.627Z' key: type: string example: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDNJAkI3Wdf0r13c8a5pEExB2YowPWCSVzfZV22pNBc1CuEbyYLHpUyaD0GwpGvFdx2aP7lMEk35k6Rz3ccBF6jRaVJyhsn5VNnW92PMpBJ/P1UebhXwsFHdQf5rTt082cSxWuk61kGWRQtk4ozt/J2DF/dIUVaLvc+z4HomT41fQ== usage_type: type: string example: auth fingerprint: type: string example: 4a:9d:64:15:ed:3a:e6:07:6e:89:36:b3:3b:03:05:d9 fingerprint_sha256: type: string example: SHA256:Jrs3LD1Ji30xNLtTVf9NDCj7kkBgPBb2pjvTZ3HfIgU projects_with_write_access: $ref: '#/definitions/API_Entities_ProjectIdentity' projects_with_readonly_access: $ref: '#/definitions/API_Entities_ProjectIdentity' can_push: type: boolean required: - id - title - created_at - expires_at - last_used_at - key - usage_type - fingerprint_sha256 - can_push description: API_Entities_DeployKeysProject model API_Entities_Ci_Job: type: object properties: id: type: integer format: int32 example: 1 status: type: string example: waiting_for_resource stage: type: string example: deploy name: type: string example: deploy_to_production ref: type: string example: main tag: type: boolean coverage: type: number format: float example: 98.29 allow_failure: type: boolean created_at: type: string format: date-time example: '2015-12-24T15:51:21.880Z' started_at: type: string format: date-time example: '2015-12-24T17:54:30.733Z' finished_at: type: string format: date-time example: '2015-12-24T17:54:31.198Z' erased_at: type: string format: date-time example: '2015-12-24T18:00:29.728Z' duration: type: number format: float example: 0.465 description: Time spent running queued_duration: type: number format: float example: 0.123 description: Time spent enqueued user: $ref: '#/definitions/API_Entities_User' commit: $ref: '#/definitions/API_Entities_Commit' pipeline: $ref: '#/definitions/API_Entities_Ci_PipelineBasic' failure_reason: type: string example: script_failure web_url: type: string example: https://example.com/foo/bar/-/jobs/1 project: type: object properties: ci_job_token_scope_enabled: type: string example: false required: - ci_job_token_scope_enabled artifacts_file: $ref: '#/definitions/API_Entities_Ci_JobArtifactFile' artifacts: type: array items: $ref: '#/definitions/API_Entities_Ci_JobArtifact' runner: $ref: '#/definitions/API_Entities_Ci_Runner' runner_manager: $ref: '#/definitions/API_Entities_Ci_RunnerManager' artifacts_expire_at: type: string format: date-time example: '2016-01-19T09:05:50.355Z' archived: type: boolean example: false tag_list: type: array items: type: string example: - ubuntu18 - docker runner required: - id - status - stage - name - ref - tag - coverage - allow_failure - created_at - started_at - finished_at - erased_at - duration - queued_duration - user - commit - pipeline - web_url - project - artifacts - runner - artifacts_expire_at - archived - tag_list description: API_Entities_Ci_Job model API_Entities_Deployment: type: object properties: id: type: integer format: int32 example: 41 iid: type: integer format: int32 example: 1 ref: type: string example: main sha: type: string example: 99d03678b90d914dbb1b109132516d71a4a03ea8 created_at: type: string format: date-time example: '2016-08-11T11:32:35.444Z' updated_at: type: string format: date-time example: '2016-08-11T11:32:35.444Z' user: $ref: '#/definitions/API_Entities_UserBasic' environment: $ref: '#/definitions/API_Entities_EnvironmentBasic' deployable: $ref: '#/definitions/API_Entities_Ci_Job' status: type: string example: created required: - id - iid - ref - sha - created_at - updated_at - user - environment - deployable - status description: API_Entities_Deployment model API_Entities_IssuableReferences: type: object properties: short: type: string example: '&6' relative: type: string example: '&6' full: type: string example: test&6 required: - short - relative - full API_Entities_DeploymentExtended: type: object properties: id: type: integer format: int32 example: 41 iid: type: integer format: int32 example: 1 ref: type: string example: main sha: type: string example: 99d03678b90d914dbb1b109132516d71a4a03ea8 created_at: type: string format: date-time example: '2016-08-11T11:32:35.444Z' updated_at: type: string format: date-time example: '2016-08-11T11:32:35.444Z' user: $ref: '#/definitions/API_Entities_UserBasic' environment: $ref: '#/definitions/API_Entities_EnvironmentBasic' deployable: $ref: '#/definitions/API_Entities_Ci_Job' status: type: string example: created pending_approval_count: type: integer format: int32 example: 0 approvals: $ref: '#/definitions/API_Entities_Deployments_Approval' approval_summary: $ref: '#/definitions/API_Entities_Deployments_ApprovalSummary' required: - id - iid - ref - sha - created_at - updated_at - user - environment - deployable - status - pending_approval_count - approvals - approval_summary description: API_Entities_DeploymentExtended model API_Entities_DeployKey: type: object properties: id: type: integer format: int32 example: 1 title: type: string example: Sample key 25 created_at: type: string format: date-time example: '2015-09-03T07:24:44.627Z' expires_at: type: string format: date-time example: '2020-09-03T07:24:44.627Z' last_used_at: type: string format: date-time example: '2020-09-03T07:24:44.627Z' key: type: string example: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDNJAkI3Wdf0r13c8a5pEExB2YowPWCSVzfZV22pNBc1CuEbyYLHpUyaD0GwpGvFdx2aP7lMEk35k6Rz3ccBF6jRaVJyhsn5VNnW92PMpBJ/P1UebhXwsFHdQf5rTt082cSxWuk61kGWRQtk4ozt/J2DF/dIUVaLvc+z4HomT41fQ== usage_type: type: string example: auth fingerprint: type: string example: 4a:9d:64:15:ed:3a:e6:07:6e:89:36:b3:3b:03:05:d9 fingerprint_sha256: type: string example: SHA256:Jrs3LD1Ji30xNLtTVf9NDCj7kkBgPBb2pjvTZ3HfIgU projects_with_write_access: $ref: '#/definitions/API_Entities_ProjectIdentity' projects_with_readonly_access: $ref: '#/definitions/API_Entities_ProjectIdentity' required: - id - title - created_at - expires_at - last_used_at - key - usage_type - fingerprint_sha256 description: API_Entities_DeployKey model API_Entities_Ci_JobArtifactFile: type: object properties: filename: type: string example: artifacts.zip size: type: integer format: int32 example: 1000 required: - filename - size API_Entities_TaskCompletionStatus: type: object properties: count: type: integer format: int32 example: 5 completed_count: type: integer format: int32 example: 3 required: - count - completed_count API_Entities_DeployToken: type: object properties: id: type: integer format: int32 example: 1 name: type: string example: MyToken username: type: string example: gitlab+deploy-token-1 expires_at: type: string format: date-time example: '2020-02-14T00:00:00.000Z' scopes: type: array example: - read_repository revoked: type: boolean expired: type: boolean required: - id - name - username - expires_at - scopes - revoked - expired description: API_Entities_DeployToken model securityDefinitions: access_token_header: type: apiKey name: PRIVATE-TOKEN in: header access_token_query: type: apiKey name: private_token in: query