Commit Graph

54 Commits

Author SHA1 Message Date
Christoph Fiehe
bd64232eb6 Allow management of components
This commit allows to add, remove and update components of published repositories without the need to recreate them.

Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
2024-10-22 16:58:15 +02:00
André Roth
d6a156b181 Merge pull request #1162 from aptly-dev/feature/176-snapshot-pull-api
Snapshot Pull API
2024-10-03 23:07:27 +02:00
André Roth
38ea720fc5 snapshot merge: use proper REST api
- this breaks the existing api, which is only available in CI builds
- improve swagger doc
2024-10-03 17:34:29 +02:00
André Roth
06b2b920da make REST api more restful 2024-10-03 14:51:45 +02:00
Mauro Regli
af5b04b24f Feature: Add Pull Snapshot API 2024-10-03 14:25:46 +02:00
André Roth
06cbd29d0d add storage API 2024-10-02 18:48:48 +02:00
André Roth
1d1bd41bb8 add swagger support
- install swaggo
- add swagger config option
2024-10-01 01:07:09 +02:00
Sylvain Nieuwlandt
8114786179 Declare the Copy API 2024-07-10 16:43:03 +02:00
André Roth
b5b0a52cbe s3 api: get publish root list 2024-04-03 10:14:01 +02:00
Markus Muellner
9c6f896666 add endpoint for listing repos while serving in api mode and add more metrics 2023-03-22 17:22:54 +01:00
Markus Muellner
0fdba29d51 make serving published repos in api mode configurable 2023-03-22 17:22:54 +01:00
Андрей Лухнов
e25ade8af3 Serve api and published repos simultaneously
refs #1017 #975
2023-03-22 17:22:54 +01:00
Mauro Regli
77e02bf7a3 Feature: Add Merge Snapshot API
Is part of Issue #176
2023-03-14 08:38:55 +01:00
Mauro Regli
c187b0d52c Fix: Switch gin mode depending on aptly.EnableDebug
If aptly.EnableDebug is active, we use Debug, otherwise we use
gin.ReleaseMode to remove the annoying nuding messages when running the
api.

fixes: #1103
2023-03-07 13:04:12 +01:00
Markus Muellner
8e62195eb5 implement structured logging 2023-02-20 13:42:50 +01:00
Markus Muellner
ecc41f0c0f replace AbortWithError calls by custom function that sets the content type correctly 2023-01-23 10:42:57 +01:00
Markus Muellner
2020ca9971 add ready and healthy probe endpoints 2022-12-12 13:39:07 +01:00
Sjoerd Simons
393d1a6888 api: Allow querying the packages endpoint
The ".../packages" endpoints for mirror, local repos and snapshots all
share the same syntax for querying. However the "/api/packages" endpoint
doesn't match this. Adjust that to allow for a bit more consistency and
allow querying the full package database.

The current endpoint functionality "/packages/:name" is kept intact and
can be used the same as now

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2022-08-29 10:28:44 +02:00
Sjoerd Simons
29deae6fe0 api: allow parameters with urlencoded names
Aptly allows create e.g. repos with a / to use those with the REST api
the router needs to allow urlencoded parameters in various places to
represent this. A specific example of this is the /api/repos/:name/packages path

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2022-06-15 17:21:15 +02:00
Markus Muellner
6539e1b856 Add metrics endpoint with http metrics using Prometheus client lib 2022-04-12 14:39:16 +02:00
Lorenzo Bolla
ff51c46915 More informative return value for task.Process 2022-01-27 09:30:14 +01:00
Lorenzo Bolla
9b28d8984f Configurable background task execution 2022-01-27 09:30:14 +01:00
Oliver Sauder
b4efe6a810 Add db cleanup api 2022-01-27 09:30:14 +01:00
Oliver Sauder
b0ab8f417d Added gpg api so mirror updates are fully functional from api 2022-01-27 09:30:14 +01:00
Oliver Sauder
d7ccf95499 Added mirror api based on task list 2022-01-27 09:30:14 +01:00
Oliver Sauder
6ab5e60833 Add task api and resource locking ability 2022-01-27 09:30:14 +01:00
Oliver Sauder
208a2151c1 every go routine needs to have its own collection factory
this is needed so concurrent reads and writes are possible.
2022-01-27 09:30:14 +01:00
Oliver Sauder
f1882cfe2c Expose repo include through API 2018-06-19 15:39:09 +02:00
Andrey Smirnov
b8c5303fdb Fix paths after repository transfer to aptly-dev 2018-04-18 21:19:43 +03:00
Andrey Smirnov
3756db2491 Upgrade gin-gonic to latest master, fix compatibility issues 2017-09-28 00:33:59 +03:00
Andrey Smirnov
211ac0501f Rework the way database is open/re-open in aptly
Allow database to be initialized without opening, unify all the
open paths to retry on failure.

