|
| 1 | +openapi: 3.0.2 |
| 2 | +info: |
| 3 | + title: Notify Service |
| 4 | + version: '3.0.0' |
| 5 | + description: The notification service facilitates sending emails to users |
| 6 | + contact: |
| 7 | + name: Alert Logic Support |
| 8 | + |
| 9 | + x-alertlogic-iws-service: |
| 10 | + type: private |
| 11 | +servers: |
| 12 | + - url: 'https://api.product.dev.alertlogic.com' |
| 13 | + description: Integration |
| 14 | + x-alertlogic-session-endpoint: true |
| 15 | + - url: 'https://api.cloudinsight.alertlogic.com' |
| 16 | + description: Production |
| 17 | + x-alertlogic-session-endpoint: true |
| 18 | +tags: |
| 19 | + - name: email |
| 20 | + description: Email Resources |
| 21 | +paths: |
| 22 | + '/notify/v3/{account_id}/email': |
| 23 | + parameters: |
| 24 | + - schema: |
| 25 | + type: string |
| 26 | + name: account_id |
| 27 | + in: path |
| 28 | + required: true |
| 29 | + description: AIMS Account ID |
| 30 | + post: |
| 31 | + summary: Send an email to a user or to an arbitrary email address |
| 32 | + tags: |
| 33 | + - email |
| 34 | + responses: |
| 35 | + '200': |
| 36 | + description: OK |
| 37 | + content: |
| 38 | + application/json: |
| 39 | + schema: |
| 40 | + $ref: '#/components/schemas/SentEmail' |
| 41 | + examples: {} |
| 42 | + '400': |
| 43 | + description: Bad Request |
| 44 | + '401': |
| 45 | + description: Unauthorized |
| 46 | + '403': |
| 47 | + description: Forbidden |
| 48 | + '404': |
| 49 | + description: Not Found |
| 50 | + operationId: send_email |
| 51 | + description: Sends an email to a specific user or email using a template |
| 52 | + parameters: [] |
| 53 | + requestBody: |
| 54 | + content: |
| 55 | + application/json: |
| 56 | + schema: |
| 57 | + type: object |
| 58 | + properties: |
| 59 | + account_id: |
| 60 | + type: string |
| 61 | + description: 'The Account ID of the user_id. If present, it must match the one in the URL.' |
| 62 | + user_id: |
| 63 | + type: string |
| 64 | + description: "The ID of the user to send the email to. If specified, the email will be sent to the user's email_address. Either user_id or to_email_address is required" |
| 65 | + to_email_address: |
| 66 | + type: string |
| 67 | + description: The address to send the email to. Either user_id or to_email_address is required |
| 68 | + subject: |
| 69 | + type: string |
| 70 | + description: 'The subject to use for the email. If absent, the default subject will be used.' |
| 71 | + from_email_address: |
| 72 | + type: string |
| 73 | + description: 'The email address to use in the from field of the email. This email must be verified with Amazon SES. If absent, the service default will be used.' |
| 74 | + template_name: |
| 75 | + type: string |
| 76 | + description: The name of the template to use to send the email. |
| 77 | + template_variables: |
| 78 | + type: object |
| 79 | + description: 'An object containing the required template (and optional, if desired) variables needed to render the template. These will vary depending on the selected template.' |
| 80 | + attachments: |
| 81 | + type: array |
| 82 | + description: 'List of attachment objects' |
| 83 | + items: |
| 84 | + type: object |
| 85 | + required: |
| 86 | + - template_name |
| 87 | + - template_variables |
| 88 | + examples: |
| 89 | + Password Reset Email: |
| 90 | + value: |
| 91 | + template_name: password_reset |
| 92 | + user_id: 364BFBAC-0E4D-1005-AFF9-B8E85645178C |
| 93 | + template_variables: |
| 94 | + reset_token: abc123 |
| 95 | + security: |
| 96 | + - X-Aims-Auth-Token: [] |
| 97 | +components: |
| 98 | + securitySchemes: |
| 99 | + X-Aims-Auth-Token: |
| 100 | + name: AuthenticationToken returned by AIMS service |
| 101 | + type: apiKey |
| 102 | + in: header |
| 103 | + schemas: |
| 104 | + SentEmail: |
| 105 | + type: object |
| 106 | + title: SentEmail |
| 107 | + additionalProperties: false |
| 108 | + description: '' |
| 109 | + properties: |
| 110 | + account_id: |
| 111 | + type: string |
| 112 | + description: The Account ID |
| 113 | + example: '01000001' |
| 114 | + user_id: |
| 115 | + type: string |
| 116 | + description: The ID of the userthe email was sent to |
| 117 | + example: 364BFBAC-0E4D-1005-AFF9-B8E85645178C |
| 118 | + to_email_address: |
| 119 | + type: string |
| 120 | + description: The address the email was sent to |
| 121 | + |
| 122 | + subject: |
| 123 | + type: string |
| 124 | + description: The subject to use for the email |
| 125 | + example: Alert Logic Password Reset Request |
| 126 | + from_email_address: |
| 127 | + type: string |
| 128 | + description: The email address to use in the from field of the email. This email must be verified with Amazon SES. |
| 129 | + example: 'Alert Logic No-Reply <[email protected]>' |
| 130 | + template_name: |
| 131 | + type: string |
| 132 | + description: The name of the template the email was send using which. |
| 133 | + example: password_reset |
| 134 | + template_variables: |
| 135 | + type: object |
| 136 | + description: Template variables used to render the template |
| 137 | + message_id: |
| 138 | + type: string |
| 139 | + example: 0000014e7aeea1b1-51dc78fd-5e48-4b1b-b066-0032700c9cd4-000000 |
| 140 | + description: Message ID of the SES email |
| 141 | + body: |
| 142 | + type: object |
| 143 | + required: |
| 144 | + - text |
| 145 | + properties: |
| 146 | + text: |
| 147 | + type: string |
| 148 | + description: Rendered template |
| 149 | + attachments: |
| 150 | + type: array |
| 151 | + description: "List of attachment objects" |
| 152 | + items: |
| 153 | + type: object |
| 154 | + required: |
| 155 | + - to_email_address |
| 156 | + - subject |
| 157 | + - from_email_address |
| 158 | + - template_name |
| 159 | + - template_variables |
| 160 | + - body |
| 161 | + x-examples: |
| 162 | + Password Reset Email: |
| 163 | + to_email_address: [email protected] |
| 164 | + from_email_address: 'Alert Logic No-Reply <[email protected]>' |
| 165 | + subject: Alert Logic Password Reset Request |
| 166 | + template_name: password_reset |
| 167 | + template_variables: |
| 168 | + reset_token: abc123 |
| 169 | + body: |
| 170 | + text: ... |
| 171 | + message_id: 0000014e7aeea1b1-51dc78fd-5e48-4b1b-b066-0032700c9cd4-000000 |
0 commit comments