eNanoMapper database
POST
Apache Solr powered search (POST)
{{baseUrl}}/select
BODY json
{
"facet": {},
"params": {
"fl": [],
"rows": 0
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/select");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n ");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/select" {:content-type :json
:form-params {:params {:fl ["[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]" "dbtag_hss" "name:name_hs" "publicname:publicname_hs" "owner_name:owner_name_hs" "substanceType:substanceType_hs" "s_uuid:s_uuid_hs" "content:content_hss" "SUMMARY.*"]
:rows 20}
:facet {:owner_name {:type "terms"
:field "owner_name_s"
:mincount 1
:limit -1
:domain {:excludeTags "owner_name_tag"
:blockChildren "type_s:substance"}}
:reference_owner {:type "terms"
:field "reference_owner_s"
:mincount 1
:limit -1
:domain {:excludeTags "reference_owner_tag"
:blockChildren "type_s:substance"}}
:substanceType {:type "terms"
:field "substanceType_s"
:mincount 1
:limit -1
:domain {:excludeTags "substanceType_tag"
:blockChildren "type_s:substance"}}
:nm_name {:type "terms"
:field "publicname_s"
:mincount 451
:limit -1
:domain {:excludeTags "nm_name_tag"
:blockChildren "type_s:substance"}}
:protocol {:type "terms"
:field "guidance_s"
:mincount 1
:limit -1
:domain {:excludeTags "protocol_tag"
:blockChildren "type_s:substance"}}
:method {:type "terms"
:field "E.method_s"
:mincount 1
:limit -1
:domain {:excludeTags "method_tag"
:blockChildren "type_s:substance"}}
:cell {:type "terms"
:field "E.cell_type_s"
:mincount 1
:limit -1
:domain {:excludeTags "cell_tag"
:blockChildren "type_s:substance"}}
:species {:type "terms"
:field "E.animal_model_s"
:mincount 1
:limit -1
:domain {:excludeTags "species_tag"
:blockChildren "type_s:substance"}}
:route {:type "terms"
:field "E.exposure_route_s"
:mincount 1
:limit -1
:domain {:excludeTags "route_tag"
:blockChildren "type_s:substance"}}
:interpretation {:type "terms"
:field "MEDIUM_s"
:mincount 2
:limit -1
:domain {:excludeTags "interpretation_tag"
:blockChildren "type_s:substance"}}
:dprotocol {:type "terms"
:field "Dispersion protocol_s"
:mincount 2
:limit -1
:domain {:excludeTags "dprotocol_tag"
:blockChildren "type_s:substance"}}
:reference_year {:type "terms"
:field "reference_year_s"
:mincount 2
:limit -1
:domain {:excludeTags "reference_year_tag"
:blockChildren "type_s:substance"}}
:reference {:type "terms"
:field "reference_s"
:mincount 2
:limit -1
:domain {:excludeTags "reference_tag"
:blockChildren "type_s:substance"}}
:release {:type "terms"
:field "updated_s"
:mincount 1
:limit -1
:domain {:excludeTags "release_tag"
:blockChildren "type_s:substance"}}
:topcategory {:type "terms"
:field "topcategory_s"
:mincount 1
:limit -1
:facet {:min "min(loValue_d)"
:max "max(loValue_d)"
:avg "avg(loValue_d)"
:endpointcategory {:type "terms"
:field "endpointcategory_s"
:mincount 1
:limit -1
:facet {:min "min(loValue_d)"
:max "max(loValue_d)"
:avg "avg(loValue_d)"
:effectendpoint {:type "terms"
:field "effectendpoint_s"
:mincount 1
:limit -1
:facet {:min "min(loValue_d)"
:max "max(loValue_d)"
:avg "avg(loValue_d)"
:unit {:type "terms"
:field "unit_s"
:mincount 1
:limit -1
:facet {:min "min(loValue_d)"
:max "max(loValue_d)"
:avg "avg(loValue_d)"}}}}}}}
:domain {:blockChildren "type_s:substance"}}}}})
require "http/client"
url = "{{baseUrl}}/select"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n "
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/select"),
Content = new StringContent("{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n ")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/select");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n ", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/select"
payload := strings.NewReader("{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n ")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/select HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4952
{
"params": {
"fl": [
"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]",
"dbtag_hss",
"name:name_hs",
"publicname:publicname_hs",
"owner_name:owner_name_hs",
"substanceType:substanceType_hs",
"s_uuid:s_uuid_hs",
"content:content_hss",
"SUMMARY.*"
],
"rows": 20
},
"facet": {
"owner_name": {
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
}
},
"reference_owner": {
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
}
},
"substanceType": {
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
}
},
"nm_name": {
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": {
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
}
},
"protocol": {
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
}
},
"method": {
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
}
},
"cell": {
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
}
},
"species": {
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
}
},
"route": {
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
}
},
"interpretation": {
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
}
},
"dprotocol": {
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
}
},
"reference_year": {
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
}
},
"reference": {
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
}
},
"release": {
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
}
},
"topcategory": {
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": {
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": {
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": {
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
}
}
}
}
}
}
},
"domain": {
"blockChildren": "type_s:substance"
}
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/select")
.setHeader("content-type", "application/json")
.setBody("{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n ")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/select"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n "))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n ");
Request request = new Request.Builder()
.url("{{baseUrl}}/select")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/select")
.header("content-type", "application/json")
.body("{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n ")
.asString();
const data = JSON.stringify({
params: {
fl: [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
rows: 20
},
facet: {
owner_name: {
type: 'terms',
field: 'owner_name_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'owner_name_tag',
blockChildren: 'type_s:substance'
}
},
reference_owner: {
type: 'terms',
field: 'reference_owner_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'reference_owner_tag',
blockChildren: 'type_s:substance'
}
},
substanceType: {
type: 'terms',
field: 'substanceType_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'substanceType_tag',
blockChildren: 'type_s:substance'
}
},
nm_name: {
type: 'terms',
field: 'publicname_s',
mincount: 451,
limit: -1,
domain: {
excludeTags: 'nm_name_tag',
blockChildren: 'type_s:substance'
}
},
protocol: {
type: 'terms',
field: 'guidance_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'protocol_tag',
blockChildren: 'type_s:substance'
}
},
method: {
type: 'terms',
field: 'E.method_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'method_tag',
blockChildren: 'type_s:substance'
}
},
cell: {
type: 'terms',
field: 'E.cell_type_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'cell_tag',
blockChildren: 'type_s:substance'
}
},
species: {
type: 'terms',
field: 'E.animal_model_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'species_tag',
blockChildren: 'type_s:substance'
}
},
route: {
type: 'terms',
field: 'E.exposure_route_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'route_tag',
blockChildren: 'type_s:substance'
}
},
interpretation: {
type: 'terms',
field: 'MEDIUM_s',
mincount: 2,
limit: -1,
domain: {
excludeTags: 'interpretation_tag',
blockChildren: 'type_s:substance'
}
},
dprotocol: {
type: 'terms',
field: 'Dispersion protocol_s',
mincount: 2,
limit: -1,
domain: {
excludeTags: 'dprotocol_tag',
blockChildren: 'type_s:substance'
}
},
reference_year: {
type: 'terms',
field: 'reference_year_s',
mincount: 2,
limit: -1,
domain: {
excludeTags: 'reference_year_tag',
blockChildren: 'type_s:substance'
}
},
reference: {
type: 'terms',
field: 'reference_s',
mincount: 2,
limit: -1,
domain: {
excludeTags: 'reference_tag',
blockChildren: 'type_s:substance'
}
},
release: {
type: 'terms',
field: 'updated_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'release_tag',
blockChildren: 'type_s:substance'
}
},
topcategory: {
type: 'terms',
field: 'topcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
endpointcategory: {
type: 'terms',
field: 'endpointcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
effectendpoint: {
type: 'terms',
field: 'effectendpoint_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
unit: {
type: 'terms',
field: 'unit_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)'
}
}
}
}
}
}
},
domain: {
blockChildren: 'type_s:substance'
}
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/select');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/select',
headers: {'content-type': 'application/json'},
data: {
params: {
fl: [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
rows: 20
},
facet: {
owner_name: {
type: 'terms',
field: 'owner_name_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'owner_name_tag', blockChildren: 'type_s:substance'}
},
reference_owner: {
type: 'terms',
field: 'reference_owner_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'reference_owner_tag', blockChildren: 'type_s:substance'}
},
substanceType: {
type: 'terms',
field: 'substanceType_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'substanceType_tag', blockChildren: 'type_s:substance'}
},
nm_name: {
type: 'terms',
field: 'publicname_s',
mincount: 451,
limit: -1,
domain: {excludeTags: 'nm_name_tag', blockChildren: 'type_s:substance'}
},
protocol: {
type: 'terms',
field: 'guidance_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'protocol_tag', blockChildren: 'type_s:substance'}
},
method: {
type: 'terms',
field: 'E.method_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'method_tag', blockChildren: 'type_s:substance'}
},
cell: {
type: 'terms',
field: 'E.cell_type_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'cell_tag', blockChildren: 'type_s:substance'}
},
species: {
type: 'terms',
field: 'E.animal_model_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'species_tag', blockChildren: 'type_s:substance'}
},
route: {
type: 'terms',
field: 'E.exposure_route_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'route_tag', blockChildren: 'type_s:substance'}
},
interpretation: {
type: 'terms',
field: 'MEDIUM_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'interpretation_tag', blockChildren: 'type_s:substance'}
},
dprotocol: {
type: 'terms',
field: 'Dispersion protocol_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'dprotocol_tag', blockChildren: 'type_s:substance'}
},
reference_year: {
type: 'terms',
field: 'reference_year_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'reference_year_tag', blockChildren: 'type_s:substance'}
},
reference: {
type: 'terms',
field: 'reference_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'reference_tag', blockChildren: 'type_s:substance'}
},
release: {
type: 'terms',
field: 'updated_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'release_tag', blockChildren: 'type_s:substance'}
},
topcategory: {
type: 'terms',
field: 'topcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
endpointcategory: {
type: 'terms',
field: 'endpointcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
effectendpoint: {
type: 'terms',
field: 'effectendpoint_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
unit: {
type: 'terms',
field: 'unit_s',
mincount: 1,
limit: -1,
facet: {min: 'min(loValue_d)', max: 'max(loValue_d)', avg: 'avg(loValue_d)'}
}
}
}
}
}
},
domain: {blockChildren: 'type_s:substance'}
}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/select';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"params":{"fl":["[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]","dbtag_hss","name:name_hs","publicname:publicname_hs","owner_name:owner_name_hs","substanceType:substanceType_hs","s_uuid:s_uuid_hs","content:content_hss","SUMMARY.*"],"rows":20},"facet":{"owner_name":{"type":"terms","field":"owner_name_s","mincount":1,"limit":-1,"domain":{"excludeTags":"owner_name_tag","blockChildren":"type_s:substance"}},"reference_owner":{"type":"terms","field":"reference_owner_s","mincount":1,"limit":-1,"domain":{"excludeTags":"reference_owner_tag","blockChildren":"type_s:substance"}},"substanceType":{"type":"terms","field":"substanceType_s","mincount":1,"limit":-1,"domain":{"excludeTags":"substanceType_tag","blockChildren":"type_s:substance"}},"nm_name":{"type":"terms","field":"publicname_s","mincount":451,"limit":-1,"domain":{"excludeTags":"nm_name_tag","blockChildren":"type_s:substance"}},"protocol":{"type":"terms","field":"guidance_s","mincount":1,"limit":-1,"domain":{"excludeTags":"protocol_tag","blockChildren":"type_s:substance"}},"method":{"type":"terms","field":"E.method_s","mincount":1,"limit":-1,"domain":{"excludeTags":"method_tag","blockChildren":"type_s:substance"}},"cell":{"type":"terms","field":"E.cell_type_s","mincount":1,"limit":-1,"domain":{"excludeTags":"cell_tag","blockChildren":"type_s:substance"}},"species":{"type":"terms","field":"E.animal_model_s","mincount":1,"limit":-1,"domain":{"excludeTags":"species_tag","blockChildren":"type_s:substance"}},"route":{"type":"terms","field":"E.exposure_route_s","mincount":1,"limit":-1,"domain":{"excludeTags":"route_tag","blockChildren":"type_s:substance"}},"interpretation":{"type":"terms","field":"MEDIUM_s","mincount":2,"limit":-1,"domain":{"excludeTags":"interpretation_tag","blockChildren":"type_s:substance"}},"dprotocol":{"type":"terms","field":"Dispersion protocol_s","mincount":2,"limit":-1,"domain":{"excludeTags":"dprotocol_tag","blockChildren":"type_s:substance"}},"reference_year":{"type":"terms","field":"reference_year_s","mincount":2,"limit":-1,"domain":{"excludeTags":"reference_year_tag","blockChildren":"type_s:substance"}},"reference":{"type":"terms","field":"reference_s","mincount":2,"limit":-1,"domain":{"excludeTags":"reference_tag","blockChildren":"type_s:substance"}},"release":{"type":"terms","field":"updated_s","mincount":1,"limit":-1,"domain":{"excludeTags":"release_tag","blockChildren":"type_s:substance"}},"topcategory":{"type":"terms","field":"topcategory_s","mincount":1,"limit":-1,"facet":{"min":"min(loValue_d)","max":"max(loValue_d)","avg":"avg(loValue_d)","endpointcategory":{"type":"terms","field":"endpointcategory_s","mincount":1,"limit":-1,"facet":{"min":"min(loValue_d)","max":"max(loValue_d)","avg":"avg(loValue_d)","effectendpoint":{"type":"terms","field":"effectendpoint_s","mincount":1,"limit":-1,"facet":{"min":"min(loValue_d)","max":"max(loValue_d)","avg":"avg(loValue_d)","unit":{"type":"terms","field":"unit_s","mincount":1,"limit":-1,"facet":{"min":"min(loValue_d)","max":"max(loValue_d)","avg":"avg(loValue_d)"}}}}}}},"domain":{"blockChildren":"type_s:substance"}}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/select',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "params": {\n "fl": [\n "[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]",\n "dbtag_hss",\n "name:name_hs",\n "publicname:publicname_hs",\n "owner_name:owner_name_hs",\n "substanceType:substanceType_hs",\n "s_uuid:s_uuid_hs",\n "content:content_hss",\n "SUMMARY.*"\n ],\n "rows": 20\n },\n "facet": {\n "owner_name": {\n "type": "terms",\n "field": "owner_name_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "owner_name_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "reference_owner": {\n "type": "terms",\n "field": "reference_owner_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "reference_owner_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "substanceType": {\n "type": "terms",\n "field": "substanceType_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "substanceType_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "nm_name": {\n "type": "terms",\n "field": "publicname_s",\n "mincount": 451,\n "limit": -1,\n "domain": {\n "excludeTags": "nm_name_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "protocol": {\n "type": "terms",\n "field": "guidance_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "protocol_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "method": {\n "type": "terms",\n "field": "E.method_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "method_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "cell": {\n "type": "terms",\n "field": "E.cell_type_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "cell_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "species": {\n "type": "terms",\n "field": "E.animal_model_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "species_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "route": {\n "type": "terms",\n "field": "E.exposure_route_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "route_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "interpretation": {\n "type": "terms",\n "field": "MEDIUM_s",\n "mincount": 2,\n "limit": -1,\n "domain": {\n "excludeTags": "interpretation_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "dprotocol": {\n "type": "terms",\n "field": "Dispersion protocol_s",\n "mincount": 2,\n "limit": -1,\n "domain": {\n "excludeTags": "dprotocol_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "reference_year": {\n "type": "terms",\n "field": "reference_year_s",\n "mincount": 2,\n "limit": -1,\n "domain": {\n "excludeTags": "reference_year_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "reference": {\n "type": "terms",\n "field": "reference_s",\n "mincount": 2,\n "limit": -1,\n "domain": {\n "excludeTags": "reference_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "release": {\n "type": "terms",\n "field": "updated_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "release_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "topcategory": {\n "type": "terms",\n "field": "topcategory_s",\n "mincount": 1,\n "limit": -1,\n "facet": {\n "min": "min(loValue_d)",\n "max": "max(loValue_d)",\n "avg": "avg(loValue_d)",\n "endpointcategory": {\n "type": "terms",\n "field": "endpointcategory_s",\n "mincount": 1,\n "limit": -1,\n "facet": {\n "min": "min(loValue_d)",\n "max": "max(loValue_d)",\n "avg": "avg(loValue_d)",\n "effectendpoint": {\n "type": "terms",\n "field": "effectendpoint_s",\n "mincount": 1,\n "limit": -1,\n "facet": {\n "min": "min(loValue_d)",\n "max": "max(loValue_d)",\n "avg": "avg(loValue_d)",\n "unit": {\n "type": "terms",\n "field": "unit_s",\n "mincount": 1,\n "limit": -1,\n "facet": {\n "min": "min(loValue_d)",\n "max": "max(loValue_d)",\n "avg": "avg(loValue_d)"\n }\n }\n }\n }\n }\n }\n },\n "domain": {\n "blockChildren": "type_s:substance"\n }\n }\n }\n}\n '
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n ")
val request = Request.Builder()
.url("{{baseUrl}}/select")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/select',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
params: {
fl: [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
rows: 20
},
facet: {
owner_name: {
type: 'terms',
field: 'owner_name_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'owner_name_tag', blockChildren: 'type_s:substance'}
},
reference_owner: {
type: 'terms',
field: 'reference_owner_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'reference_owner_tag', blockChildren: 'type_s:substance'}
},
substanceType: {
type: 'terms',
field: 'substanceType_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'substanceType_tag', blockChildren: 'type_s:substance'}
},
nm_name: {
type: 'terms',
field: 'publicname_s',
mincount: 451,
limit: -1,
domain: {excludeTags: 'nm_name_tag', blockChildren: 'type_s:substance'}
},
protocol: {
type: 'terms',
field: 'guidance_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'protocol_tag', blockChildren: 'type_s:substance'}
},
method: {
type: 'terms',
field: 'E.method_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'method_tag', blockChildren: 'type_s:substance'}
},
cell: {
type: 'terms',
field: 'E.cell_type_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'cell_tag', blockChildren: 'type_s:substance'}
},
species: {
type: 'terms',
field: 'E.animal_model_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'species_tag', blockChildren: 'type_s:substance'}
},
route: {
type: 'terms',
field: 'E.exposure_route_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'route_tag', blockChildren: 'type_s:substance'}
},
interpretation: {
type: 'terms',
field: 'MEDIUM_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'interpretation_tag', blockChildren: 'type_s:substance'}
},
dprotocol: {
type: 'terms',
field: 'Dispersion protocol_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'dprotocol_tag', blockChildren: 'type_s:substance'}
},
reference_year: {
type: 'terms',
field: 'reference_year_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'reference_year_tag', blockChildren: 'type_s:substance'}
},
reference: {
type: 'terms',
field: 'reference_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'reference_tag', blockChildren: 'type_s:substance'}
},
release: {
type: 'terms',
field: 'updated_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'release_tag', blockChildren: 'type_s:substance'}
},
topcategory: {
type: 'terms',
field: 'topcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
endpointcategory: {
type: 'terms',
field: 'endpointcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
effectendpoint: {
type: 'terms',
field: 'effectendpoint_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
unit: {
type: 'terms',
field: 'unit_s',
mincount: 1,
limit: -1,
facet: {min: 'min(loValue_d)', max: 'max(loValue_d)', avg: 'avg(loValue_d)'}
}
}
}
}
}
},
domain: {blockChildren: 'type_s:substance'}
}
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/select',
headers: {'content-type': 'application/json'},
body: {
params: {
fl: [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
rows: 20
},
facet: {
owner_name: {
type: 'terms',
field: 'owner_name_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'owner_name_tag', blockChildren: 'type_s:substance'}
},
reference_owner: {
type: 'terms',
field: 'reference_owner_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'reference_owner_tag', blockChildren: 'type_s:substance'}
},
substanceType: {
type: 'terms',
field: 'substanceType_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'substanceType_tag', blockChildren: 'type_s:substance'}
},
nm_name: {
type: 'terms',
field: 'publicname_s',
mincount: 451,
limit: -1,
domain: {excludeTags: 'nm_name_tag', blockChildren: 'type_s:substance'}
},
protocol: {
type: 'terms',
field: 'guidance_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'protocol_tag', blockChildren: 'type_s:substance'}
},
method: {
type: 'terms',
field: 'E.method_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'method_tag', blockChildren: 'type_s:substance'}
},
cell: {
type: 'terms',
field: 'E.cell_type_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'cell_tag', blockChildren: 'type_s:substance'}
},
species: {
type: 'terms',
field: 'E.animal_model_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'species_tag', blockChildren: 'type_s:substance'}
},
route: {
type: 'terms',
field: 'E.exposure_route_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'route_tag', blockChildren: 'type_s:substance'}
},
interpretation: {
type: 'terms',
field: 'MEDIUM_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'interpretation_tag', blockChildren: 'type_s:substance'}
},
dprotocol: {
type: 'terms',
field: 'Dispersion protocol_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'dprotocol_tag', blockChildren: 'type_s:substance'}
},
reference_year: {
type: 'terms',
field: 'reference_year_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'reference_year_tag', blockChildren: 'type_s:substance'}
},
reference: {
type: 'terms',
field: 'reference_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'reference_tag', blockChildren: 'type_s:substance'}
},
release: {
type: 'terms',
field: 'updated_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'release_tag', blockChildren: 'type_s:substance'}
},
topcategory: {
type: 'terms',
field: 'topcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
endpointcategory: {
type: 'terms',
field: 'endpointcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
effectendpoint: {
type: 'terms',
field: 'effectendpoint_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
unit: {
type: 'terms',
field: 'unit_s',
mincount: 1,
limit: -1,
facet: {min: 'min(loValue_d)', max: 'max(loValue_d)', avg: 'avg(loValue_d)'}
}
}
}
}
}
},
domain: {blockChildren: 'type_s:substance'}
}
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/select');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
params: {
fl: [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
rows: 20
},
facet: {
owner_name: {
type: 'terms',
field: 'owner_name_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'owner_name_tag',
blockChildren: 'type_s:substance'
}
},
reference_owner: {
type: 'terms',
field: 'reference_owner_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'reference_owner_tag',
blockChildren: 'type_s:substance'
}
},
substanceType: {
type: 'terms',
field: 'substanceType_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'substanceType_tag',
blockChildren: 'type_s:substance'
}
},
nm_name: {
type: 'terms',
field: 'publicname_s',
mincount: 451,
limit: -1,
domain: {
excludeTags: 'nm_name_tag',
blockChildren: 'type_s:substance'
}
},
protocol: {
type: 'terms',
field: 'guidance_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'protocol_tag',
blockChildren: 'type_s:substance'
}
},
method: {
type: 'terms',
field: 'E.method_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'method_tag',
blockChildren: 'type_s:substance'
}
},
cell: {
type: 'terms',
field: 'E.cell_type_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'cell_tag',
blockChildren: 'type_s:substance'
}
},
species: {
type: 'terms',
field: 'E.animal_model_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'species_tag',
blockChildren: 'type_s:substance'
}
},
route: {
type: 'terms',
field: 'E.exposure_route_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'route_tag',
blockChildren: 'type_s:substance'
}
},
interpretation: {
type: 'terms',
field: 'MEDIUM_s',
mincount: 2,
limit: -1,
domain: {
excludeTags: 'interpretation_tag',
blockChildren: 'type_s:substance'
}
},
dprotocol: {
type: 'terms',
field: 'Dispersion protocol_s',
mincount: 2,
limit: -1,
domain: {
excludeTags: 'dprotocol_tag',
blockChildren: 'type_s:substance'
}
},
reference_year: {
type: 'terms',
field: 'reference_year_s',
mincount: 2,
limit: -1,
domain: {
excludeTags: 'reference_year_tag',
blockChildren: 'type_s:substance'
}
},
reference: {
type: 'terms',
field: 'reference_s',
mincount: 2,
limit: -1,
domain: {
excludeTags: 'reference_tag',
blockChildren: 'type_s:substance'
}
},
release: {
type: 'terms',
field: 'updated_s',
mincount: 1,
limit: -1,
domain: {
excludeTags: 'release_tag',
blockChildren: 'type_s:substance'
}
},
topcategory: {
type: 'terms',
field: 'topcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
endpointcategory: {
type: 'terms',
field: 'endpointcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
effectendpoint: {
type: 'terms',
field: 'effectendpoint_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
unit: {
type: 'terms',
field: 'unit_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)'
}
}
}
}
}
}
},
domain: {
blockChildren: 'type_s:substance'
}
}
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/select',
headers: {'content-type': 'application/json'},
data: {
params: {
fl: [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
rows: 20
},
facet: {
owner_name: {
type: 'terms',
field: 'owner_name_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'owner_name_tag', blockChildren: 'type_s:substance'}
},
reference_owner: {
type: 'terms',
field: 'reference_owner_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'reference_owner_tag', blockChildren: 'type_s:substance'}
},
substanceType: {
type: 'terms',
field: 'substanceType_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'substanceType_tag', blockChildren: 'type_s:substance'}
},
nm_name: {
type: 'terms',
field: 'publicname_s',
mincount: 451,
limit: -1,
domain: {excludeTags: 'nm_name_tag', blockChildren: 'type_s:substance'}
},
protocol: {
type: 'terms',
field: 'guidance_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'protocol_tag', blockChildren: 'type_s:substance'}
},
method: {
type: 'terms',
field: 'E.method_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'method_tag', blockChildren: 'type_s:substance'}
},
cell: {
type: 'terms',
field: 'E.cell_type_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'cell_tag', blockChildren: 'type_s:substance'}
},
species: {
type: 'terms',
field: 'E.animal_model_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'species_tag', blockChildren: 'type_s:substance'}
},
route: {
type: 'terms',
field: 'E.exposure_route_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'route_tag', blockChildren: 'type_s:substance'}
},
interpretation: {
type: 'terms',
field: 'MEDIUM_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'interpretation_tag', blockChildren: 'type_s:substance'}
},
dprotocol: {
type: 'terms',
field: 'Dispersion protocol_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'dprotocol_tag', blockChildren: 'type_s:substance'}
},
reference_year: {
type: 'terms',
field: 'reference_year_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'reference_year_tag', blockChildren: 'type_s:substance'}
},
reference: {
type: 'terms',
field: 'reference_s',
mincount: 2,
limit: -1,
domain: {excludeTags: 'reference_tag', blockChildren: 'type_s:substance'}
},
release: {
type: 'terms',
field: 'updated_s',
mincount: 1,
limit: -1,
domain: {excludeTags: 'release_tag', blockChildren: 'type_s:substance'}
},
topcategory: {
type: 'terms',
field: 'topcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
endpointcategory: {
type: 'terms',
field: 'endpointcategory_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
effectendpoint: {
type: 'terms',
field: 'effectendpoint_s',
mincount: 1,
limit: -1,
facet: {
min: 'min(loValue_d)',
max: 'max(loValue_d)',
avg: 'avg(loValue_d)',
unit: {
type: 'terms',
field: 'unit_s',
mincount: 1,
limit: -1,
facet: {min: 'min(loValue_d)', max: 'max(loValue_d)', avg: 'avg(loValue_d)'}
}
}
}
}
}
},
domain: {blockChildren: 'type_s:substance'}
}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/select';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"params":{"fl":["[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]","dbtag_hss","name:name_hs","publicname:publicname_hs","owner_name:owner_name_hs","substanceType:substanceType_hs","s_uuid:s_uuid_hs","content:content_hss","SUMMARY.*"],"rows":20},"facet":{"owner_name":{"type":"terms","field":"owner_name_s","mincount":1,"limit":-1,"domain":{"excludeTags":"owner_name_tag","blockChildren":"type_s:substance"}},"reference_owner":{"type":"terms","field":"reference_owner_s","mincount":1,"limit":-1,"domain":{"excludeTags":"reference_owner_tag","blockChildren":"type_s:substance"}},"substanceType":{"type":"terms","field":"substanceType_s","mincount":1,"limit":-1,"domain":{"excludeTags":"substanceType_tag","blockChildren":"type_s:substance"}},"nm_name":{"type":"terms","field":"publicname_s","mincount":451,"limit":-1,"domain":{"excludeTags":"nm_name_tag","blockChildren":"type_s:substance"}},"protocol":{"type":"terms","field":"guidance_s","mincount":1,"limit":-1,"domain":{"excludeTags":"protocol_tag","blockChildren":"type_s:substance"}},"method":{"type":"terms","field":"E.method_s","mincount":1,"limit":-1,"domain":{"excludeTags":"method_tag","blockChildren":"type_s:substance"}},"cell":{"type":"terms","field":"E.cell_type_s","mincount":1,"limit":-1,"domain":{"excludeTags":"cell_tag","blockChildren":"type_s:substance"}},"species":{"type":"terms","field":"E.animal_model_s","mincount":1,"limit":-1,"domain":{"excludeTags":"species_tag","blockChildren":"type_s:substance"}},"route":{"type":"terms","field":"E.exposure_route_s","mincount":1,"limit":-1,"domain":{"excludeTags":"route_tag","blockChildren":"type_s:substance"}},"interpretation":{"type":"terms","field":"MEDIUM_s","mincount":2,"limit":-1,"domain":{"excludeTags":"interpretation_tag","blockChildren":"type_s:substance"}},"dprotocol":{"type":"terms","field":"Dispersion protocol_s","mincount":2,"limit":-1,"domain":{"excludeTags":"dprotocol_tag","blockChildren":"type_s:substance"}},"reference_year":{"type":"terms","field":"reference_year_s","mincount":2,"limit":-1,"domain":{"excludeTags":"reference_year_tag","blockChildren":"type_s:substance"}},"reference":{"type":"terms","field":"reference_s","mincount":2,"limit":-1,"domain":{"excludeTags":"reference_tag","blockChildren":"type_s:substance"}},"release":{"type":"terms","field":"updated_s","mincount":1,"limit":-1,"domain":{"excludeTags":"release_tag","blockChildren":"type_s:substance"}},"topcategory":{"type":"terms","field":"topcategory_s","mincount":1,"limit":-1,"facet":{"min":"min(loValue_d)","max":"max(loValue_d)","avg":"avg(loValue_d)","endpointcategory":{"type":"terms","field":"endpointcategory_s","mincount":1,"limit":-1,"facet":{"min":"min(loValue_d)","max":"max(loValue_d)","avg":"avg(loValue_d)","effectendpoint":{"type":"terms","field":"effectendpoint_s","mincount":1,"limit":-1,"facet":{"min":"min(loValue_d)","max":"max(loValue_d)","avg":"avg(loValue_d)","unit":{"type":"terms","field":"unit_s","mincount":1,"limit":-1,"facet":{"min":"min(loValue_d)","max":"max(loValue_d)","avg":"avg(loValue_d)"}}}}}}},"domain":{"blockChildren":"type_s:substance"}}}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"params": @{ @"fl": @[ @"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]", @"dbtag_hss", @"name:name_hs", @"publicname:publicname_hs", @"owner_name:owner_name_hs", @"substanceType:substanceType_hs", @"s_uuid:s_uuid_hs", @"content:content_hss", @"SUMMARY.*" ], @"rows": @20 },
@"facet": @{ @"owner_name": @{ @"type": @"terms", @"field": @"owner_name_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"owner_name_tag", @"blockChildren": @"type_s:substance" } }, @"reference_owner": @{ @"type": @"terms", @"field": @"reference_owner_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"reference_owner_tag", @"blockChildren": @"type_s:substance" } }, @"substanceType": @{ @"type": @"terms", @"field": @"substanceType_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"substanceType_tag", @"blockChildren": @"type_s:substance" } }, @"nm_name": @{ @"type": @"terms", @"field": @"publicname_s", @"mincount": @451, @"limit": @-1, @"domain": @{ @"excludeTags": @"nm_name_tag", @"blockChildren": @"type_s:substance" } }, @"protocol": @{ @"type": @"terms", @"field": @"guidance_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"protocol_tag", @"blockChildren": @"type_s:substance" } }, @"method": @{ @"type": @"terms", @"field": @"E.method_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"method_tag", @"blockChildren": @"type_s:substance" } }, @"cell": @{ @"type": @"terms", @"field": @"E.cell_type_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"cell_tag", @"blockChildren": @"type_s:substance" } }, @"species": @{ @"type": @"terms", @"field": @"E.animal_model_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"species_tag", @"blockChildren": @"type_s:substance" } }, @"route": @{ @"type": @"terms", @"field": @"E.exposure_route_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"route_tag", @"blockChildren": @"type_s:substance" } }, @"interpretation": @{ @"type": @"terms", @"field": @"MEDIUM_s", @"mincount": @2, @"limit": @-1, @"domain": @{ @"excludeTags": @"interpretation_tag", @"blockChildren": @"type_s:substance" } }, @"dprotocol": @{ @"type": @"terms", @"field": @"Dispersion protocol_s", @"mincount": @2, @"limit": @-1, @"domain": @{ @"excludeTags": @"dprotocol_tag", @"blockChildren": @"type_s:substance" } }, @"reference_year": @{ @"type": @"terms", @"field": @"reference_year_s", @"mincount": @2, @"limit": @-1, @"domain": @{ @"excludeTags": @"reference_year_tag", @"blockChildren": @"type_s:substance" } }, @"reference": @{ @"type": @"terms", @"field": @"reference_s", @"mincount": @2, @"limit": @-1, @"domain": @{ @"excludeTags": @"reference_tag", @"blockChildren": @"type_s:substance" } }, @"release": @{ @"type": @"terms", @"field": @"updated_s", @"mincount": @1, @"limit": @-1, @"domain": @{ @"excludeTags": @"release_tag", @"blockChildren": @"type_s:substance" } }, @"topcategory": @{ @"type": @"terms", @"field": @"topcategory_s", @"mincount": @1, @"limit": @-1, @"facet": @{ @"min": @"min(loValue_d)", @"max": @"max(loValue_d)", @"avg": @"avg(loValue_d)", @"endpointcategory": @{ @"type": @"terms", @"field": @"endpointcategory_s", @"mincount": @1, @"limit": @-1, @"facet": @{ @"min": @"min(loValue_d)", @"max": @"max(loValue_d)", @"avg": @"avg(loValue_d)", @"effectendpoint": @{ @"type": @"terms", @"field": @"effectendpoint_s", @"mincount": @1, @"limit": @-1, @"facet": @{ @"min": @"min(loValue_d)", @"max": @"max(loValue_d)", @"avg": @"avg(loValue_d)", @"unit": @{ @"type": @"terms", @"field": @"unit_s", @"mincount": @1, @"limit": @-1, @"facet": @{ @"min": @"min(loValue_d)", @"max": @"max(loValue_d)", @"avg": @"avg(loValue_d)" } } } } } } }, @"domain": @{ @"blockChildren": @"type_s:substance" } } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/select"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/select" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n " in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/select",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'params' => [
'fl' => [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
'rows' => 20
],
'facet' => [
'owner_name' => [
'type' => 'terms',
'field' => 'owner_name_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'owner_name_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference_owner' => [
'type' => 'terms',
'field' => 'reference_owner_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_owner_tag',
'blockChildren' => 'type_s:substance'
]
],
'substanceType' => [
'type' => 'terms',
'field' => 'substanceType_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'substanceType_tag',
'blockChildren' => 'type_s:substance'
]
],
'nm_name' => [
'type' => 'terms',
'field' => 'publicname_s',
'mincount' => 451,
'limit' => -1,
'domain' => [
'excludeTags' => 'nm_name_tag',
'blockChildren' => 'type_s:substance'
]
],
'protocol' => [
'type' => 'terms',
'field' => 'guidance_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'protocol_tag',
'blockChildren' => 'type_s:substance'
]
],
'method' => [
'type' => 'terms',
'field' => 'E.method_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'method_tag',
'blockChildren' => 'type_s:substance'
]
],
'cell' => [
'type' => 'terms',
'field' => 'E.cell_type_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'cell_tag',
'blockChildren' => 'type_s:substance'
]
],
'species' => [
'type' => 'terms',
'field' => 'E.animal_model_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'species_tag',
'blockChildren' => 'type_s:substance'
]
],
'route' => [
'type' => 'terms',
'field' => 'E.exposure_route_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'route_tag',
'blockChildren' => 'type_s:substance'
]
],
'interpretation' => [
'type' => 'terms',
'field' => 'MEDIUM_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'interpretation_tag',
'blockChildren' => 'type_s:substance'
]
],
'dprotocol' => [
'type' => 'terms',
'field' => 'Dispersion protocol_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'dprotocol_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference_year' => [
'type' => 'terms',
'field' => 'reference_year_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_year_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference' => [
'type' => 'terms',
'field' => 'reference_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_tag',
'blockChildren' => 'type_s:substance'
]
],
'release' => [
'type' => 'terms',
'field' => 'updated_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'release_tag',
'blockChildren' => 'type_s:substance'
]
],
'topcategory' => [
'type' => 'terms',
'field' => 'topcategory_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'endpointcategory' => [
'type' => 'terms',
'field' => 'endpointcategory_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'effectendpoint' => [
'type' => 'terms',
'field' => 'effectendpoint_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'unit' => [
'type' => 'terms',
'field' => 'unit_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)'
]
]
]
]
]
]
],
'domain' => [
'blockChildren' => 'type_s:substance'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/select', [
'body' => '{
"params": {
"fl": [
"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]",
"dbtag_hss",
"name:name_hs",
"publicname:publicname_hs",
"owner_name:owner_name_hs",
"substanceType:substanceType_hs",
"s_uuid:s_uuid_hs",
"content:content_hss",
"SUMMARY.*"
],
"rows": 20
},
"facet": {
"owner_name": {
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
}
},
"reference_owner": {
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
}
},
"substanceType": {
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
}
},
"nm_name": {
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": {
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
}
},
"protocol": {
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
}
},
"method": {
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
}
},
"cell": {
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
}
},
"species": {
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
}
},
"route": {
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
}
},
"interpretation": {
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
}
},
"dprotocol": {
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
}
},
"reference_year": {
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
}
},
"reference": {
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
}
},
"release": {
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
}
},
"topcategory": {
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": {
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": {
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": {
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
}
}
}
}
}
}
},
"domain": {
"blockChildren": "type_s:substance"
}
}
}
}
',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/select');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'params' => [
'fl' => [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
'rows' => 20
],
'facet' => [
'owner_name' => [
'type' => 'terms',
'field' => 'owner_name_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'owner_name_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference_owner' => [
'type' => 'terms',
'field' => 'reference_owner_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_owner_tag',
'blockChildren' => 'type_s:substance'
]
],
'substanceType' => [
'type' => 'terms',
'field' => 'substanceType_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'substanceType_tag',
'blockChildren' => 'type_s:substance'
]
],
'nm_name' => [
'type' => 'terms',
'field' => 'publicname_s',
'mincount' => 451,
'limit' => -1,
'domain' => [
'excludeTags' => 'nm_name_tag',
'blockChildren' => 'type_s:substance'
]
],
'protocol' => [
'type' => 'terms',
'field' => 'guidance_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'protocol_tag',
'blockChildren' => 'type_s:substance'
]
],
'method' => [
'type' => 'terms',
'field' => 'E.method_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'method_tag',
'blockChildren' => 'type_s:substance'
]
],
'cell' => [
'type' => 'terms',
'field' => 'E.cell_type_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'cell_tag',
'blockChildren' => 'type_s:substance'
]
],
'species' => [
'type' => 'terms',
'field' => 'E.animal_model_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'species_tag',
'blockChildren' => 'type_s:substance'
]
],
'route' => [
'type' => 'terms',
'field' => 'E.exposure_route_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'route_tag',
'blockChildren' => 'type_s:substance'
]
],
'interpretation' => [
'type' => 'terms',
'field' => 'MEDIUM_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'interpretation_tag',
'blockChildren' => 'type_s:substance'
]
],
'dprotocol' => [
'type' => 'terms',
'field' => 'Dispersion protocol_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'dprotocol_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference_year' => [
'type' => 'terms',
'field' => 'reference_year_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_year_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference' => [
'type' => 'terms',
'field' => 'reference_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_tag',
'blockChildren' => 'type_s:substance'
]
],
'release' => [
'type' => 'terms',
'field' => 'updated_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'release_tag',
'blockChildren' => 'type_s:substance'
]
],
'topcategory' => [
'type' => 'terms',
'field' => 'topcategory_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'endpointcategory' => [
'type' => 'terms',
'field' => 'endpointcategory_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'effectendpoint' => [
'type' => 'terms',
'field' => 'effectendpoint_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'unit' => [
'type' => 'terms',
'field' => 'unit_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)'
]
]
]
]
]
]
],
'domain' => [
'blockChildren' => 'type_s:substance'
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'params' => [
'fl' => [
'[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]',
'dbtag_hss',
'name:name_hs',
'publicname:publicname_hs',
'owner_name:owner_name_hs',
'substanceType:substanceType_hs',
's_uuid:s_uuid_hs',
'content:content_hss',
'SUMMARY.*'
],
'rows' => 20
],
'facet' => [
'owner_name' => [
'type' => 'terms',
'field' => 'owner_name_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'owner_name_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference_owner' => [
'type' => 'terms',
'field' => 'reference_owner_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_owner_tag',
'blockChildren' => 'type_s:substance'
]
],
'substanceType' => [
'type' => 'terms',
'field' => 'substanceType_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'substanceType_tag',
'blockChildren' => 'type_s:substance'
]
],
'nm_name' => [
'type' => 'terms',
'field' => 'publicname_s',
'mincount' => 451,
'limit' => -1,
'domain' => [
'excludeTags' => 'nm_name_tag',
'blockChildren' => 'type_s:substance'
]
],
'protocol' => [
'type' => 'terms',
'field' => 'guidance_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'protocol_tag',
'blockChildren' => 'type_s:substance'
]
],
'method' => [
'type' => 'terms',
'field' => 'E.method_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'method_tag',
'blockChildren' => 'type_s:substance'
]
],
'cell' => [
'type' => 'terms',
'field' => 'E.cell_type_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'cell_tag',
'blockChildren' => 'type_s:substance'
]
],
'species' => [
'type' => 'terms',
'field' => 'E.animal_model_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'species_tag',
'blockChildren' => 'type_s:substance'
]
],
'route' => [
'type' => 'terms',
'field' => 'E.exposure_route_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'route_tag',
'blockChildren' => 'type_s:substance'
]
],
'interpretation' => [
'type' => 'terms',
'field' => 'MEDIUM_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'interpretation_tag',
'blockChildren' => 'type_s:substance'
]
],
'dprotocol' => [
'type' => 'terms',
'field' => 'Dispersion protocol_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'dprotocol_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference_year' => [
'type' => 'terms',
'field' => 'reference_year_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_year_tag',
'blockChildren' => 'type_s:substance'
]
],
'reference' => [
'type' => 'terms',
'field' => 'reference_s',
'mincount' => 2,
'limit' => -1,
'domain' => [
'excludeTags' => 'reference_tag',
'blockChildren' => 'type_s:substance'
]
],
'release' => [
'type' => 'terms',
'field' => 'updated_s',
'mincount' => 1,
'limit' => -1,
'domain' => [
'excludeTags' => 'release_tag',
'blockChildren' => 'type_s:substance'
]
],
'topcategory' => [
'type' => 'terms',
'field' => 'topcategory_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'endpointcategory' => [
'type' => 'terms',
'field' => 'endpointcategory_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'effectendpoint' => [
'type' => 'terms',
'field' => 'effectendpoint_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)',
'unit' => [
'type' => 'terms',
'field' => 'unit_s',
'mincount' => 1,
'limit' => -1,
'facet' => [
'min' => 'min(loValue_d)',
'max' => 'max(loValue_d)',
'avg' => 'avg(loValue_d)'
]
]
]
]
]
]
],
'domain' => [
'blockChildren' => 'type_s:substance'
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/select');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/select' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"params": {
"fl": [
"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]",
"dbtag_hss",
"name:name_hs",
"publicname:publicname_hs",
"owner_name:owner_name_hs",
"substanceType:substanceType_hs",
"s_uuid:s_uuid_hs",
"content:content_hss",
"SUMMARY.*"
],
"rows": 20
},
"facet": {
"owner_name": {
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
}
},
"reference_owner": {
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
}
},
"substanceType": {
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
}
},
"nm_name": {
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": {
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
}
},
"protocol": {
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
}
},
"method": {
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
}
},
"cell": {
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
}
},
"species": {
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
}
},
"route": {
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
}
},
"interpretation": {
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
}
},
"dprotocol": {
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
}
},
"reference_year": {
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
}
},
"reference": {
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
}
},
"release": {
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
}
},
"topcategory": {
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": {
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": {
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": {
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
}
}
}
}
}
}
},
"domain": {
"blockChildren": "type_s:substance"
}
}
}
}
'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/select' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"params": {
"fl": [
"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]",
"dbtag_hss",
"name:name_hs",
"publicname:publicname_hs",
"owner_name:owner_name_hs",
"substanceType:substanceType_hs",
"s_uuid:s_uuid_hs",
"content:content_hss",
"SUMMARY.*"
],
"rows": 20
},
"facet": {
"owner_name": {
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
}
},
"reference_owner": {
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
}
},
"substanceType": {
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
}
},
"nm_name": {
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": {
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
}
},
"protocol": {
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
}
},
"method": {
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
}
},
"cell": {
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
}
},
"species": {
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
}
},
"route": {
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
}
},
"interpretation": {
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
}
},
"dprotocol": {
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
}
},
"reference_year": {
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
}
},
"reference": {
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
}
},
"release": {
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
}
},
"topcategory": {
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": {
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": {
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": {
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
}
}
}
}
}
}
},
"domain": {
"blockChildren": "type_s:substance"
}
}
}
}
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n "
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/select", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/select"
payload = {
"params": {
"fl": ["[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]", "dbtag_hss", "name:name_hs", "publicname:publicname_hs", "owner_name:owner_name_hs", "substanceType:substanceType_hs", "s_uuid:s_uuid_hs", "content:content_hss", "SUMMARY.*"],
"rows": 20
},
"facet": {
"owner_name": {
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
}
},
"reference_owner": {
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
}
},
"substanceType": {
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
}
},
"nm_name": {
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": {
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
}
},
"protocol": {
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
}
},
"method": {
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
}
},
"cell": {
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
}
},
"species": {
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
}
},
"route": {
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
}
},
"interpretation": {
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
}
},
"dprotocol": {
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
}
},
"reference_year": {
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
}
},
"reference": {
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
}
},
"release": {
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
}
},
"topcategory": {
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": {
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": {
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": {
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
}
}
}
}
}
}
},
"domain": { "blockChildren": "type_s:substance" }
}
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/select"
payload <- "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n "
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/select")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n "
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/select') do |req|
req.body = "{\n \"params\": {\n \"fl\": [\n \"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]\",\n \"dbtag_hss\",\n \"name:name_hs\",\n \"publicname:publicname_hs\",\n \"owner_name:owner_name_hs\",\n \"substanceType:substanceType_hs\",\n \"s_uuid:s_uuid_hs\",\n \"content:content_hss\",\n \"SUMMARY.*\"\n ],\n \"rows\": 20\n },\n \"facet\": {\n \"owner_name\": {\n \"type\": \"terms\",\n \"field\": \"owner_name_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"owner_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_owner\": {\n \"type\": \"terms\",\n \"field\": \"reference_owner_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_owner_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"substanceType\": {\n \"type\": \"terms\",\n \"field\": \"substanceType_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"substanceType_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"nm_name\": {\n \"type\": \"terms\",\n \"field\": \"publicname_s\",\n \"mincount\": 451,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"nm_name_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"protocol\": {\n \"type\": \"terms\",\n \"field\": \"guidance_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"protocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"method\": {\n \"type\": \"terms\",\n \"field\": \"E.method_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"method_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"cell\": {\n \"type\": \"terms\",\n \"field\": \"E.cell_type_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"cell_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"species\": {\n \"type\": \"terms\",\n \"field\": \"E.animal_model_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"species_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"route\": {\n \"type\": \"terms\",\n \"field\": \"E.exposure_route_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"route_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"interpretation\": {\n \"type\": \"terms\",\n \"field\": \"MEDIUM_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"interpretation_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"dprotocol\": {\n \"type\": \"terms\",\n \"field\": \"Dispersion protocol_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"dprotocol_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference_year\": {\n \"type\": \"terms\",\n \"field\": \"reference_year_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_year_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"reference\": {\n \"type\": \"terms\",\n \"field\": \"reference_s\",\n \"mincount\": 2,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"reference_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"release\": {\n \"type\": \"terms\",\n \"field\": \"updated_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"domain\": {\n \"excludeTags\": \"release_tag\",\n \"blockChildren\": \"type_s:substance\"\n }\n },\n \"topcategory\": {\n \"type\": \"terms\",\n \"field\": \"topcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"endpointcategory\": {\n \"type\": \"terms\",\n \"field\": \"endpointcategory_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"effectendpoint\": {\n \"type\": \"terms\",\n \"field\": \"effectendpoint_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\",\n \"unit\": {\n \"type\": \"terms\",\n \"field\": \"unit_s\",\n \"mincount\": 1,\n \"limit\": -1,\n \"facet\": {\n \"min\": \"min(loValue_d)\",\n \"max\": \"max(loValue_d)\",\n \"avg\": \"avg(loValue_d)\"\n }\n }\n }\n }\n }\n }\n },\n \"domain\": {\n \"blockChildren\": \"type_s:substance\"\n }\n }\n }\n}\n "
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/select";
let payload = json!({
"params": json!({
"fl": ("[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]", "dbtag_hss", "name:name_hs", "publicname:publicname_hs", "owner_name:owner_name_hs", "substanceType:substanceType_hs", "s_uuid:s_uuid_hs", "content:content_hss", "SUMMARY.*"),
"rows": 20
}),
"facet": json!({
"owner_name": json!({
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
})
}),
"reference_owner": json!({
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
})
}),
"substanceType": json!({
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
})
}),
"nm_name": json!({
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": json!({
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
})
}),
"protocol": json!({
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
})
}),
"method": json!({
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
})
}),
"cell": json!({
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
})
}),
"species": json!({
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
})
}),
"route": json!({
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
})
}),
"interpretation": json!({
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": json!({
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
})
}),
"dprotocol": json!({
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": json!({
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
})
}),
"reference_year": json!({
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": json!({
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
})
}),
"reference": json!({
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": json!({
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
})
}),
"release": json!({
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": json!({
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
})
}),
"topcategory": json!({
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": json!({
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": json!({
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": json!({
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": json!({
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": json!({
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": json!({
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": json!({
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
})
})
})
})
})
})
}),
"domain": json!({"blockChildren": "type_s:substance"})
})
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/select \
--header 'content-type: application/json' \
--data '{
"params": {
"fl": [
"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]",
"dbtag_hss",
"name:name_hs",
"publicname:publicname_hs",
"owner_name:owner_name_hs",
"substanceType:substanceType_hs",
"s_uuid:s_uuid_hs",
"content:content_hss",
"SUMMARY.*"
],
"rows": 20
},
"facet": {
"owner_name": {
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
}
},
"reference_owner": {
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
}
},
"substanceType": {
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
}
},
"nm_name": {
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": {
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
}
},
"protocol": {
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
}
},
"method": {
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
}
},
"cell": {
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
}
},
"species": {
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
}
},
"route": {
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
}
},
"interpretation": {
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
}
},
"dprotocol": {
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
}
},
"reference_year": {
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
}
},
"reference": {
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
}
},
"release": {
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
}
},
"topcategory": {
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": {
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": {
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": {
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
}
}
}
}
}
}
},
"domain": {
"blockChildren": "type_s:substance"
}
}
}
}
'
echo '{
"params": {
"fl": [
"[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]",
"dbtag_hss",
"name:name_hs",
"publicname:publicname_hs",
"owner_name:owner_name_hs",
"substanceType:substanceType_hs",
"s_uuid:s_uuid_hs",
"content:content_hss",
"SUMMARY.*"
],
"rows": 20
},
"facet": {
"owner_name": {
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
}
},
"reference_owner": {
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
}
},
"substanceType": {
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
}
},
"nm_name": {
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": {
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
}
},
"protocol": {
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
}
},
"method": {
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
}
},
"cell": {
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
}
},
"species": {
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
}
},
"route": {
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
}
},
"interpretation": {
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
}
},
"dprotocol": {
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
}
},
"reference_year": {
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
}
},
"reference": {
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": {
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
}
},
"release": {
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": {
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
}
},
"topcategory": {
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": {
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": {
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": {
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": {
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
}
}
}
}
}
}
},
"domain": {
"blockChildren": "type_s:substance"
}
}
}
}
' | \
http POST {{baseUrl}}/select \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "params": {\n "fl": [\n "[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]",\n "dbtag_hss",\n "name:name_hs",\n "publicname:publicname_hs",\n "owner_name:owner_name_hs",\n "substanceType:substanceType_hs",\n "s_uuid:s_uuid_hs",\n "content:content_hss",\n "SUMMARY.*"\n ],\n "rows": 20\n },\n "facet": {\n "owner_name": {\n "type": "terms",\n "field": "owner_name_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "owner_name_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "reference_owner": {\n "type": "terms",\n "field": "reference_owner_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "reference_owner_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "substanceType": {\n "type": "terms",\n "field": "substanceType_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "substanceType_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "nm_name": {\n "type": "terms",\n "field": "publicname_s",\n "mincount": 451,\n "limit": -1,\n "domain": {\n "excludeTags": "nm_name_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "protocol": {\n "type": "terms",\n "field": "guidance_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "protocol_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "method": {\n "type": "terms",\n "field": "E.method_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "method_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "cell": {\n "type": "terms",\n "field": "E.cell_type_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "cell_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "species": {\n "type": "terms",\n "field": "E.animal_model_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "species_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "route": {\n "type": "terms",\n "field": "E.exposure_route_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "route_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "interpretation": {\n "type": "terms",\n "field": "MEDIUM_s",\n "mincount": 2,\n "limit": -1,\n "domain": {\n "excludeTags": "interpretation_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "dprotocol": {\n "type": "terms",\n "field": "Dispersion protocol_s",\n "mincount": 2,\n "limit": -1,\n "domain": {\n "excludeTags": "dprotocol_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "reference_year": {\n "type": "terms",\n "field": "reference_year_s",\n "mincount": 2,\n "limit": -1,\n "domain": {\n "excludeTags": "reference_year_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "reference": {\n "type": "terms",\n "field": "reference_s",\n "mincount": 2,\n "limit": -1,\n "domain": {\n "excludeTags": "reference_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "release": {\n "type": "terms",\n "field": "updated_s",\n "mincount": 1,\n "limit": -1,\n "domain": {\n "excludeTags": "release_tag",\n "blockChildren": "type_s:substance"\n }\n },\n "topcategory": {\n "type": "terms",\n "field": "topcategory_s",\n "mincount": 1,\n "limit": -1,\n "facet": {\n "min": "min(loValue_d)",\n "max": "max(loValue_d)",\n "avg": "avg(loValue_d)",\n "endpointcategory": {\n "type": "terms",\n "field": "endpointcategory_s",\n "mincount": 1,\n "limit": -1,\n "facet": {\n "min": "min(loValue_d)",\n "max": "max(loValue_d)",\n "avg": "avg(loValue_d)",\n "effectendpoint": {\n "type": "terms",\n "field": "effectendpoint_s",\n "mincount": 1,\n "limit": -1,\n "facet": {\n "min": "min(loValue_d)",\n "max": "max(loValue_d)",\n "avg": "avg(loValue_d)",\n "unit": {\n "type": "terms",\n "field": "unit_s",\n "mincount": 1,\n "limit": -1,\n "facet": {\n "min": "min(loValue_d)",\n "max": "max(loValue_d)",\n "avg": "avg(loValue_d)"\n }\n }\n }\n }\n }\n }\n },\n "domain": {\n "blockChildren": "type_s:substance"\n }\n }\n }\n}\n ' \
--output-document \
- {{baseUrl}}/select
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"params": [
"fl": ["[child parentFilter=type_s:substance childFilter=type_s:composition limit=100]", "dbtag_hss", "name:name_hs", "publicname:publicname_hs", "owner_name:owner_name_hs", "substanceType:substanceType_hs", "s_uuid:s_uuid_hs", "content:content_hss", "SUMMARY.*"],
"rows": 20
],
"facet": [
"owner_name": [
"type": "terms",
"field": "owner_name_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "owner_name_tag",
"blockChildren": "type_s:substance"
]
],
"reference_owner": [
"type": "terms",
"field": "reference_owner_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "reference_owner_tag",
"blockChildren": "type_s:substance"
]
],
"substanceType": [
"type": "terms",
"field": "substanceType_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "substanceType_tag",
"blockChildren": "type_s:substance"
]
],
"nm_name": [
"type": "terms",
"field": "publicname_s",
"mincount": 451,
"limit": -1,
"domain": [
"excludeTags": "nm_name_tag",
"blockChildren": "type_s:substance"
]
],
"protocol": [
"type": "terms",
"field": "guidance_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "protocol_tag",
"blockChildren": "type_s:substance"
]
],
"method": [
"type": "terms",
"field": "E.method_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "method_tag",
"blockChildren": "type_s:substance"
]
],
"cell": [
"type": "terms",
"field": "E.cell_type_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "cell_tag",
"blockChildren": "type_s:substance"
]
],
"species": [
"type": "terms",
"field": "E.animal_model_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "species_tag",
"blockChildren": "type_s:substance"
]
],
"route": [
"type": "terms",
"field": "E.exposure_route_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "route_tag",
"blockChildren": "type_s:substance"
]
],
"interpretation": [
"type": "terms",
"field": "MEDIUM_s",
"mincount": 2,
"limit": -1,
"domain": [
"excludeTags": "interpretation_tag",
"blockChildren": "type_s:substance"
]
],
"dprotocol": [
"type": "terms",
"field": "Dispersion protocol_s",
"mincount": 2,
"limit": -1,
"domain": [
"excludeTags": "dprotocol_tag",
"blockChildren": "type_s:substance"
]
],
"reference_year": [
"type": "terms",
"field": "reference_year_s",
"mincount": 2,
"limit": -1,
"domain": [
"excludeTags": "reference_year_tag",
"blockChildren": "type_s:substance"
]
],
"reference": [
"type": "terms",
"field": "reference_s",
"mincount": 2,
"limit": -1,
"domain": [
"excludeTags": "reference_tag",
"blockChildren": "type_s:substance"
]
],
"release": [
"type": "terms",
"field": "updated_s",
"mincount": 1,
"limit": -1,
"domain": [
"excludeTags": "release_tag",
"blockChildren": "type_s:substance"
]
],
"topcategory": [
"type": "terms",
"field": "topcategory_s",
"mincount": 1,
"limit": -1,
"facet": [
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"endpointcategory": [
"type": "terms",
"field": "endpointcategory_s",
"mincount": 1,
"limit": -1,
"facet": [
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"effectendpoint": [
"type": "terms",
"field": "effectendpoint_s",
"mincount": 1,
"limit": -1,
"facet": [
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)",
"unit": [
"type": "terms",
"field": "unit_s",
"mincount": 1,
"limit": -1,
"facet": [
"min": "min(loValue_d)",
"max": "max(loValue_d)",
"avg": "avg(loValue_d)"
]
]
]
]
]
]
],
"domain": ["blockChildren": "type_s:substance"]
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/select")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Apache Solr powered search
{{baseUrl}}/select
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/select");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/select")
require "http/client"
url = "{{baseUrl}}/select"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/select"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/select");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/select"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/select HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/select")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/select"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/select")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/select")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/select');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/select'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/select';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/select',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/select")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/select',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/select'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/select');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/select'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/select';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/select"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/select" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/select",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/select');
echo $response->getBody();
setUrl('{{baseUrl}}/select');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/select');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/select' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/select' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/select")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/select"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/select"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/select")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/select') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/select";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/select
http GET {{baseUrl}}/select
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/select
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/select")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Exact chemical structure search
{{baseUrl}}/enm/:db/query/compound/:term/:representation
QUERY PARAMS
db
term
representation
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/query/compound/:term/:representation");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/query/compound/:term/:representation")
require "http/client"
url = "{{baseUrl}}/enm/:db/query/compound/:term/:representation"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/query/compound/:term/:representation"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/query/compound/:term/:representation");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/query/compound/:term/:representation"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/query/compound/:term/:representation HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/query/compound/:term/:representation")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/query/compound/:term/:representation"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/query/compound/:term/:representation")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/query/compound/:term/:representation")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/query/compound/:term/:representation');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/query/compound/:term/:representation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/query/compound/:term/:representation';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/query/compound/:term/:representation',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/query/compound/:term/:representation")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/query/compound/:term/:representation',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/query/compound/:term/:representation'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/query/compound/:term/:representation');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/query/compound/:term/:representation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/query/compound/:term/:representation';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/query/compound/:term/:representation"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/query/compound/:term/:representation" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/query/compound/:term/:representation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/query/compound/:term/:representation');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/query/compound/:term/:representation');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/query/compound/:term/:representation');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/query/compound/:term/:representation' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/query/compound/:term/:representation' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/query/compound/:term/:representation")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/query/compound/:term/:representation"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/query/compound/:term/:representation"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/query/compound/:term/:representation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/query/compound/:term/:representation') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/query/compound/:term/:representation";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/query/compound/:term/:representation
http GET {{baseUrl}}/enm/:db/query/compound/:term/:representation
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/query/compound/:term/:representation
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/query/compound/:term/:representation")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Exact similarity search
{{baseUrl}}/enm/:db/query/similarity
QUERY PARAMS
db
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/query/similarity");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/query/similarity")
require "http/client"
url = "{{baseUrl}}/enm/:db/query/similarity"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/query/similarity"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/query/similarity");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/query/similarity"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/query/similarity HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/query/similarity")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/query/similarity"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/query/similarity")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/query/similarity")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/query/similarity');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/similarity'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/query/similarity';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/query/similarity',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/query/similarity")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/query/similarity',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/similarity'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/query/similarity');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/similarity'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/query/similarity';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/query/similarity"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/query/similarity" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/query/similarity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/query/similarity');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/query/similarity');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/query/similarity');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/query/similarity' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/query/similarity' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/query/similarity")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/query/similarity"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/query/similarity"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/query/similarity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/query/similarity') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/query/similarity";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/query/similarity
http GET {{baseUrl}}/enm/:db/query/similarity
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/query/similarity
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/query/similarity")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get substance composition as a dataset
{{baseUrl}}/enm/:db/substance/:uuid/structures
QUERY PARAMS
db
uuid
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/substance/:uuid/structures");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/substance/:uuid/structures")
require "http/client"
url = "{{baseUrl}}/enm/:db/substance/:uuid/structures"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/substance/:uuid/structures"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/substance/:uuid/structures");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/substance/:uuid/structures"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/substance/:uuid/structures HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/substance/:uuid/structures")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/substance/:uuid/structures"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid/structures")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/substance/:uuid/structures")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/substance/:uuid/structures');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/structures'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/substance/:uuid/structures';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/substance/:uuid/structures',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid/structures")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/substance/:uuid/structures',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/structures'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/substance/:uuid/structures');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/structures'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/substance/:uuid/structures';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/substance/:uuid/structures"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/substance/:uuid/structures" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/substance/:uuid/structures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/substance/:uuid/structures');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/substance/:uuid/structures');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/substance/:uuid/structures');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/substance/:uuid/structures' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/substance/:uuid/structures' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/substance/:uuid/structures")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/substance/:uuid/structures"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/substance/:uuid/structures"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/substance/:uuid/structures")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/substance/:uuid/structures') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/substance/:uuid/structures";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/substance/:uuid/structures
http GET {{baseUrl}}/enm/:db/substance/:uuid/structures
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/substance/:uuid/structures
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/substance/:uuid/structures")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Substance composition
{{baseUrl}}/enm/:db/substance/:uuid/composition
QUERY PARAMS
db
uuid
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/substance/:uuid/composition");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/substance/:uuid/composition")
require "http/client"
url = "{{baseUrl}}/enm/:db/substance/:uuid/composition"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/substance/:uuid/composition"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/substance/:uuid/composition");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/substance/:uuid/composition"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/substance/:uuid/composition HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/substance/:uuid/composition")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/substance/:uuid/composition"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid/composition")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/substance/:uuid/composition")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/substance/:uuid/composition');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/composition'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/substance/:uuid/composition';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/substance/:uuid/composition',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid/composition")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/substance/:uuid/composition',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/composition'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/substance/:uuid/composition');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/composition'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/substance/:uuid/composition';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/substance/:uuid/composition"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/substance/:uuid/composition" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/substance/:uuid/composition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/substance/:uuid/composition');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/substance/:uuid/composition');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/substance/:uuid/composition');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/substance/:uuid/composition' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/substance/:uuid/composition' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/substance/:uuid/composition")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/substance/:uuid/composition"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/substance/:uuid/composition"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/substance/:uuid/composition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/substance/:uuid/composition') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/substance/:uuid/composition";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/substance/:uuid/composition
http GET {{baseUrl}}/enm/:db/substance/:uuid/composition
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/substance/:uuid/composition
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/substance/:uuid/composition")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Substructure search
{{baseUrl}}/enm/:db/query/smarts
QUERY PARAMS
db
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/query/smarts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/query/smarts")
require "http/client"
url = "{{baseUrl}}/enm/:db/query/smarts"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/query/smarts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/query/smarts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/query/smarts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/query/smarts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/query/smarts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/query/smarts"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/query/smarts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/query/smarts")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/query/smarts');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/smarts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/query/smarts';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/query/smarts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/query/smarts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/query/smarts',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/smarts'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/query/smarts');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/smarts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/query/smarts';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/query/smarts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/query/smarts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/query/smarts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/query/smarts');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/query/smarts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/query/smarts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/query/smarts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/query/smarts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/query/smarts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/query/smarts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/query/smarts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/query/smarts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/query/smarts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/query/smarts";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/query/smarts
http GET {{baseUrl}}/enm/:db/query/smarts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/query/smarts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/query/smarts")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Details of multiple studies
{{baseUrl}}/enm/:db/investigation
QUERY PARAMS
type
search
db
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/investigation?type=&search=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/investigation" {:query-params {:type ""
:search ""}})
require "http/client"
url = "{{baseUrl}}/enm/:db/investigation?type=&search="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/investigation?type=&search="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/investigation?type=&search=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/investigation?type=&search="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/investigation?type=&search= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/investigation?type=&search=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/investigation?type=&search="))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/investigation?type=&search=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/investigation?type=&search=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/investigation?type=&search=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/investigation',
params: {type: '', search: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/investigation?type=&search=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/investigation?type=&search=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/investigation?type=&search=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/investigation?type=&search=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/investigation',
qs: {type: '', search: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/investigation');
req.query({
type: '',
search: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/investigation',
params: {type: '', search: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/investigation?type=&search=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/investigation?type=&search="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/investigation?type=&search=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/investigation?type=&search=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/investigation?type=&search=');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/investigation');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'type' => '',
'search' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/investigation');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'type' => '',
'search' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/investigation?type=&search=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/investigation?type=&search=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/investigation?type=&search=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/investigation"
querystring = {"type":"","search":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/investigation"
queryString <- list(
type = "",
search = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/investigation?type=&search=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/investigation') do |req|
req.params['type'] = ''
req.params['search'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/investigation";
let querystring = [
("type", ""),
("search", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/enm/:db/investigation?type=&search='
http GET '{{baseUrl}}/enm/:db/investigation?type=&search='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/enm/:db/investigation?type=&search='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/investigation?type=&search=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get study summary for the substance
{{baseUrl}}/enm/:db/substance/:uuid/studySummary
QUERY PARAMS
db
uuid
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/substance/:uuid/studySummary");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/substance/:uuid/studySummary")
require "http/client"
url = "{{baseUrl}}/enm/:db/substance/:uuid/studySummary"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/substance/:uuid/studySummary"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/substance/:uuid/studySummary");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/substance/:uuid/studySummary"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/substance/:uuid/studySummary HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/substance/:uuid/studySummary")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/substance/:uuid/studySummary"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid/studySummary")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/substance/:uuid/studySummary")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/substance/:uuid/studySummary');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/studySummary'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/substance/:uuid/studySummary';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/substance/:uuid/studySummary',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid/studySummary")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/substance/:uuid/studySummary',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/studySummary'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/substance/:uuid/studySummary');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/studySummary'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/substance/:uuid/studySummary';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/substance/:uuid/studySummary"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/substance/:uuid/studySummary" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/substance/:uuid/studySummary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/substance/:uuid/studySummary');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/substance/:uuid/studySummary');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/substance/:uuid/studySummary');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/substance/:uuid/studySummary' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/substance/:uuid/studySummary' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/substance/:uuid/studySummary")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/substance/:uuid/studySummary"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/substance/:uuid/studySummary"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/substance/:uuid/studySummary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/substance/:uuid/studySummary') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/substance/:uuid/studySummary";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/substance/:uuid/studySummary
http GET {{baseUrl}}/enm/:db/substance/:uuid/studySummary
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/substance/:uuid/studySummary
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/substance/:uuid/studySummary")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Search endpoint summary
{{baseUrl}}/enm/:db/query/study
QUERY PARAMS
db
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/query/study");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/query/study")
require "http/client"
url = "{{baseUrl}}/enm/:db/query/study"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/query/study"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/query/study");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/query/study"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/query/study HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/query/study")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/query/study"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/query/study")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/query/study")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/query/study');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/study'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/query/study';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/query/study',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/query/study")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/query/study',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/study'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/query/study');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/query/study'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/query/study';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/query/study"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/query/study" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/query/study",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/query/study');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/query/study');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/query/study');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/query/study' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/query/study' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/query/study")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/query/study"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/query/study"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/query/study")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/query/study') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/query/study";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/query/study
http GET {{baseUrl}}/enm/:db/query/study
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/query/study
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/query/study")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
get substance study
{{baseUrl}}/enm/:db/substance/:uuid/study
QUERY PARAMS
db
uuid
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/substance/:uuid/study");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/substance/:uuid/study")
require "http/client"
url = "{{baseUrl}}/enm/:db/substance/:uuid/study"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/substance/:uuid/study"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/substance/:uuid/study");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/substance/:uuid/study"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/substance/:uuid/study HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/substance/:uuid/study")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/substance/:uuid/study"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid/study")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/substance/:uuid/study")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/substance/:uuid/study');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/study'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/substance/:uuid/study';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/substance/:uuid/study',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid/study")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/substance/:uuid/study',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/study'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/substance/:uuid/study');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/enm/:db/substance/:uuid/study'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/substance/:uuid/study';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/substance/:uuid/study"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/substance/:uuid/study" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/substance/:uuid/study",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/substance/:uuid/study');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/substance/:uuid/study');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/substance/:uuid/study');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/substance/:uuid/study' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/substance/:uuid/study' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/substance/:uuid/study")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/substance/:uuid/study"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/substance/:uuid/study"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/substance/:uuid/study")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/substance/:uuid/study') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/substance/:uuid/study";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/substance/:uuid/study
http GET {{baseUrl}}/enm/:db/substance/:uuid/study
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/substance/:uuid/study
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/substance/:uuid/study")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get a substance
{{baseUrl}}/enm/:db/substance/:uuid
QUERY PARAMS
db
uuid
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/substance/:uuid");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/substance/:uuid")
require "http/client"
url = "{{baseUrl}}/enm/:db/substance/:uuid"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/substance/:uuid"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/substance/:uuid");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/substance/:uuid"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/substance/:uuid HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/substance/:uuid")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/substance/:uuid"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/substance/:uuid")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/substance/:uuid');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/substance/:uuid'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/substance/:uuid';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/substance/:uuid',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/substance/:uuid")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/substance/:uuid',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/substance/:uuid'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/substance/:uuid');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/substance/:uuid'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/substance/:uuid';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/substance/:uuid"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/substance/:uuid" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/substance/:uuid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/substance/:uuid');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/substance/:uuid');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/substance/:uuid');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/substance/:uuid' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/substance/:uuid' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/substance/:uuid")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/substance/:uuid"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/substance/:uuid"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/substance/:uuid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/substance/:uuid') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/substance/:uuid";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/substance/:uuid
http GET {{baseUrl}}/enm/:db/substance/:uuid
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/substance/:uuid
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/substance/:uuid")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
List substances
{{baseUrl}}/enm/:db/substance
QUERY PARAMS
db
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/enm/:db/substance");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/enm/:db/substance")
require "http/client"
url = "{{baseUrl}}/enm/:db/substance"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/enm/:db/substance"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/enm/:db/substance");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/enm/:db/substance"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/enm/:db/substance HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/enm/:db/substance")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/enm/:db/substance"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/enm/:db/substance")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/enm/:db/substance")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/enm/:db/substance');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/substance'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/enm/:db/substance';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/enm/:db/substance',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/enm/:db/substance")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/enm/:db/substance',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/substance'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/enm/:db/substance');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/enm/:db/substance'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/enm/:db/substance';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/enm/:db/substance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/enm/:db/substance" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/enm/:db/substance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/enm/:db/substance');
echo $response->getBody();
setUrl('{{baseUrl}}/enm/:db/substance');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/enm/:db/substance');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/enm/:db/substance' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/enm/:db/substance' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/enm/:db/substance")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/enm/:db/substance"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/enm/:db/substance"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/enm/:db/substance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/enm/:db/substance') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/enm/:db/substance";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/enm/:db/substance
http GET {{baseUrl}}/enm/:db/substance
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/enm/:db/substance
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/enm/:db/substance")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()