info:
  name: AJ Console - Get Object Title (SCHEMADATA)
  type: http
  seq: 5

http:
  method: GET
  url: "{{elixFormsRootUrl}}/AJSRV/metadata/objectTitle?ATTR_NAME=master_field&ATTR_VALUE=true&TYPE=SCHEMADATA&OBJECT_ID=35397"
  headers:
    - name: Cookie
      value: "{{elixFormsAjsrvCookie}}"
    - name: x-requested-with
      value: XMLHttpRequest
  params:
    - name: ATTR_NAME
      value: master_field
      type: query
    - name: ATTR_VALUE
      value: "true"
      type: query
    - name: TYPE
      value: SCHEMADATA
      type: query
    - name: OBJECT_ID
      value: "35397"
      type: query
  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/objectTitle?ATTR_NAME=master_field&ATTR_VALUE=true&TYPE=SCHEMADATA&OBJECT_ID=35397"
      method: GET
      headers:
        - name: Cookie
          value: "{{elixFormsAjsrvCookie}}"
        - name: x-requested-with
          value: XMLHttpRequest
      params:
        - name: ATTR_NAME
          value: master_field
          type: query
        - name: ATTR_VALUE
          value: "true"
          type: query
        - name: TYPE
          value: SCHEMADATA
          type: query
        - name: OBJECT_ID
          value: "35397"
          type: query
    response:
      status: 200
      statusText: OK
      headers:
        - name: date
          value: Wed, 26 Aug 2026 10:40:35 GMT
        - name: server
          value: Apache
        - 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: "17"
        - name: set-cookie
          value: JSESSIONID=da84d30d8f6a7c5f0e18dc3b7ebf; Path=/; HttpOnly
        - 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: |-
          {
            "objectList": []
          }
