Re: [Jprogramming] Using rest API in J

2023-09-20 Thread Pablo Landherr
Fantastic! ('-H Ocp-Apim-Subscription-Key:',PrimarykeyRB) gethttp ' https://api-test.riksbank.se/swea/v1/Observations/SEKUSDPMI/2023-01-01' worked perfectly. Many thanks, Pablo On Wed, Sep 20, 2023 at 3:09 PM Michael Dykman wrote: > In the document at https://code.jsoftware.com/wiki/Addons

Re: [Jprogramming] Using rest API in J

2023-09-20 Thread Raul Miller
On Wed, Sep 20, 2023 at 9:09 AM Michael Dykman wrote: > What you need to do is to add a header to your request. The header name > will be 'Ocp-Apim-Subscription-Key' and the value, whatever key you > received. > > If it's curl under the hood, the option to add a header is '-H > headername:headerva

Re: [Jprogramming] Using rest API in J

2023-09-20 Thread Michael Dykman
In the document at https://code.jsoftware.com/wiki/Addons/web/gethttp It states that -- x is: Optional retrieval options. One of: 'stdout' (Default) 'help' 'file' or ('file';jpath '~temp/myfile.htm') Anything else is assumed to be a valid Wget/cURL option string eg: 'file' g

Re: [Jprogramming] Using rest API in J

2023-09-20 Thread bill lam
The exact syntax depending on using curl or wget. Their api documentation should have the information. Maybe you also need to set the cookie. On Wed, 20 Sep 2023 at 8:56 PM Pablo Landherr wrote: > I have a follow-up question. I've successfully sent a number of requests > and received data. Howev

Re: [Jprogramming] Using rest API in J

2023-09-20 Thread Pablo Landherr
I have a follow-up question. I've successfully sent a number of requests and received data. However, they have a rate limit for unregistered users. So I registered and was given keys, but I don't understand how to use them. The documentation says that I should add the key in a http header called Oc

Re: [Jprogramming] Using rest API in J

2023-09-19 Thread Pablo Landherr
That was easy enough. Thank you, however the wiki page should be updated as the first examples don't work as shown. E.g. $homepagehtml=: gethttp 'http://www.jsoftware.com' 293 106 {. 306}.homepagehtml NB. as suggested on the wiki homepagehtml 302 Found Found The document has moved http

Re: [Jprogramming] Using rest API in J

2023-09-19 Thread Pablo Landherr
Thank you. Will start there. On Tue, Sep 19, 2023 at 12:47 PM Ed Gottsman wrote: > Pablo, > > This is a good place to start. It describes gethttp, an add-on that > front-ends curl and wget (depending on your platform). > > > https://code.jsoftware.com/wiki/Addons/web/gethttp > > Best of luck a

Re: [Jprogramming] Using rest API in J

2023-09-19 Thread Ed Gottsman
Pablo, This is a good place to start. It describes gethttp, an add-on that front-ends curl and wget (depending on your platform). https://code.jsoftware.com/wiki/Addons/web/gethttp Best of luck and feel free to ask questions. Ed > On Sep 19, 2023, at 11:42 AM, Pablo Landherr wrote: > > I

[Jprogramming] Using rest API in J

2023-09-19 Thread Pablo Landherr
I have searched the J wiki but am unable to find some newbie examples showing how to use J (client side) with rest API. I wish to download statistics and my source only supports using their API. Side note, I have no experience writing API:s. Can anyone point me to the best place to start? Thank y