info:
  name: AJ Console - Save Object
  type: http
  seq: 7

http:
  method: POST
  url: "{{elixFormsRootUrl}}/AJSRV/metadata/save"
  headers:
    - name: Cookie
      value: ISIPSESSION=047b770fac5627c03c94030ca0c3b45c; AJSRV=BTN_USER_1787207482458_8771527838545232265; ISIPSESSION_TRACK=99b2488e73af7c61f6e5affceeb32502; JSESSIONID=e3c44b958c4f282660a5fc8ed994
    - name: x-requested-with
      value: XMLHttpRequest
  body:
    type: multipart-form
    data:
      - name: S_616_168008_COL0009
        type: text
        value: azione_form_AUTOR_firmaAutorizzazione
  auth: inherit

runtime:
  scripts:
    - type: before-request
      code: |-
        const noCookieFoundError = "No AJSRV cookie found!";

        var ajsrvCookie = bru.getVar("elixFormsAjsrvCookie");

        if (ajsrvCookie == null || ajsrvCookie === "") {
          console.error(noCookieFoundError, ajsrvCookie);
          throw new Error(noCookieFoundError);
        }

settings:
  encodeUrl: true
  timeout: 0
  followRedirects: true
  maxRedirects: 5
  forwardAuthorizationHeader: true

examples:
  - name: example
    request:
      url: "{{elixFormsRootUrl}}/AJSRV/metadata/save"
      method: POST
      headers:
        - name: Accept
          value: "*/*"
        - name: Accept-Encoding
          value: gzip, deflate, br, zstd
        - name: Accept-Language
          value: it,it-IT;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
          disabled: true
        - name: Cookie
          value: ISIPSESSION=047b770fac5627c03c94030ca0c3b45c; AJSRV=BTN_USER_1787207482458_8771527838545232265; ISIPSESSION_TRACK=99b2488e73af7c61f6e5affceeb32502; JSESSIONID=e3c44b958c4f282660a5fc8ed994
        - name: Host
          value: console-unipr.elixforms.it
          disabled: true
        - name: Referer
          value: https://console-unipr.elixforms.it/ajconsole/
          disabled: true
        - name: x-requested-with
          value: XMLHttpRequest
      body:
        type: multipart-form
        data:
          - name: S_616_168008_COL0009
            type: text
            value: azione_form_AUTOR_firmaAutorizzazione
    response:
      status: 200
      statusText: OK
      headers:
        - name: date
          value: Wed, 26 Aug 2026 09:01:46 GMT
        - name: server
          value: '""'
        - name: content-security-policy
          value: "default-src https: data: 'unsafe-inline' 'unsafe-eval'; img-src 'self' blob: data: https:;"
        - name: content-type
          value: application/json;charset=UTF-8
        - name: content-length
          value: "1636"
        - name: strict-transport-security
          value: max-age=31536000; includeSubDomains
        - name: x-frame-options
          value: SAMEORIGIN
        - name: x-xss-protection
          value: "1"
        - name: x-content-type-options
          value: nosniff
        - name: referrer-policy
          value: unsafe-url
        - name: keep-alive
          value: timeout=10, max=500
        - name: connection
          value: Keep-Alive
      body:
        type: json
        data: |-
          {
            "errors": {
              "objectList": []
            },
            "result": {
              "objectList": [
                {
                  "id": 616,
                  "title": "WFTemplate",
                  "dataId": 168008,
                  "tag": "",
                  "objectId": 35274,
                  "sections": [
                    {
                      "title": "Template",
                      "key": "SEC_0006",
                      "orderKey": "ORD001",
                      "fields": [
                        {
                          "type": "STRING",
                          "key": "COL0014",
                          "title": "Titolo template",
                          "searchable": false,
                          "valueList": [
                            {
                              "key": "",
                              "value": "Autorizzazione sottodominio"
                            }
                          ],
                          "itemList": null,
                          "toManyItems": false,
                          "attributes": [],
                          "orderKey": "ORD001",
                          "defaultValue": null,
                          "required": false
                        },
                        {
                          "type": "HTML",
                          "key": "COL0009",
                          "title": "Template",
                          "searchable": false,
                          "valueList": [
                            {
                              "key": "",
                              "value": "azione_form_AUTOR_firmaAutorizzazione"
                            }
                          ],
                          "itemList": null,
                          "toManyItems": false,
                          "attributes": [],
                          "orderKey": "ORD002",
                          "defaultValue": null,
                          "required": false
                        }
                      ],
                      "attributes": []
                    },
                    {
                      "title": "Metadata",
                      "key": "SEC_0007",
                      "orderKey": "ORD002",
                      "fields": [
                        {
                          "type": "STRING",
                          "key": "COL0010",
                          "title": "Tag azione",
                          "searchable": false,
                          "valueList": [
                            {
                              "key": "",
                              "value": "azione_form_AUTOR_firmaAutorizzazione"
                            }
                          ],
                          "itemList": null,
                          "toManyItems": false,
                          "attributes": [],
                          "orderKey": "ORD001",
                          "defaultValue": null,
                          "required": false
                        },
                        {
                          "type": "STRING",
                          "key": "COL0011",
                          "title": "Tag procedimento",
                          "searchable": false,
                          "valueList": [
                            {
                              "key": "",
                              "value": "gestione_siti_web_nuovo_wf"
                            }
                          ],
                          "itemList": null,
                          "toManyItems": false,
                          "attributes": [],
                          "orderKey": "ORD002",
                          "defaultValue": null,
                          "required": false
                        },
                        {
                          "type": "STRING",
                          "key": "COL0012",
                          "title": "Tag modulo",
                          "searchable": false,
                          "valueList": [
                            {
                              "key": "",
                              "value": "RequestForm_GESTIONE_SITI_WEB_NUOVO"
                            }
                          ],
                          "itemList": null,
                          "toManyItems": false,
                          "attributes": [],
                          "orderKey": "ORD003",
                          "defaultValue": null,
                          "required": false
                        }
                      ],
                      "attributes": []
                    }
                  ],
                  "categories": [],
                  "aclTable": [],
                  "master": false,
                  "attributes": []
                }
              ]
            }
          }
