132 lines
4.4 KiB
YAML
132 lines
4.4 KiB
YAML
info:
|
|
name: Update Request SWF values
|
|
type: http
|
|
seq: 6
|
|
|
|
http:
|
|
method: POST
|
|
url: "{{elixFormsApiUrl_Default}}/request/:request_id/swf/{{columns}}?username={{elixFormsApiUsername}}"
|
|
headers:
|
|
- name: x-requested-with
|
|
value: XMLHttpRequest
|
|
params:
|
|
- name: username
|
|
value: "{{elixFormsApiUsername}}"
|
|
type: query
|
|
- name: request_id
|
|
value: "27310"
|
|
type: path
|
|
auth: inherit
|
|
|
|
runtime:
|
|
variables:
|
|
- name: columns
|
|
value: ""
|
|
disabled: true
|
|
- name: columns
|
|
value: COL0001="1";COL0002={{$isoTimestamp}}
|
|
|
|
settings:
|
|
encodeUrl: true
|
|
timeout: 0
|
|
followRedirects: true
|
|
maxRedirects: 5
|
|
forwardAuthorizationHeader: true
|
|
|
|
examples:
|
|
- name: Update Request SWF values - Success
|
|
request:
|
|
url: "{{elixFormsApiUrl_Default}}/request/:request_id/swf/columns;{{elixRegisterResultColumns}}?username={{elixFormsApiUsername}}"
|
|
method: POST
|
|
params:
|
|
- name: username
|
|
value: "{{elixFormsApiUsername}}"
|
|
type: query
|
|
- name: request_id
|
|
value: "6085"
|
|
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: "478"
|
|
- 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": "Report with id 26883 was generated",
|
|
"complete": true,
|
|
"globalStatus": "OK",
|
|
"serviceInformationList": {
|
|
"serviceInformation": [
|
|
{
|
|
"ITSystemName": "EF-CORE",
|
|
"complete": true,
|
|
"serviceVersion": "1.2.0",
|
|
"statusDetailList": {
|
|
"statusDetail": [
|
|
{
|
|
"code": "OK",
|
|
"description": "Report with id 26883 was generated",
|
|
"detailStatus": "OK"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"uuid": "87845b63-e710-4dff-a37d-cc23229ce6aa",
|
|
"version": "3.9.2.17",
|
|
"acquiredRequestReceiptId": "26883",
|
|
"acquiredRequestsSize": 1
|
|
}
|
|
}
|
|
|
|
docs: |-
|
|
The columns variable must be built like the following:
|
|
|
|
- variable must start with "columns;"
|
|
- add one "index=value" couple for every field in the SWF schema to be updated, where "index" is the name of the associated SWF schema field (e.g.: COL0003) and "value" is the string content to be used
|
|
- each couple must be separated by a semi-period (\`;\` character)
|
|
|
|
For example, suppose the request has a SWF schema with ID 356 having:
|
|
|
|
- State = COL0001
|
|
- Date = COL0002
|
|
- Email = COL0003
|
|
- Message = COL0004
|
|
|
|
If you want to change the CURRENT state's date and message values, you will put into the variable the following value:
|
|
|
|
`columns;[{"key":"COL0002","value":"31-03-2025"},{"key":"COL0004","value":"this is the new message"}]`
|
|
|
|
`COL0002=31-03-2025;COL0004=this is the new message`
|
|
|
|
Keep in mind that Bruno automatically encodes the parameter, so you may use spaces and other symbols (maybe?).
|