In API router make sure open requests are matched with acks in explicit
way.

This also enables re-open attempts in all the aptly commands, so it
should make running aptly CLI much easier now hopefully.

Fix up system tests for oldoldstable ;)
2017-07-05 00:17:48 +03:00
Andrey Smirnov
39d2d273dc Fix possible cause for spurious 500s
When DB fails to be open, aptly was skipping "close" phase, so that next
request considered database to be still open (while it's closed) leading
to panic.

Fixes: #431
2017-05-16 00:42:59 +03:00
Andrey Smirnov
11d828b3b1 Add govet/golint into Travis CI build
Fix current issues
2017-03-22 21:49:16 +03:00
Vincent Bernat
7f6a52019f Add a flag to unlock database after each API request
After the first API request, the database was locked as long as the API
server is running. This prevents a user to also use the command-line
client. This commit adds a new flag `-no-lock` that will close the
database after each API request.

Closes #234
2015-10-02 20:04:48 +02:00
Andrey Smirnov
2f1afa54c2 Publish update/drop APIs, rework prefix, move publishing APIs. #116 2015-03-01 19:55:02 +03:00
Andrey Smirnov
e33a2a6f96 Reverting, as this change was making API LESS RESTful. My bad.
Revert "Make snapshot creation API more RESTful: accept snapshot name from URL. #116"

This reverts commit 06dc1ef9a4.
2015-02-28 19:55:09 +03:00
Andrey Smirnov
06dc1ef9a4 Make snapshot creation API more RESTful: accept snapshot name from URL. #116 2015-02-28 19:32:28 +03:00
Andrey Smirnov
c737b8c544 Flush CollectionFactory every 15 minutes. #116 2015-02-16 00:46:31 +03:00
Andrey Smirnov
a582493a6e Packages show API with tests. #116 2015-02-07 18:50:52 +03:00
Andrey Smirnov
ebea4f10a0 Make snapshot diff GET, not POST (as it doesn't change anything in the system). #168 2015-01-24 21:51:33 +03:00
Andrey Smirnov
7c3629337c Merge branch 'snapshot-api' of https://github.com/lebauce/aptly into lebauce-snapshot-api
Conflicts:
	api/router.go
	system/t12_api/__init__.py
2015-01-22 21:29:58 +03:00
Andrey Smirnov
2816647809 Allow to generate graph in formats supported by dot. #169 2015-01-13 19:22:24 +03:00
Andrey Smirnov
b50cb70a0e Merge branch 'graph-api' of https://github.com/lebauce/aptly into lebauce-graph-api 2015-01-13 19:04:07 +03:00
Andrey Smirnov
d489694ea9 Refactoring: simplify version generation. Rename API to /api/version. #167 2015-01-13 18:47:41 +03:00
Sylvain Baubeau
6c7f3b3bbd Add /api route to show API version #116 2015-01-12 10:56:54 +01:00
Sylvain Baubeau
38cb6bd133 Graph REST API #116 2015-01-12 10:56:28 +01:00
Andrey Smirnov
98ca0cdf33 Publish repo REST API. #116 2015-01-07 16:11:34 +03:00
Sylvain Baubeau
dd9fc8e40e Allow API creation of snapshots using package references 2014-12-18 18:17:43 +01:00
Sylvain Baubeau
85f38cd739 Allow setting description on snapshots using API 2014-12-18 11:55:54 +01:00
Sylvain Baubeau
c733129de9 Add search API for packages in snapshots 2014-12-18 11:16:49 +01:00