add other collections
This commit is contained in:
@@ -0,0 +1,201 @@
|
||||
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
|
||||
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 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user