Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
protogrid:api_endpoints [2021-12-02 11:10] – [/api/v2/apps/<app_name>/mailsend] druprotogrid:api_endpoints [2021-12-02 15:39] – [/api/v2/apps/<app_name>/views/<view_name>] dru
Line 143: Line 143:
     * Example: limit=15     * Example: limit=15
     * Default value: 10     * Default value: 10
-  * descending: If set to true the results will be in descending order.+  * descending: If set to true the results will be in descending order. If set to true start_key and end_key must be exchanged.
     * Example: descending=true     * Example: descending=true
     * Default value: False     * Default value: False
Line 152: Line 152:
  
          
-Noteyou may only use either keys or start_key and end_key.+Please note: 
 +  * You may only use either "keysor "start_keyand "end_key". 
 +  * Key values must be cut off after 300 characters (e. g. string values and sortstrings) because these values are also cut off in the view index.
  
 Details: For more details about the URL parameters see the [[http://docs.couchdb.org/en/stable/api/ddoc/views.html|CouchDB documentation]]. Details: For more details about the URL parameters see the [[http://docs.couchdb.org/en/stable/api/ddoc/views.html|CouchDB documentation]].
Line 454: Line 456:
  
 ==== /api/v2/apps/<app_name>/mailsend ==== ==== /api/v2/apps/<app_name>/mailsend ====
-[POST] Send an email using the provided data+[POST] Send an email 
 + 
 +To use this endpoint, a mail server must be specified in the environment properties (fields "SMTP Server Hostname" and "SMTP Server Port"). The mail will be sent according to the currently logged in user (mail address specified in user profile and the field "SMTP Server Password" if requested by the mailserver).  
 + 
 +Protogrid will fist try to establish a TLS session to the specified mail server and authenticate using the supplied credentials. If TLS is not available it will try to connect using SSL. Finally if SSL is not available the function tries to connect using unsecured SMTP protocol. 
 + 
 +If Sender Policy Framework (SPF) is used for the particular mail domain, the Protogrid server must be added to the SPF record of this domain. For this purpose, please contact [[protogrid-customer-support@ategra.ch|Protogrid Support]].
  
 The following JSON data fields can be used: The following JSON data fields can be used:
Line 468: Line 476:
   * attachments: Documents to attach to the email (Array of Objects)   * attachments: Documents to attach to the email (Array of Objects)
  
-To use this endpoint, a mail server must be specified in the environment properties (fields "SMTP Server Hostname", "SMTP Server Port"). The mail will be sent according to the currently logged in user (mail address specified in user profile and the field "SMTP Server Password" if requested by the mailserver). +Attachments and inline images must already reside inside Protogrideach attached to Card. The logged in user must have read access to this Card(s). Attachments and inline images are specified using an Object with the following structure: 
 +<code javascript> 
 +
 +    "card_id": "<ID of the Card on which the attachment or image resides>", 
 +    "file_name": "<Name of the file as it is listed in the Card specified above>" 
 +
 +</code>
  
-Protogrid will fist try to establish TLS session to the specified mail server and authenticate using the supplied credentials. If TLS is not available it will try to connect using SSLFinally if SSL is not available the function tries to connect using unsecured SMTP protocol. +By default, users can send a mail to up to 10 recipientsThis limit can be increased via the roles assigned to the users using the field "Allowed Number of Recipients per Mail Sent" on each Role DefinitionHowever, a mail never can be sent to more than 500 recipients.
- +
-If Sender Policy Framework (SPF) is used for the particular mail domain, the Protogrid server must be added to the SPF record of this domain. For this purpose, please contact [[protogrid-customer-support@ategra.ch|Protogrid Support]].+
  
 The returned result will include a success message or details about the particular error. The returned result will include a success message or details about the particular error.
Print/export