APIs
...
Search
Search types list
code examples curl location 'https //api detected app/api/v2/public/search/types' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api detected app/api/v2/public/search/types", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api detected app/api/v2/public/search/types") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //api detected app/api/v2/public/search/types" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // ok { "company" { "label" "", "search enabled" false }, "sole trader" { "label" "", "search enabled" false }, "partnership" { "label" "", "search enabled" false }, "charity" { "label" "", "search enabled" false }, "government entity" { "label" "", "search enabled" false }, "syndicate" { "label" "", "search enabled" false }, "association" { "label" "", "search enabled" false }, "trust" { "label" "", "search enabled" false }, "fund" { "label" "", "search enabled" false } }// unauthorized { "message" "unauthorized " }// too many requests { "message" "too many attempts " }