How to get an API Key

287 views
Skip to first unread message

Tom

unread,
Aug 2, 2024, 4:28:25 AM8/2/24
to A gathering place for the Open Rail Data community
Hi All, 

I've searched High and low on the RDM for my API key but i can't seem to find it. I've subscribed to the board I'd like and still have nothing, could someone please point me in the right direction? I haven't even got anyting in my emails.

Peter Hicks

unread,
Aug 2, 2024, 4:29:43 AM8/2/24
to openrail...@googlegroups.com
Hi Tom

Which product on the RDM are you looking for an API key for?  There are lots!


Peter


On Fri, 2 Aug 2024 at 09:28, Tom <tomru...@gmail.com> wrote:
Hi All, 

I've searched High and low on the RDM for my API key but i can't seem to find it. I've subscribed to the board I'd like and still have nothing, could someone please point me in the right direction? I haven't even got anyting in my emails.

--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openraildata-talk/72b89027-782b-42d5-8d2f-c9111159c6e8n%40googlegroups.com.

Tom

unread,
Aug 2, 2024, 5:38:04 AM8/2/24
to A gathering place for the Open Rail Data community
Hi Peter,

Thanks for the fast response!

its these attatched. 

I have in the mean time, looked through the contract and can see something that resembles an API key, would it be found in there?

trains.png

Evelyn Snow

unread,
Aug 2, 2024, 5:40:20 AM8/2/24
to openrail...@googlegroups.com
Hi Tom,

Click on the "Live Departure Board" link on the left side of the table, then
navigate to the "Specification" tab, your API keys should be visible on that
page.

Evelyn

On Fri, Aug 02, 2024 at 02:38:04AM -0700, Tom wrote:
> Hi Peter,
>
> Thanks for the fast response!
>
> its these attatched. 
>
> I have in the mean time, looked through the contract and can see something that
> resembles an API key, would it be found in there?
>
> openraildata-talk/52ebc6ca-58d1-4c57-a1be-d0ec8e08eab4n%40googlegroups.com.


Tom

unread,
Aug 2, 2024, 5:42:00 AM8/2/24
to A gathering place for the Open Rail Data community
Hi Evelyn, 

Thanks so much! Appreciate your help. :) Have a good weekend. 

Evelyn Snow

unread,
Aug 2, 2024, 5:55:35 AM8/2/24
to openrail...@googlegroups.com
Glad to be of service!
> openraildata-talk/3d637aaf-ade5-43cd-ab5b-befa8a4e5a16n%40googlegroups.com.

Tom

unread,
Aug 2, 2024, 7:03:14 AM8/2/24
to A gathering place for the Open Rail Data community
Apologies, I'm actually quitre new to coding and API's, i've been trying for the past hour on postman to no avail, the documentation seems to be incosistent - would you be able to point me in the right direction?

When following whats said in the specification tab on RDM for the Live Departure Board i get  500: {"fault":{"faultstring":"Unable to route the message to a Target Endpoint","detail":{"errorcode":"messaging.runtime.RouteFailed"}}}
and ensuring the correct params are given. 

when trying to follow the PDF it points to: 
To make this JSON specification more human friendly to read download the file, open it in a text editor,and copy 'n paste into, for example, the online Swagger Editor, found here
https://editor.swagger.io, but when followig that it gives a completely different URL and has my local host, I have spun up a local dev server and tried but i then get:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>

<head>
    <title>404 Not Found</title>
</head>

<body>
    <h1>Not Found</h1>
    <p>The requested URL was not found on this server.</p>
</body>

</html>

there is also another link that suggests base 64 encoding my username and password which i also tried, to no avail :(

would you be able to offer some advice on what i could be doing wrong?


. 

Evelyn Snow

unread,
Aug 2, 2024, 7:46:11 AM8/2/24
to openrail...@googlegroups.com
Hi Tom

The documentation is really rather bad!

I think the thing you've missed is that you need to pass the station CRS in the URL.
The information on the "specification" section is pretty horrific, also interesting
to me that the cURL example is wrong in several ways.

Your request should look something like this. The key in question should be the
consumer key, not the consumer secret.

curl -H 'x-apikey:0a0YenaaxrCwJGuD00E3gnPb0F0HIWp84C0Ah9q1Wfswl0a0' https://api1.raildata.org.uk/1010-live-departure-board-dep/LDBWS/api/20220120/GetDepBoardWithDetails/BFR

(To be clear to others reading, this is a randomly generated example key, and is
not a real RDM credential)

Evelyn
> openraildata-talk/bdb5950b-824f-48df-91f6-6d15da3a26b0n%40googlegroups.com.

Tom

unread,
Aug 2, 2024, 7:56:57 AM8/2/24
to A gathering place for the Open Rail Data community
Thanks so much! the CURL way seemed to have worked, but using that endpoint it doesn't seem to work with a HTTP GET
I get  {"fault":{"faultstring":"Unable to route the message to a Target Endpoint","detail":{"errorcode":"messaging.runtime.RouteFailed"}}}

I'm trying to do this with a GET request, is there a way of converting that CURL into a get? 

Yes the docs are horrendous, very incosnsistent they make absolutley NO sense hahah so glad I found this fourm

Tom

unread,
Aug 2, 2024, 8:33:15 AM8/2/24
to A gathering place for the Open Rail Data community
It's Okay actually figured it out! Thanks again for your help. 

To save some heartache for another poor soul, the document they give you with the different edn points, you need to go into the RDM and subscribe to each individual end point. If you search API in the search bar, at the time of writing they were all on the last page! it seems you need a seperate API key for each individual end point :D 

Reply all
Reply to author
Forward
0 new messages