info: name: Invio comunicazione formale type: http seq: 1 http: method: POST url: "{{elixFormsApiUrl}}/request/:request_id/user-formal-communication" headers: - name: x-requested-with value: XMLHttpRequest - name: x-api-username value: "{{elixFormsApiUsername}}" params: - name: request_id value: "27126" type: path body: type: json data: |- { "message": "Test message", "documentType": "Autorizzazione", // La corrispondente funzionalità in elixForms prevede un elenco preso da una property di piattaforma (globalparam.formalcommunications.available.list , i cui valori, di default possono essere i seguenti: Appuntamento,Autorizzazione,Comunicazione,Esito,Licenza,Permesso,Richiesta di integrazione "documentNumber": "123123_AZ", // "documentDate": {{elixFormalCommunicationDate}}, "attachments": [ // da 0 a 5 max /* { "attachFile": "", // rappresentato da una stringa in formato Base64, encoding del byte array del file originale in UTF-8 "attachMimeType": "application/pdf", // del documento allegato. Se vuoto viene impostato come application/octet-steam "attachFileName": "test.pdf", // da assengare al file in upload "attachSize": null // dichiarata. Se non specificato, viene calcolato in funzione del file ricevuto }, { "attachFile": "", "attachMimeType": "image/jpeg", "attachFileName": "test1.jpeg" } */ ], "senderUsername": "MMMPPL74T17E463A" // di un utente presente sul DB elixforms (isi_users) da indicare come mittente; nel caso non sia specificato, verrà forzato con lo username in header "x-api-username" titolare di accesso al servizio, ma anch'esso deve essere presente sul DB elixforms (isi_users). } auth: inherit runtime: scripts: - type: before-request code: |- var currentDate = new Date().toISOString(); console.log(currentDate); bru.setVar("elixFormalCommunicationDate", JSON.stringify(currentDate)); settings: encodeUrl: true timeout: 0 followRedirects: true maxRedirects: 5 examples: - name: Invio comunicazione formale - Success request: url: "{{elixFormsApiUrl}}/request/:request_id/user-formal-communication" method: POST headers: - name: x-api-username value: "{{elixFormsApiUsername}}" params: - name: request_id value: "7012" type: path body: type: json data: "{\r \ \"message\": \"Test message\",\r \ \"documentType\": \"Autorizzazione\", // La corrispondente funzionalità in elixForms prevede un elenco preso da una property di piattaforma (globalparam.formalcommunications.available.list , i cui valori, di default possono essere i seguenti: Appuntamento,Autorizzazione,Comunicazione,Esito,Licenza,Permesso,Richiesta di integrazione\r \ \"documentNumber\": \"123123_AZ\",\r \ \"documentDate\": {{elixFormalCommunicationDate}},\r \ \"attachments\": [ // da 0 a 5 max\r \ /*\r \ {\r \ \"attachFile\": \"\", // rappresentato da una stringa in formato Base64, encoding del byte array del file originale in UTF-8\r \ \"attachMimeType\": \"application/pdf\", // del documento allegato. Se vuoto viene impostato come application/octet-steam\r \ \"attachFileName\": \"test.pdf\", // da assengare al file in upload\r \ \"attachSize\": null // dichiarata. Se non specificato, viene calcolato in funzione del file ricevuto\r \ },\r \ {\r \ \"attachFile\": \"\",\r \ \"attachMimeType\": \"image/jpeg\",\r \ \"attachFileName\": \"test1.jpeg\"\r \ }\r \ */\r \ ],\r \ \"senderUsername\": \"MMMPPL74T17E463A\" // di un utente presente sul DB elixforms (isi_users) da indicare come mittente; nel caso non sia specificato, verrà forzato con lo username in header \"x-api-username\" titolare di accesso al servizio, ma anch'esso deve essere presente sul DB elixforms (isi_users).\r }" response: statusText: "200" headers: - name: cache-control value: no-cache, no-store, must-revalidate - name: pragma value: no-cache - name: proxy-connection value: Keep-Alive - name: x-content-security-policy value: default-src 'self'; connect-src 'self'; font-src 'none'; img-src 'self'; media-src 'self'; object-src 'self'; plugin-types application/pdf audio/x-wav; referrer no-referrer; reflected-xss block; script-src 'self'; style-src 'self' - name: content-type value: application/it.elixforms.api.v1.2+json;charset=UTF-8 - name: content-length value: "424" - name: strict-transport-security value: max-age=63072000;includeSubDomains - name: content-security-policy value: "default-src https: data: 'unsafe-inline' 'unsafe-eval'" - name: x-frame-options value: SAMEORIGIN - name: x-xss-protection value: 1;mode=block - name: x-content-type-options value: nosniff - name: referrer-policy value: unsafe-url body: type: text data: |- { "value": { "code": "OK", "description": "OK", "complete": true, "globalStatus": "OK", "serviceInformationList": { "serviceInformation": [ { "ITSystemName": "EF-CORE", "complete": true, "serviceVersion": "1.2.0", "statusDetailList": { "statusDetail": [ { "code": "OK", "description": "OK", "detailStatus": "OK" } ] } } ] }, "uuid": "24b41fec-d621-40b5-8907-cf08fef2ece3", "version": "3.9.2.17", "userFormalCommunicationData": 1, "userFormalCommunicationDataId": 26936 } }