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