Commit bcbc5572 authored by Roger Rüttimann's avatar Roger Rüttimann

update documentation for orphaned artifacts deletion

parent b11c3e1f
Pipeline #54035548 failed with stages
in 9 minutes and 38 seconds
......@@ -24,6 +24,7 @@ The following API resources are available in the project context:
| Resource | Available endpoints |
|:------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Access requests](access_requests.md) | `/projects/:id/access_requests` (also available for groups) |
| [Artifacts](jobs.md#bulk-artifact-deletion) | `/projects/:id/artifacts` |
| [Award emoji](award_emoji.md) | `/projects/:id/issues/.../award_emoji`, `/projects/:id/merge_requests/.../award_emoji`, `/projects/:id/snippets/.../award_emoji` |
| [Branches](branches.md) | `/projects/:id/repository/branches/`, `/projects/:id/repository/merged_branches` |
| [Commits](commits.md) | `/projects/:id/repository/commits`, `/projects/:id/statuses` |
......
......@@ -730,15 +730,15 @@ If the artifacts were deleted successfully, a response with status `204 No Conte
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25973) in GitLab 11.10.
Delete multiple job artifacts of a project.
Delete orphaned job artifacts of a project.
```
DELETE /projects/:id/artifacts
```
| Attribute | Type | Required | Description |
|--------------------|----------------|----------|-----------------------------------------------------------------------------|
| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
| Attribute | Type | Required | Description |
|--------------------|----------------|----------|---------------------------------------------------------------------------------|
| `id` | integer/string | yes | ID or [URL-encoded path of the project](../README.md#namespaced-path-encoding). |
Example request:
......@@ -746,9 +746,14 @@ Example request:
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/artifacts/clean"
```
Possible response status codes:
| Status | Description |
|-----------|-------------------------------------------------------------------------------------------------|
| 202 | Request was accepted and a background job to delete the orphaned artifacts has been started. |
NOTE: **Note:**
At least Maintainer role is required to delete artifacts.
A response with status `202 Accepted` is returned if the bulk deletion request was processed.
## Play a job
......
......@@ -67,7 +67,6 @@ describe Ci::JobArtifact do
end
end
describe 'callbacks' do
subject { create(:ci_job_artifact, :archive) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment