Computer Related > Using REST APIs Miscellaneous
Thread Author: smokie Replies: 13

 Using REST APIs - smokie
I'm feeling I've confused myself somewhat on this, and maybe I'm making it much more complicated than it need be. Probably confusing you along the way... :-)

I took the Curl command I mentioned above from another developer page, which is a customer-only page.

Going back to their example linked above, it says

"All API requests should use a base URL of: api.octopus.energy"

then

Authentication is required for most API requests. This is performed via HTTP Basic Auth.

Provide your API key as the basic auth username value. You do not need to provide a password, eg:

curl -u "$API_KEY:" api.octopus.energy/v1/accounts/


and then the actual function I need is a parameter (?terminology? - well, it's a GET Command)), as per here

developer.octopus.energy/docs/api/#list-consumption-for-a-meter

on which I want to use parameter of period_from and period_to.


So on this page curl.haxx.se/docs/manpage.html it seems that the GET command is a parameter of the Curl command, so I can run it all in one go in my command prompt.


Is that something I can do in PERL (which I've just installed)

I feel I am probably pushing beyond reasonableness in my request here, given the difficulty I am having getting my head round this. So please say so if I am.
 Messages Author Date
 Using REST APIs new smokie 10 Jan 19 08:57
 Using REST APIs new Kevin 10 Jan 19 20:32
 Using REST APIs new smokie 11 Jan 19 09:16
 Using REST APIs new Kevin 11 Jan 19 23:27
 Using REST APIs new smokie 12 Jan 19 00:32
 Using REST APIs new smokie 12 Jan 19 09:03
 Using REST APIs new Kevin 12 Jan 19 22:34
 Using REST APIs new smokie 13 Jan 19 18:57
 Using REST APIs new Kevin 13 Jan 19 20:51
 Using REST APIs new Kevin 18 Jan 19 23:21
 Using REST APIs new smokie 19 Jan 19 08:11
 Using REST APIs new Kevin 19 Jan 19 23:11
 Using REST APIs new smokie 19 Jan 19 23:46
 Using REST APIs new smokie 8 Feb 19 08:15
Latest Forum Posts