151 lines
5.7 KiB
XML
151 lines
5.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE topic
|
|
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
|
|
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
|
|
title="Send a test progress alert for a department goal" id="sendDepartmentGoalProgressAlertTest">
|
|
|
|
<!-- AUTO-GENERATED, DO NOT EDIT -->
|
|
<p>This endpoint documentation is generated directly from <code>openapi.yaml</code>.</p>
|
|
<chapter title="Endpoint" id="endpoint">
|
|
<code-block lang="http">POST /goals/department/progress-alert/test</code-block>
|
|
</chapter>
|
|
<chapter title="Operation" id="operation">
|
|
<p>Operation ID: <code>sendDepartmentGoalProgressAlertTest</code></p>
|
|
<p>Sends a progress alert for a department goal to the destination defined in the goal's criteria.
|
|
|
|
Permission required: `goals_department_progress_alert_test`.
|
|
|
|
Access control:
|
|
- The caller must be a superuser or belong to all departments targeted by the goal.
|
|
|
|
Behavior:
|
|
- Looks up the goal by `id`.
|
|
- Rebuilds the criteria from stored JSON and attaches the goal's departments.
|
|
- Renders the alert using the server-side renderer (respecting progress type/style/format and destination limits).
|
|
- Sends the alert to Slack, Email, or SMS depending on `progress_alert_destination`, unless overridden.
|
|
</p>
|
|
</chapter>
|
|
<chapter title="Authentication" id="authentication">
|
|
<p>Security requirements:</p>
|
|
<table>
|
|
<tr><td>Scheme</td><td>Scopes</td></tr>
|
|
<tr><td>BearerAuth</td><td>-</td></tr>
|
|
</table>
|
|
</chapter>
|
|
<chapter title="Request Body" id="request-body">
|
|
<p>Required: yes.</p>
|
|
<p>Content type: <code>application/json</code></p>
|
|
<code-block lang="json">
|
|
{
|
|
"properties": {
|
|
"department_id": {
|
|
"description": "Department id to use that department's Slack webhook when destination is SLACK",
|
|
"example": 3,
|
|
"type": "integer"
|
|
},
|
|
"email_to": {
|
|
"description": "Email recipient when destination is EMAIL",
|
|
"example": "tester@example.com",
|
|
"format": "email",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"description": "The department goal id",
|
|
"example": 42,
|
|
"type": "integer"
|
|
},
|
|
"overrideDestination": {
|
|
"description": "Override the destination for this test",
|
|
"enum": [
|
|
"SLACK",
|
|
"EMAIL",
|
|
"SMS",
|
|
"NONE"
|
|
],
|
|
"example": "SLACK",
|
|
"type": "string"
|
|
},
|
|
"slack_webhook": {
|
|
"description": "Slack webhook URL when destination is SLACK",
|
|
"example": "https://hooks.slack.com/services/T000/B000/XXX",
|
|
"type": "string"
|
|
},
|
|
"sms_to": {
|
|
"description": "One or more MSISDN recipients when destination is SMS",
|
|
"oneOf": [
|
|
{
|
|
"description": "Comma or semicolon separated list",
|
|
"example": "+4512345678, +4598765432",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"example": [
|
|
"+4512345678",
|
|
"+4598765432"
|
|
],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
]
|
|
},
|
|
"subject": {
|
|
"description": "Optional email subject when destination is EMAIL",
|
|
"example": "Dept Goal Progress Test",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id"
|
|
],
|
|
"type": "object"
|
|
}
|
|
</code-block>
|
|
</chapter>
|
|
<chapter title="Responses" id="responses">
|
|
<table>
|
|
<tr><td>Status</td><td>Description</td><td>Content Types</td></tr>
|
|
<tr><td>200</td><td>Alert sent successfully</td><td>application/json</td></tr>
|
|
<tr><td>400</td><td></td><td></td></tr>
|
|
<tr><td>401</td><td></td><td></td></tr>
|
|
<tr><td>403</td><td></td><td></td></tr>
|
|
<tr><td>404</td><td></td><td></td></tr>
|
|
<tr><td>500</td><td></td><td></td></tr>
|
|
</table>
|
|
<p>Schema for response <code>200</code> (<code>application/json</code>):</p>
|
|
<code-block lang="json">
|
|
{
|
|
"properties": {
|
|
"destination": {
|
|
"description": "Final destination used",
|
|
"enum": [
|
|
"SLACK",
|
|
"EMAIL",
|
|
"SMS",
|
|
"NONE"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"description": "Goal id",
|
|
"type": "integer"
|
|
},
|
|
"message_preview": {
|
|
"description": "Rendered message preview",
|
|
"type": "string"
|
|
},
|
|
"provider_response": {
|
|
"description": "Provider-specific response or status message"
|
|
},
|
|
"target": {
|
|
"description": "The target used for delivery (email address, phone numbers, department id, or webhook)"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
</code-block>
|
|
</chapter>
|
|
</topic>
|