- GitLab API v4
- Topics
- Endpoints
- access_requests
- List access requests for a project
- Requests access for the authenticated user to a project
- Approves access for the authenticated user to a project
- Denies a project access request for the given user
- Denies a project access request for the given user
- List access requests for a group
- Requests access for the authenticated user to a group
- Approves access for the authenticated user to a group
- Denies a group access request for the given user
- access_tokens
- Retrieve metadata information for this GitLab instance
- Retrieve metadata information for this GitLab instance
- access_requests
- application
- ci
- deploy_keys
- dockerfiles
- gitignores
- gitlab_ci_ymls
- groups
- Get a groups list
- Create a group. Available only for users who can create groups.
- Get list of owned groups for authenticated user
- Remove a group.
- Get a single group, with containing projects.
- Update a group. Available only for users who can administrate groups.
- Gets a list of access requests for a group.
- Requests access for the authenticated user to a group.
- Denies an access request for the given user.
- Approves an access request for the given user.
- Get a list of group issues
- Gets a list of group or project members viewable by the authenticated user.
- Adds a member to a group or project.
- Removes a user from a group or project.
- Gets a member of a group or project.
- Updates a member of a group or project.
- Get group level notification level settings, defaults to Global
- Update group level notification level settings, defaults to Global
- Get a list of projects in this group.
- Transfer a project to the group namespace. Available only for admin.
- hooks
- internal
- issues
- keys
- licenses
- namespaces
- notification_settings
- projects
- Get a projects list for authenticated userGET
- Create new projectPOST
- Get all projects for admin userGET
- Fork new project for the current user or provided namespace.POST
- Get an owned projects list for authenticated userGET
- Search for projects the current user has access toGET
- Gets starred project for the authenticated userGET
- Create new project for a specified user. Only available to admin users.POST
- Get a list of visible projects for authenticated userGET
- Remove a projectDELETE
- Get a single projectGET
- Update an existing projectPUT
- Trigger a GitLab project buildPOST
- Gets a list of access requests for a project.GET
- Requests access for the authenticated user to a project.POST
- Denies an access request for the given user.DELETE
- Approves an access request for the given user.PUT
- Archive a projectPOST
- Get all project boardsGET
- Get the lists of a project boardGET
- Create a new board listPOST
- Delete a board listDELETE
- Get a list of a project boardGET
- Moves a board list to a new positionPUT
- Get a project buildsGET
- Download the artifacts file from buildGET
- Get a specific build of a projectGET
- Download the artifacts file from buildGET
- Keep the artifacts to prevent them from being deletedPOST
- Cancel a specific build of a projectPOST
- Erase build (remove artifacts and build trace)POST
- Trigger a manual buildPOST
- Retry a specific build of a projectPOST
- Get a trace of a specific build of a projectGET
- Get a specific project's deploy keysGET
- Add new deploy key to currently authenticated userPOST
- Delete deploy key for a projectDELETE
- Get single deploy keyGET
- Disable a deploy key for a projectDELETE
- Enable a deploy key for a projectPOST
- Get all deployments of the projectGET
- Gets a specific deploymentGET
- Get all environments of the projectGET
- Creates a new environmentPOST
- Deletes an existing environmentDELETE
- Updates an existing environmentPUT
- Get events for a single projectGET
- Remove a forked_from relationshipDELETE
- Mark this project as forked from anotherPOST
- Get project hooksGET
- Add hook to projectPOST
- Deletes project hookDELETE
- Get a project hookGET
- Update an existing project hookPUT
- Get a list of project issuesGET
- Create a new project issuePOST
- Delete a project issueDELETE
- Get a single project issueGET
- Update an existing issuePUT
- Add spent time for a project issuePOST
- Get a list of project +awardable+ award emojiGET
- Award a new EmojiPOST
- Delete a +awardables+ award emojiDELETE
- Get a specific award emojiGET
- Move an existing issuePOST
- Get a list of project +awardable+ award emojiGET
- Award a new EmojiPOST
- Delete a +awardables+ award emojiDELETE
- Get a specific award emojiGET
- Reset spent time for a project issuePOST
- Reset the time estimate for a project issuePOST
- Set a time estimate for a project issuePOST
- Show time stats for a project issueGET
- Create a todo on an issuablePOST
- Get a list of project +noteable+ notesGET
- Create a new +noteable+ notePOST
- Delete a +noteable+ noteDELETE
- Get a single +noteable+ noteGET
- Update an existing +noteable+ notePUT
- Unsubscribe from a resourceDELETE
- Subscribe to a resourcePOST
- Get a specific project's deploy keysGET
- Add new deploy key to currently authenticated userPOST
- Delete deploy key for a projectDELETE
- Get single deploy keyGET
- Disable a deploy key for a projectDELETE
- Enable a deploy key for a projectPOST
- Delete an existing labelDELETE
- Get all labels of the projectGET
- Create a new labelPOST
- Update an existing label. At least one optional parameter is required.PUT
- Unsubscribe from a resourceDELETE
- Subscribe to a resourcePOST
- Gets a list of group or project members viewable by the authenticated user.GET
- Adds a member to a group or project.POST
- Removes a user from a group or project.DELETE
- Gets a member of a group or project.GET
- Updates a member of a group or project.PUT
- Get a single merge requestGET
- Update a merge requestPUT
- Cancel merge if "Merge When Pipeline Succeeds" is enabledPOST
- Show the merge request changesGET
- List issues that will be closed on mergeGET
- Get the comments of a merge requestGET
- Post a comment to a merge requestPOST
- Get the commits of a merge requestGET
- Merge a merge requestPUT
- Unsubscribe from a resourceDELETE
- Subscribe to a resourcePOST
- List merge requestsGET
- Create a merge requestPOST
- Delete a merge requestDELETE
- Get a single merge requestGET
- Update a merge requestPUT
- Add spent time for a project merge_requestPOST
- Get a list of project +awardable+ award emojiGET
- Award a new EmojiPOST
- Delete a +awardables+ award emojiDELETE
- Get a specific award emojiGET
- Cancel merge if "Merge When Pipeline Succeeds" is enabledPOST
- Show the merge request changesGET
- List issues that will be closed on mergeGET
- Get the comments of a merge requestGET
- Post a comment to a merge requestPOST
- Get the commits of a merge requestGET
- Merge a merge requestPUT
- Get a list of project +awardable+ award emojiGET
- Award a new EmojiPOST
- Delete a +awardables+ award emojiDELETE
- Get a specific award emojiGET
- Reset spent time for a project merge_requestPOST
- Reset the time estimate for a project merge_requestPOST
- Set a time estimate for a project merge_requestPOST
- Show time stats for a project merge_requestGET
- Create a todo on an issuablePOST
- Get a list of merge request diff versionsGET
- Get a single merge request diff versionGET
- Get a list of project +noteable+ notesGET
- Create a new +noteable+ notePOST
- Delete a +noteable+ noteDELETE
- Get a single +noteable+ noteGET
- Update an existing +noteable+ notePUT
- Unsubscribe from a resourceDELETE
- Subscribe to a resourcePOST
- Get a list of project milestonesGET
- Create a new project milestonePOST
- Get a single project milestoneGET
- Update an existing project milestonePUT
- Get all issues for a single project milestoneGET
- Get project level notification level settings, defaults to GlobalGET
- Update project level notification level settings, defaults to GlobalPUT
- Create a new pipelinePOST
- Get all Pipelines of the projectGET
- Gets a specific pipeline for the projectGET
- Cancel all builds in the pipelinePOST
- Retry failed builds in the pipelinePOST
- Get an archive of the repositoryGET
- Get a raw file contentsGET
- Get a project repository branchesGET
- Create branchPOST
- Delete a branchDELETE
- Get a single branchGET
- Protect a single branchPUT
- Unprotect a single branchPUT
- Get a project repository commitsGET
- Commit multiple file changes as one commitPOST
- Get a specific commit of a projectGET
- Get a raw file contentsGET
- Get builds for a specific commit of a projectGET
- Cherry pick commit into a branchPOST
- Get a commit's commentsGET
- Post comment to commitPOST
- Get the diff for a specific commit of a projectGET
- Get a commit's statusesGET
- Compare two branches, tags, or commitsGET
- Get repository contributorsGET
- Delete an existing file in repositoryDELETE
- Get a file from repositoryGET
- Create new file in repositoryPOST
- Update existing file in repositoryPUT
- /v3/projects/{id}/repository/merged_branchesDELETE
- Get a raw blob contents by blob shaGET
- Get a project repository tagsGET
- Create a new repository tagPOST
- Delete a repository tagDELETE
- Get a single repository tagGET
- Add a release note to a tagPOST
- Update a tag's release notePUT
- Get a project repository treeGET
- Get runners available for projectGET
- Enable a runner for a projectPOST
- Disable project's runnerDELETE
- Set asana service for projectPUT
- Set assembla service for projectPUT
- Set bamboo service for projectPUT
- Set bugzilla service for projectPUT
- Set buildkite service for projectPUT
- Set builds-email service for projectPUT
- Set campfire service for projectPUT
- Set custom-issue-tracker service for projectPUT
- Set drone-ci service for projectPUT
- Set emails-on-push service for projectPUT
- Set external-wiki service for projectPUT
- Set flowdock service for projectPUT
- Set gemnasium service for projectPUT
- Set hipchat service for projectPUT
- Set irker service for projectPUT
- Set jira service for projectPUT
- Set kubernetes service for projectPUT
- Set mattermost service for projectPUT
- Set mattermost-slash-commands service for projectPUT
- Trigger a slash command for mattermost-slash-commandsPOST
- Set pipelines-email service for projectPUT
- Set pivotaltracker service for projectPUT
- Set pushover service for projectPUT
- Set redmine service for projectPUT
- Set slack service for projectPUT
- Set slack-slash-commands service for projectPUT
- Trigger a slash command for slack-slash-commandsPOST
- Set teamcity service for projectPUT
- Delete a service for projectDELETE
- Get the service settings for projectGET
- Share the project with a groupPOST
- /v3/projects/{id}/share/{group_id}DELETE
- Get all project snippetsGET
- Create a new project snippetPOST
- Get a list of project +noteable+ notesGET
- Create a new +noteable+ notePOST
- Delete a +noteable+ noteDELETE
- Get a single +noteable+ noteGET
- Update an existing +noteable+ notePUT
- Delete a project snippetDELETE
- Get a single project snippetGET
- Update an existing project snippetPUT
- Get a list of project +awardable+ award emojiGET
- Award a new EmojiPOST
- Delete a +awardables+ award emojiDELETE
- Get a specific award emojiGET
- Get a list of project +awardable+ award emojiGET
- Award a new EmojiPOST
- Delete a +awardables+ award emojiDELETE
- Get a specific award emojiGET
- Get a raw project snippetGET
- Unstar a projectDELETE
- Star a projectPOST
- Post status to a commitPOST
- Get triggers listGET
- Create a triggerPOST
- Delete a triggerDELETE
- Get specific trigger of a projectGET
- Unarchive a projectPOST
- Upload a filePOST
- Get the users list of a projectGET
- Get project variablesGET
- Create a new variable in a projectPOST
- Delete an existing variable from a projectDELETE
- Get a specific variable from a projectGET
- Update an existing variable from a projectPUT
- runners
- session
- sidekiq
- snippets
- templates
- Get the list of the available template
- Get the text for a specific template present in local filesystem
- Get the list of the available template
- Get the text for a specific template present in local filesystem
- Get the list of the available template
- Get the text for a specific template present in local filesystem
- Get the list of the available license template
- Get the text for a specific license
- todos
- user
- Get the currently authenticated user
- Get the currently authenticated user's email addresses
- Add new email address to the currently authenticated user
- Delete an email address from the currently authenticated user
- Get a single email address owned by the currently authenticated user
- Get the currently authenticated user's SSH keys
- Add a new SSH key to the currently authenticated user
- Delete an SSH key from the currently authenticated user
- Get a single key owned by currently authenticated user
- users
- Get the list of users
- Create a user. Available only for admins.
- Delete a user. Available only for admins.
- Get a single user
- Update a user. Available only for admins.
- Block a user. Available only for admins.
- Get the emails addresses of a specified user. Available only for admins.
- Add an email address to a specified user. Available only for admins.
- Delete an email address of a specified user. Available only for admins.
- Get the contribution events of a specified user
- Get the SSH keys of a specified user. Available only for admins.
- Add an SSH key to a specified user. Available only for admins.
- Delete an existing SSH key from a specified user. Available only for admins.
- Unblock a user. Available only for admins.
- version
Erase build (remove artifacts and build trace)
POST
/v3/projects/{id}/builds/{build_id}/erase
projects
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://gitlab.com/api/v3/projects//builds//erase'
Response Response Example
{
"artifacts_file": {
"filename": "string",
"size": "string"
},
"commit": {
"author_email": "string",
"author_name": "string",
"committer_email": "string",
"committer_name": "string",
"created_at": "string",
"id": "string",
"message": "string",
"short_id": "string",
"title": "string"
},
"coverage": "string",
"created_at": "string",
"finished_at": "string",
"id": "string",
"name": "string",
"pipeline": {
"id": "string",
"ref": "string",
"sha": "string",
"status": "string"
},
"ref": "string",
"runner": {
"active": "string",
"description": "string",
"id": "string",
"is_shared": "string",
"name": "string"
},
"stage": "string",
"started_at": "string",
"status": "string",
"tag": "string",
"user": {
"avatar_url": "string",
"bio": "string",
"created_at": "string",
"id": "string",
"is_admin": "string",
"linkedin": "string",
"location": "string",
"name": "string",
"organization": "string",
"skype": "string",
"state": "string",
"twitter": "string",
"username": "string",
"web_url": "string",
"website_url": "string"
}
}
Request
Path Params
id
stringÂ
required
build_id
integerÂ
required
Responses
🟢201Erase build (remove artifacts and build trace)
application/json
Body
This feature was added in GitLab 8.11
artifacts_file
object (BuildArtifactFile)Â
optional
filename
stringÂ
optional
size
stringÂ
optional
commit
object (RepoCommit)Â
optional
author_email
stringÂ
optional
author_name
stringÂ
optional
committer_email
stringÂ
optional
committer_name
stringÂ
optional
created_at
stringÂ
optional
id
stringÂ
optional
message
stringÂ
optional
short_id
stringÂ
optional
title
stringÂ
optional
coverage
stringÂ
optional
created_at
stringÂ
optional
finished_at
stringÂ
optional
id
stringÂ
optional
name
stringÂ
optional
pipeline
object (PipelineBasic)Â
optional
id
stringÂ
optional
ref
stringÂ
optional
sha
stringÂ
optional
status
stringÂ
optional
ref
stringÂ
optional
runner
object (Runner)Â
optional
active
stringÂ
optional
description
stringÂ
optional
id
stringÂ
optional
is_shared
stringÂ
optional
name
stringÂ
optional
stage
stringÂ
optional
started_at
stringÂ
optional
status
stringÂ
optional
tag
stringÂ
optional
user
object (User)Â
optional
avatar_url
stringÂ
optional
bio
stringÂ
optional
created_at
stringÂ
optional
id
stringÂ
optional
is_admin
stringÂ
optional
linkedin
stringÂ
optional
location
stringÂ
optional
name
stringÂ
optional
organization
stringÂ
optional
skype
stringÂ
optional
state
stringÂ
optional
twitter
stringÂ
optional
username
stringÂ
optional
web_url
stringÂ
optional
website_url
stringÂ
optional
Modified at 2023-08-15 04:14:33