List monitors end points doesnt return notificationids or tagids
- 主要語言
- Go
- 星號
- 1.2k
- 分支
- 69
- PR 合併指標
- 30 天內沒有已合併 PR
描述
**Describe the bug**
When calling /api/v1/monitors notificationids are missing along with tagids the current response looks like
`{
"id": "d02a0a3e-8c7a-41ea-9df7-0b5f9ebf53d9",
"type": "http",
"name": "containerName",
"interval": 60,
"timeout": 30,
"max_retries": 0,
"retry_interval": 60,
"resend_interval": 0,
"active": true,
"status": 1,
"config": "{\"accepted_statuscodes\":[\"2XX\"],\"authMethod\":\"none\",\"encoding\":\"text\",\"method\":\"GET\",\"url\":\"https://someurl.com//\"}",
"proxy_id": "",
"push_token": "",
"created_at": "2025-11-05T13:46:09.805365Z",
"updated_at": "2025-11-05T14:14:01.692996Z"
}`
This is causing issues using terraform as it puts in notificationids but cant see them when it tries to refresh
state.
> │ Error: Provider produced inconsistent result after apply
│
│ When applying changes to module.modulename.peekaping_monitor.website[0], provider "provider[\"registry.terraform.io/tafaust/peekaping\"]" produced an unexpected
│ new value: .notification_ids: element 0 has vanished.
**Database**
Tested on sqlite bundle
- sqlite
- postgresql
- mongodb
**To Reproduce**
Steps to reproduce the behavior:
Simply call the /monitors end point.
**Expected behavior**
Expect terraform provider to be able to refresh its state using the api.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
The issue is in the /api/v1/monitors endpoint not returning notification_ids and tag_ids. Start by examining the API handler code for this endpoint, likely in a file like `api/monitors.go`. Look at the data model for monitors to see how notification and tag relationships are stored. Check the database queries to ensure these IDs are selected. Verify the fix by calling the endpoint and ensuring the IDs appear in the response.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- go, mongodb, postgresql, sqlite, terraform
- 領域
- api, backend, databases
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100