mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-08 05:50:47 +00:00
swagger: cleanup files doc
This commit is contained in:
+4
-76
@@ -1,84 +1,12 @@
|
||||
# Upload Package Files
|
||||
<div>
|
||||
Upload package files temporarily to aptly service. These files
|
||||
could be added to local repositories using [local repositories API](/doc/api/repos).
|
||||
|
||||
All uploaded files are stored under `<rootDir>/upload` directory (see [configuration](/doc/configuration)).
|
||||
This directory would be created automatically if it doesn't exist.
|
||||
In order to add debian package files to a local repository, files are first uploaded to a temporary directory.
|
||||
Then the directory (or a specific file within) is added to a repository. After adding to a repositorty, the directory resp. files are removed bt default.
|
||||
|
||||
Uploaded files are grouped by directories to support concurrent uploads from multiple
|
||||
package sources. Local repos add API can operate on directory (adding all files from directory) or
|
||||
on individual package files. By default, all successfully added package files would be removed.
|
||||
All uploaded files are stored under `<rootDir>/upload/<tempdir>` directory.
|
||||
|
||||
### List Directories
|
||||
For concurrent uploads from CI/CD pipelines, make sure the tempdir is unique.
|
||||
|
||||
`GET /api/files`
|
||||
|
||||
List all directories.
|
||||
|
||||
Response: list of directory names.
|
||||
|
||||
Example:
|
||||
|
||||
$ curl http://localhost:8080/api/files
|
||||
["aptly-0.9"]
|
||||
|
||||
### Upload File(s)
|
||||
|
||||
`POST /api/files/:dir`
|
||||
|
||||
Parameter `:dir` is upload directory name. Directory would be created if it doesn't exist.
|
||||
|
||||
Any number of files can be uploaded in one call, aptly would preserve filenames. No check is performed
|
||||
if existing uploaded would be overwritten.
|
||||
|
||||
Response: list of uploaded files as `:dir/:file`.
|
||||
|
||||
Example:
|
||||
|
||||
$ curl -X POST -F file=@aptly_0.9~dev+217+ge5d646c_i386.deb http://localhost:8080/api/files/aptly-0.9
|
||||
["aptly-0.9/aptly_0.9~dev+217+ge5d646c_i386.deb"]
|
||||
|
||||
### List Files in Directory
|
||||
|
||||
`GET /api/files/:dir`
|
||||
|
||||
Returns list of files in directory.
|
||||
|
||||
Response: list of filenames.
|
||||
|
||||
HTTP Errors:
|
||||
|
||||
Code | Description
|
||||
----------|-------------------------
|
||||
404 | directory doesn't exist
|
||||
|
||||
Example:
|
||||
|
||||
$ curl http://localhost:8080/api/files/aptly-0.9
|
||||
["aptly_0.9~dev+217+ge5d646c_i386.deb"]
|
||||
|
||||
|
||||
### Delete Directory
|
||||
|
||||
`DELETE /api/files/:dir`
|
||||
|
||||
Deletes all files in upload directory and directory itself.
|
||||
|
||||
Example:
|
||||
|
||||
$ curl -X DELETE http://localhost:8080/api/files/aptly-0.9
|
||||
{}
|
||||
|
||||
### Delete File in Directory
|
||||
|
||||
`DELETE /api/files/:dir/:file`
|
||||
|
||||
Delete single file in directory.
|
||||
|
||||
Example:
|
||||
|
||||
$ curl -X DELETE http://localhost:8080/api/files/aptly-0.9/aptly_0.9~dev+217+ge5d646c_i386.deb
|
||||
{}
|
||||
|
||||
</div>
|
||||
|
||||
+4
-6
@@ -1,11 +1,9 @@
|
||||
# Manage Local Repositories
|
||||
<div>
|
||||
Local repository is a collection of packages (most usually custom packages created internally).
|
||||
Packages could be added to local repository at any moment, removed, moved or copied between repos.
|
||||
Multiple versions of the same package could be added to the repository.
|
||||
In order to capture current repository state, [create snapshot](/doc/aptly/snapshot/create/).
|
||||
A local repository is a collection of versionned packages (usually custom packages created internally).
|
||||
|
||||
Local repositories could be published either [directly](/doc/aptly/publish/repo/)
|
||||
or from [snapshot](/doc/aptly/publish/snapshot).
|
||||
Packages can be added, removed, moved or copied between repos.
|
||||
|
||||
Local repositories can be published (either directly or via snapshot) to be used a APT source on a debian based system.
|
||||
</div>
|
||||
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ window.onload = function() {
|
||||
|
||||
window.ui = ui
|
||||
|
||||
setTimeout(collapseAll, 700);
|
||||
setTimeout(collapseAll, 50);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user