|
65 | 65 | ],
|
66 | 66 | "type": "object"
|
67 | 67 | },
|
| 68 | + "AlertGroup": { |
| 69 | + "properties": { |
| 70 | + "interval": { |
| 71 | + "default": "60s", |
| 72 | + "maxLength": 8, |
| 73 | + "minLength": 2, |
| 74 | + "title": "Interval", |
| 75 | + "type": "string" |
| 76 | + }, |
| 77 | + "name": { |
| 78 | + "maxLength": 200, |
| 79 | + "minLength": 1, |
| 80 | + "title": "Name", |
| 81 | + "type": "string" |
| 82 | + }, |
| 83 | + "rules": { |
| 84 | + "items": { |
| 85 | + "$ref": "#/components/schemas/AlertRuleRecord" |
| 86 | + }, |
| 87 | + "type": "array" |
| 88 | + } |
| 89 | + }, |
| 90 | + "required": [ |
| 91 | + "name", |
| 92 | + "rules" |
| 93 | + ], |
| 94 | + "type": "object" |
| 95 | + }, |
| 96 | + "AlertGroupsResponse": { |
| 97 | + "properties": { |
| 98 | + "data": { |
| 99 | + "items": { |
| 100 | + "$ref": "#/components/schemas/AlertGroup" |
| 101 | + }, |
| 102 | + "type": "array" |
| 103 | + }, |
| 104 | + "message": { |
| 105 | + "minLength": 1, |
| 106 | + "title": "Message", |
| 107 | + "type": "string" |
| 108 | + } |
| 109 | + }, |
| 110 | + "required": [ |
| 111 | + "data", |
| 112 | + "message" |
| 113 | + ], |
| 114 | + "type": "object" |
| 115 | + }, |
| 116 | + "AlertRuleRecord": { |
| 117 | + "properties": { |
| 118 | + "alert": { |
| 119 | + "maxLength": 200, |
| 120 | + "minLength": 1, |
| 121 | + "title": "Alert", |
| 122 | + "type": "string" |
| 123 | + }, |
| 124 | + "annotations": { |
| 125 | + "additionalProperties": { |
| 126 | + "minLength": 1, |
| 127 | + "type": "string" |
| 128 | + }, |
| 129 | + "title": "Annotations", |
| 130 | + "type": "object" |
| 131 | + }, |
| 132 | + "expr": { |
| 133 | + "maxLength": 600, |
| 134 | + "minLength": 1, |
| 135 | + "title": "Expr", |
| 136 | + "type": "string" |
| 137 | + }, |
| 138 | + "for": { |
| 139 | + "maxLength": 8, |
| 140 | + "minLength": 2, |
| 141 | + "title": "For", |
| 142 | + "type": "string" |
| 143 | + }, |
| 144 | + "labels": { |
| 145 | + "additionalProperties": { |
| 146 | + "minLength": 1, |
| 147 | + "type": "string" |
| 148 | + }, |
| 149 | + "title": "Labels", |
| 150 | + "type": "object" |
| 151 | + }, |
| 152 | + "record": { |
| 153 | + "maxLength": 300, |
| 154 | + "minLength": 1, |
| 155 | + "title": "Record", |
| 156 | + "type": "string" |
| 157 | + } |
| 158 | + }, |
| 159 | + "required": [ |
| 160 | + "expr" |
| 161 | + ], |
| 162 | + "type": "object" |
| 163 | + }, |
68 | 164 | "BasicAuth": {
|
69 | 165 | "properties": {
|
70 | 166 | "password": {
|
|
5408 | 5504 | }
|
5409 | 5505 | }
|
5410 | 5506 | },
|
| 5507 | + "/v1/projects/{projectId}/instances/{instanceId}/alertgroups": { |
| 5508 | + "get": { |
| 5509 | + "description": "Get alert groups.", |
| 5510 | + "operationId": "v1_projects_instances_alertgroups_list", |
| 5511 | + "parameters": [ |
| 5512 | + { |
| 5513 | + "in": "path", |
| 5514 | + "name": "instanceId", |
| 5515 | + "required": true, |
| 5516 | + "schema": { |
| 5517 | + "type": "string" |
| 5518 | + } |
| 5519 | + }, |
| 5520 | + { |
| 5521 | + "in": "path", |
| 5522 | + "name": "projectId", |
| 5523 | + "required": true, |
| 5524 | + "schema": { |
| 5525 | + "type": "string" |
| 5526 | + } |
| 5527 | + } |
| 5528 | + ], |
| 5529 | + "responses": { |
| 5530 | + "200": { |
| 5531 | + "content": { |
| 5532 | + "application/json": { |
| 5533 | + "example": { |
| 5534 | + "data": [ |
| 5535 | + { |
| 5536 | + "interval": "5m", |
| 5537 | + "name": "test alert", |
| 5538 | + "rules": [ |
| 5539 | + { |
| 5540 | + "alert": "up test", |
| 5541 | + "annotations": { |
| 5542 | + "test": "test" |
| 5543 | + }, |
| 5544 | + "expr": "up == 1", |
| 5545 | + "for": "30s", |
| 5546 | + "labels": { |
| 5547 | + "test": "test" |
| 5548 | + } |
| 5549 | + } |
| 5550 | + ] |
| 5551 | + } |
| 5552 | + ], |
| 5553 | + "message": "Successfully got alert groups" |
| 5554 | + }, |
| 5555 | + "schema": { |
| 5556 | + "$ref": "#/components/schemas/AlertGroupsResponse" |
| 5557 | + } |
| 5558 | + } |
| 5559 | + }, |
| 5560 | + "description": "Get all alert groups" |
| 5561 | + }, |
| 5562 | + "400": { |
| 5563 | + "content": { |
| 5564 | + "application/json": { |
| 5565 | + "example": { |
| 5566 | + "message": "Something went wrong." |
| 5567 | + }, |
| 5568 | + "schema": { |
| 5569 | + "$ref": "#/components/schemas/Error" |
| 5570 | + } |
| 5571 | + } |
| 5572 | + }, |
| 5573 | + "description": "Something went wrong." |
| 5574 | + }, |
| 5575 | + "403": { |
| 5576 | + "content": { |
| 5577 | + "application/json": { |
| 5578 | + "example": { |
| 5579 | + "detail": "You do not have permission to perform this action." |
| 5580 | + }, |
| 5581 | + "schema": { |
| 5582 | + "$ref": "#/components/schemas/PermissionDenied" |
| 5583 | + } |
| 5584 | + } |
| 5585 | + }, |
| 5586 | + "description": "You are not authorized" |
| 5587 | + } |
| 5588 | + }, |
| 5589 | + "x-stackit-authorization": { |
| 5590 | + "actions": [ |
| 5591 | + "argus.instance.get" |
| 5592 | + ], |
| 5593 | + "resource-id": "projectId", |
| 5594 | + "resource-id-type": "dynamic", |
| 5595 | + "resource-type": "project" |
| 5596 | + } |
| 5597 | + } |
| 5598 | + }, |
5411 | 5599 | "/v1/projects/{projectId}/instances/{instanceId}/credentials": {
|
5412 | 5600 | "get": {
|
5413 | 5601 | "description": "Get all technical user credentials.",
|
|
0 commit comments