Files
api-collections/collections/elixForms API v2/Request details/Get Request Identifier.yml
T
2026-02-18 15:04:39 +01:00

178 lines
5.0 KiB
YAML

info:
name: Get Request Identifier
type: http
seq: 3
http:
method: GET
url: "{{elixFormsApiUrl_Default}}/request/get-id?qrCode=123456"
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: qrCode
value: "123456"
type: query
body:
type: form-urlencoded
auth: inherit
runtime:
scripts:
- type: after-response
code: "function findBinaryColumns(obj) {\r
\ let binaryColumns = [];\r
\r
\ if (Array.isArray(obj)) {\r
\ obj.forEach(item => {\r
\ binaryColumns = binaryColumns.concat(findBinaryColumns(item));\r
\ });\r
\ } else if (typeof obj === \"object\" && obj !== null) {\r
\ Object.keys(obj).forEach(key => {\r
\ if (key === \"columns\" && Array.isArray(obj[key])) {\r
\ obj[key].forEach(column => {\r
\ if (column.columnType === \"BINARY\") {\r
\ binaryColumns.push(column);\r
\ }\r
\ });\r
\ } else {\r
\ binaryColumns = binaryColumns.concat(findBinaryColumns(obj[key]));\r
\ }\r
\ });\r
\ }\r
\r
\ return binaryColumns;\r
}\r
\r
// Carica il file JSON (sostituisci con il tuo oggetto JSON)\r
const jsonData = res.getBody();\r
\r
// Esegui la ricerca\r
const binaryColumns = findBinaryColumns(jsonData);\r
\r
// Stampa i risultati solo se ne abbiamo trovati (bisogna abilitare la visualizzazione dei Warning nella console Postman)\r
if (binaryColumns.length > 0) {\r
\ console.warn(\"Allegati trovati:\", binaryColumns);\r
}"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
examples:
- name: Get Request Identifier - Invalid QRCode
request:
url: "{{elixFormsApiUrl_Default}}/request/get-id?username={{elixFormsApiUsername}}&qrCode=123456"
method: GET
params:
- name: username
value: "{{elixFormsApiUsername}}"
type: query
description: lo username con cui si è effettuato il login
- name: qrCode
value: "123456"
type: query
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: "441"
- 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"
}
]
}
}
]
},
"uuid": "52de6c90-8b75-4cab-ba37-4d81c567cb86",
"version": "3.9.2.17",
"size": 0
}
}