I'm trying to access online databases using the JMP 14 'New HTTP Request' functionalilty from the help pages
key = "<key>"; // substitute your key
limit = 100;
url = "https://api.nasa.gov/patents/content";
request = New HTTP Request(
URL( url ),
Method( "Get" ),
Query String( [["api_key" => key, "concept_tags" => "false", "limit" => limit]] )
);
json = request << Send();
jsl_json = Parse JSON( json );
dt = JSON To Data Table( As JSON Expr( jsl_json["results"] ) );
// JSON to Data Table turns JSON data into a data table
// As JSON Expr turns a JSL associative array into a JSON string
dt << Set Name( "NASA Patents" );
My question is whether there is a nicer way to input the key/ url etc? I'm mostley thinking about a front end where this could be entered.
Also, is there a better guide to doing this and what information should be where? I struggle with the guidance from the help page but that could be just my lack of knowledge in this area.
David