Skip to content

Commit b0a3b5e

Browse files
committed
- Version 2.6.8
+ REST-API + IP Restrictions
1 parent 20a5a32 commit b0a3b5e

File tree

15 files changed

+996
-193
lines changed

15 files changed

+996
-193
lines changed

Docs/REST-API.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# 🚀 Winget-Repo REST API Documentation
2+
3+
This document provides a complete overview of all available REST API endpoints for the **Winget-Repo** service.
4+
5+
## 📑 Documentation
6+
1. Login to Winget-Repo
7+
2. Open the Server Settings
8+
3. Click the Ethernet Symbol in the upper right corner
9+
10+
## 🔐 Authentication
11+
12+
### **POST /login**
13+
14+
Authenticate a user and receive a **Bearer token**.
15+
- Token lifetime: **1 hour**
16+
- Token is suspended after **1 hour of inactivity**
17+
18+
### **POST /logout**
19+
20+
Invalidate the currently active Bearer token.
21+
22+
### **GET /test**
23+
24+
Check API availability and validate Bearer authentication.
25+
- **Requires Bearer Token**
26+
27+
## 🖥️ Winget-Repo Client
28+
29+
### **POST /client_version**
30+
31+
Retrieve the latest Winget-Repo Client version.
32+
- **Requires Bearer Token**
33+
- Also requires **Client Authentication Token** when client authentication is enabled
34+
35+
## 📦 Packages
36+
37+
### **POST /get_packages**
38+
39+
Retrieve all packages including versions and Base64-encoded logos.
40+
- **Requires Bearer Token**
41+
- Also requires **Client Authentication Token** when enabled
42+
43+
### **POST /add_package**
44+
45+
Create a new package.
46+
- **Requires Bearer Token**
47+
48+
### **PATCH /edit_package/{package_id}**
49+
50+
Edit an existing package.
51+
- **Requires Bearer Token**
52+
53+
### **DELETE /delete_package/{package_id}**
54+
55+
Delete a package.
56+
- **Requires Bearer Token**
57+
58+
## 🔢 Package Versions
59+
60+
### **GET /get_package_versions/{package_id}**
61+
62+
Retrieve all versions of a specific package.
63+
- **Requires Bearer Token**
64+
65+
### **GET /get_specific_package_version/{version_uid}**
66+
67+
Retrieve detailed information about a specific package version.
68+
- **Requires Bearer Token**
69+
70+
### **POST /add_package_version/{package_id}**
71+
72+
Add a new version to an existing package.
73+
- **Requires Bearer Token**
74+
75+
### **DELETE /delete_package_version/{package_id}**
76+
77+
Delete one or multiple package versions.
78+
- **Requires Bearer Token**

Docs/Settings.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,26 @@ This document describes the configuration options available in the **Winget-Repo
66

77
## 🔧 Server Settings Table
88

9-
| **Name** | **Description** |
10-
|----------------------------------------------|---------------------------------------------------------------------------------|
9+
| **Name** | **Description** |
10+
|----------------------------------------------|--------------------------------------------------------------------------------|
1111
| **Server Name (Max. 12)** | Sets the name of your Winget server (max 12 characters). Appears in the UI. |
1212
| **Winget-Client Versions** | Lists the compatible Winget client versions separated by commas. |
1313
| **Client Authentication** | Enables client-side authentication for secure access. |
1414
| **DNS Server** | IP address of the DNS server used for client resolution and authentication. |
1515
| **Domain Suffix** | The DNS suffix applied to clients during authentication. (e.g. fritz.box) |
1616
| **Enable Terms of Service** | Option to enable/require acceptance of Terms of Service for the winget client. |
1717
| **Enable Package Store (Internet required)** | Enables online package store integration (requires internet access). |
18+
| **IP Restriction** | Enables ip restriction to single ips or ip ranges. |
19+
20+
---
21+
22+
## IP Restriction
23+
24+
You can allow the following:
25+
- Disabled: DEFAULT
26+
- IPs: 192.168.1.1
27+
- IP-Ranges: 192.168.1.1-192.168.1.100
28+
- Both: Separated by , or ;
1829

1930
---
2031

0 commit comments

Comments
 (0)