172 lines
2.9 KiB
Markdown
172 lines
2.9 KiB
Markdown
# docker-repository-query
|
|
|
|
Base URL: `https://notifier.gansejunge.com/internal/docker-repository-query`
|
|
|
|
### `POST /repository/add`
|
|
|
|
**Add Repository Subscription**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Request body:**
|
|
|
|
```json
|
|
{
|
|
"type": "github",
|
|
"org": "string",
|
|
"repo": "string",
|
|
"tag": "string",
|
|
"custom_name": "string"
|
|
}
|
|
```
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/docker-repository-query/repository/add' \
|
|
-H 'X-API-Key: <api_key>' \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"type": "github", "org": "string", "repo": "string", "tag": "string", "custom_name": "string"}'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `POST /repository/delete`
|
|
|
|
**Delete Repository Subscription**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Request body:**
|
|
|
|
```json
|
|
{
|
|
"type": "github",
|
|
"org": "string",
|
|
"repo": "string",
|
|
"tag": "string",
|
|
"custom_name": "string"
|
|
}
|
|
```
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/docker-repository-query/repository/delete' \
|
|
-H 'X-API-Key: <api_key>' \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"type": "github", "org": "string", "repo": "string", "tag": "string", "custom_name": "string"}'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `GET /repository/list`
|
|
|
|
**List Subscribed Repositories**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X GET 'https://notifier.gansejunge.com/internal/docker-repository-query/repository/list' \
|
|
-H 'X-API-Key: <api_key>'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `POST /update/{repository_type}`
|
|
|
|
**Update Watched Repositories**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `repository_type` | path | string | yes |
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/docker-repository-query/update/<repository_type>' \
|
|
-H 'X-API-Key: <api_key>'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|