This commit is contained in:
André Roth
2024-11-02 18:09:43 +01:00
parent c055611914
commit 8f8de4bd29
17 changed files with 107 additions and 86 deletions
-52
View File
@@ -1,4 +1,3 @@
Using aptly via REST API allows to achieve two goals:
1. Remote access to aptly service: e.g. uploading packages and publishing them from CI server.
@@ -59,54 +58,3 @@ Aptly's HTTP API shouldn't be directly exposed to the Internet: there's no authe
1. GPG key passphrase can't be input on console, so either passwordless GPG keys are required or passphrase should be specified in API parameters.
1. Some script might be required to start/stop aptly HTTP service.
1. Some parameters are given as part of URLs, which requires proper url encoding. Unfortunately, at the moment it's not possible to pass URL arguments with `/` in them.
### How to implement equivalent of aptly commands using API
* `aptly mirror`: [mirror API](/doc/api/mirror)
* `list`: list
* `create`: create
* `drop`: delete
* `show`: show
* `search`: show packages/search
* `update`: update mirror
* `aptly repo`: [local repos API](/doc/api/repos)
* `add`: [file upload API](/doc/api/files) + add packages from uploaded file
* `copy`: show packages/search + add packages by key
* `create`: create
* `drop`: delete
* `edit`: edit
* `import`: not available, as mirror API is not implemented yet
* `list`: list
* `move`: show packages/search + add packages by key + delete packages by key
* `remove`: show packages/search + delete packages by key
* `rename`: not available yet, should be part of edit API
* `search`: show packages/search
* `show`: show
* `aptly snapshot`: [snapshots API](/doc/api/snapshots)
* `create`:
* empty: create snapshot with empty package references
* from mirror: not available yet
* from local repo: create snapshot from local repo
* `diff`: snapshot difference API
* `drop`: delete
* `filter`: show packages/search + create snapshot from package references
* `list`: list
* `merge`: show packages/search + processing + create snapshot from package references
* `pull`: show packages/search + processing + create snapshot from package references (might be implemented as API in future versions)
* `rename`: edit
* `search`: show packages/search
* `show`: show
* `verify`: not available yet
* `aptly publish`: [publish API](/doc/api/publish)
* `drop`: delete
* `list`: list
* `repo`: publish repo
* `snapshot`: publish snapshot
* `switch`: switch/update
* `update`: switch/update
* `aptly package`: [packages API](/doc/api/packages)
* `search`: not available yet
* `show`: only one format, with package key as input
* `aptly graph`: [graph API](/doc/api/misc)
* `aptly version`: [version API](/doc/api/misc)
* `aptly db`: not available yet