HTTP GET Function

  • fn.request_get: Return in JSON format the response of an HTTP request. The HTTP request must start with http://localhost

Example request:

{{ fn.request_get  http://localhost/api/data/Countries/properties }}

The output can be assigned to a variable so that properties can be referenced.

Example with output snippet:

http://localhost/api/data/Countries/properties
{
    "meta": {
        "query": "/api/data/Countries/properties/?hierarchy=[hierarchy]&format=json"
    },
    "choices": [
        [
            "cli_on_prefix",
            "cli_on_prefix"
        ],
        [
            "country_name",
            "country_name"
        ],
        [
...

Example of instance output with GET request for an instance with [pkid]:

http://localhost/api/data/Countries/54e1de60edec65160652e402
...

  ],
     "business_key": {
         "hierarchy": true,
         "unique": [
             "country_name",
             "iso_country_code"
         ]
     },
     "tagged_versions": []
 },
 "data": {
     "iso_country_code": "MEX",
      "pstn_access_prefix": "9",
      "pkid": "54e1de60edec65160652e403",
      "default_user_locale": "English United States",
      "network_locale": "United States",
      "standard_access_prefix": "0",
      "international_access_prefix": "00",
      "country_name": "Mexico",
      "international_dial_code": "52",
      "emergency_access_prefix": "066",
      "national_trunk_prefix": "01"
     }