info: name: Get Request by QRCode type: http seq: 4 http: method: GET url: "{{elixFormsApiUrl_Default}}/request/qrcode/:qrcode/get" headers: - name: x-requested-with value: XMLHttpRequest - name: x-api-username value: "{{elixFormsApiUsername}}" params: - name: username value: "{{elixFormsApiUsername}}" type: query description: lo username con cui si è effettuato il login disabled: true - name: recordOrder value: NONE type: query description: NONE (default), NEWEST_FIRST, NEWEST_LAST (case sensitive) disabled: true - name: qrcode value: "123456" type: path body: type: form-urlencoded data: - name: "" value: "" auth: inherit runtime: scripts: - type: after-response code: |- function findBinaryColumns(obj) { let binaryColumns = []; if (Array.isArray(obj)) { obj.forEach(item => { binaryColumns = binaryColumns.concat(findBinaryColumns(item)); }); } else if (typeof obj === "object" && obj !== null) { Object.keys(obj).forEach(key => { if (key === "columns" && Array.isArray(obj[key])) { obj[key].forEach(column => { if (column.columnType === "BINARY") { binaryColumns.push(column); } }); } else { binaryColumns = binaryColumns.concat(findBinaryColumns(obj[key])); } }); } return binaryColumns; } // Carica il file JSON (sostituisci con il tuo oggetto JSON) const jsonData = res.getBody(); // Esegui la ricerca const binaryColumns = findBinaryColumns(jsonData); // Stampa i risultati solo se ne abbiamo trovati (bisogna abilitare la visualizzazione dei Warning nella console Postman) if (binaryColumns.length > 0) { console.warn("Allegati trovati:", binaryColumns); } settings: encodeUrl: true timeout: 0 followRedirects: true maxRedirects: 5 examples: - name: Get Request by QRCode - Invalid QRCode request: url: "{{elixFormsApiUrl_Default}}/request/qrcode/:qrcode/get?username={{elixFormsApiUsername}}" method: GET params: - name: username value: "{{elixFormsApiUsername}}" type: query description: lo username con cui si è effettuato il login - name: recordOrder value: NONE type: query description: NONE (default), NEWEST_FIRST, NEWEST_LAST (case sensitive) disabled: true - name: qrcode value: "123456" type: path body: type: form-urlencoded 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: "646" - 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": "WARNING", "description": "Il qrCode fornito non è valido", "complete": true, "globalStatus": "WARNING", "serviceInformationList": { "serviceInformation": [ { "ITSystemName": "EF-CORE", "complete": true, "serviceVersion": "1.2.0", "statusDetailList": { "statusDetail": [ { "code": "WARNING", "description": "Il qrCode fornito non è valido", "detailStatus": "WARNING" } ] } }, { "ITSystemName": "EF-CORE", "complete": true, "serviceVersion": "1.2.0", "statusDetailList": { "statusDetail": [ { "code": "WARNING", "description": "Il qrCode fornito non è valido", "detailStatus": "WARNING" } ] } } ] }, "uuid": "08384545-6d05-46a6-857c-9747bcbcc3e2", "version": "3.9.2.17", "requestSize": 0 } }