.. _reference-macro-get: HTTP Functions ----------------- .. _21.1|EKB-7570: .. index:: Macro function;fn.request_get * *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" } .. index:: Macro function;fn.perform_http_get * *fn.perform_http_get*: Given a URL parameter and optionally username and password parameters, return in HTTP status code of the HTTP request. Example request: :: {{ fn.perform_http_get http:// }} Example request with additional parameters: :: {{ fn.perform_http_get http:// }} Example output: :: 200 If the HTTP request raises an error (for example: not found, connection, timeout, and so on), this error will be returned. .. |VOSS Automate| replace:: VOSS Automate .. |Unified CM| replace:: Unified CM