summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_info.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/server/register_info.go')
-rw-r--r--pkg/api/server/register_info.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkg/api/server/register_info.go b/pkg/api/server/register_info.go
new file mode 100644
index 000000000..797158553
--- /dev/null
+++ b/pkg/api/server/register_info.go
@@ -0,0 +1,28 @@
+package server
+
+import (
+ "net/http"
+
+ "github.com/containers/libpod/pkg/api/handlers/generic"
+ "github.com/gorilla/mux"
+)
+
+func (s *APIServer) registerInfoHandlers(r *mux.Router) error {
+ // swagger:operation GET /info libpod getInfo
+ //
+ // Returns information on the system and libpod configuration
+ //
+ // ---
+ // produces:
+ // - application/json
+ // responses:
+ // '200':
+ // schema:
+ // "$ref": "#/types/Info"
+ // '500':
+ // description: unexpected error
+ // schema:
+ // "$ref": "#/types/ErrorModel"
+ r.Handle(VersionedPath("/info"), APIHandler(s.Context, generic.GetInfo)).Methods(http.MethodGet)
+ return nil
+}