Inara API

More about Inara API is on the API page, general dev guidelines are here and more detailed documentation about the events and data format here.

Just a note for tool authors using Inara API - please ensure your apps are doing  TWO requests per minute AT MAXIMUM. As I have discovered, many users are using multiple apps at once (nothing wrong with that), but are also updating their profiles from all of the applications at once, which is causing quite serious overhead. For such reason, I have needed to make API requests limits much tighter. For bots and other similar non-demanding apps are requests rates set same as before. If do you need another requests rate limit, please send me a PM.

Inara API update for Odyssey:
  • The header property isDeveloped was renamed to less confusing isBeingDeveloped. You don't need to change anything on your end though, the old property will still work.
  • A new event addCommanderTravelLand for commanders landing on the celestial body was added (should be triggered at journal's Touchdown, DropShipDeploy and similar).
  • The events addCommanderTravelCarrierJump, addCommanderTravelDock, addCommanderTravelFSDJump and setCommanderTravelLocation now contain optional properties for the star system coordinates, celestial body and celestial body coordinates. It's not required to set, it may however help to further precise commander's location when the star system is not in the database, etc.
  • The events addCommanderTravelDock, addCommanderTravelFSDJump and addCommanderTravelLand are now having boolean properties isTaxiShuttle and isTaxiDropship for travelling with Apex or Frontline Solutions ships.
  • New events setCommanderInventory, resetCommanderInventory, setCommanderInventoryItem, addCommanderInventoryItem and delCommanderInventoryItem added. Those are supposed for handling the new Odyssey events like ShipLockerMaterials and similar, you can however use it also for the existing engineering materials or ship cargo instead of the existing dedicated events (but you do not need to, they are not going anywhere).
  • New events setCommanderSuitLoadout, updateCommanderSuitLoadout and delCommanderSuitLoadout for the suit loadouts added.
15 Apr 2020, 9:32am
Hello. I am no computer scientist whatsoever. But is there a way to compile every BGS related information (like exploration data selling, goods selling, influence gain by fulfilling missions) of the commander of a squadron? I noticed that the personal logs contain this information, but now our squadron is getting bigger and I won't be able to do it on my own.

Thank you for your time commanders.
15 Apr 2020, 1:34pm
DarkDiablo10Hello. I am no computer scientist whatsoever. But is there a way to compile every BGS related information (like exploration data selling, goods selling, influence gain by fulfilling missions) of the commander of a squadron? I noticed that the personal logs contain this information, but now our squadron is getting bigger and I won't be able to do it on my own.

Thank you for your time commanders.


Automatically, I'm sure it's possible, but I don't know if most members of squadrons would want their leadership to go poking around in their detailed data.

What you absolutely CAN do is get every commander interested in contributing to send you their details, and you can collect it and process it in something like Excel. Maybe Artie would consider letting commanders "export" their data as a CSV file, to make the manual effort of this much smaller? It would be a bigger effort for Inara to have a feature to do the consolidation, and I'm doubtful it would be widely used.
17 Apr 2020, 5:24am
James Hussar
DarkDiablo10Hello. I am no computer scientist whatsoever. But is there a way to compile every BGS related information (like exploration data selling, goods selling, influence gain by fulfilling missions) of the commander of a squadron? I noticed that the personal logs contain this information, but now our squadron is getting bigger and I won't be able to do it on my own.

Thank you for your time commanders.



Automatically, I'm sure it's possible, but I don't know if most members of squadrons would want their leadership to go poking around in their detailed data.

What you absolutely CAN do is get every commander interested in contributing to send you their details, and you can collect it and process it in something like Excel. Maybe Artie would consider letting commanders "export" their data as a CSV file, to make the manual effort of this much smaller? It would be a bigger effort for Inara to have a feature to do the consolidation, and I'm doubtful it would be widely used.


Thank you very much for your answer. I will ask my friend to write a missions repport on our discord. As there's not many of us, so I think I will be able to manage.

Thank you again for your time.

Fly safe.
26 Apr 2020, 7:25pm
Hi. I'm currently trying to write a basic app that looks up CMDR credentials and can't get my head around the whole posting thing. I get that I need to post a json in order to ask for data but am unsure about how I fetch the response. Any help would be greatly appreciated. (new to http requests but reasonably decent at programming). P.S. doing this in node.js in case that's important
27 Apr 2020, 11:40am
It's basically like posting to and fetching from a webpage. You will POST the JSON to the endpoint and get back JSON with the response (as a plain text). I don't know node.js into the details, but by a quick check, http.request() method should do the trick.
27 Apr 2020, 1:58pm
ArtieIt's basically like posting to and fetching from a webpage. You will POST the JSON to the endpoint and get back JSON with the response (as a plain text). I don't know node.js into the details, but by a quick check, http.request() method should do the trick.


Thanks for the response Artie . I got as far as posting the JSON file with the correct formatting (I hope xD) but was just confused by how I get the data back - the 3 fields I have are error response and body. I got back the good response code indicating it was received but the body was empty. Am I supposed to make a get request to the same address but with my eventCustomID key or something? Apologies if what I'm saying is stupid, as I said I'm a newb to http requests and thought this would be a fun way to learn.

Thanks again and no worries if what I said is too vague for you to help any further
27 Apr 2020, 2:30pm
Nope, you will get the response back immediately to the POST sent. You should get something like in the Output example (JSON) listed on top of the page here. If you did receive a completely empty page and you are absolutely sure you are reading it right, then you did something fundamentally wrong on the POSTing side (incorrect JSON format or so) and although there are some checks for that and it should return at least some error message, there may be rare cases when it will return just a blank page (but that usually shouldn't happen). I think somebody has some issue with JSON formatting in the past through javascript and/or reading the response (although it was provided). I don't recall correctly, but you can investigate in that area.

The eventCustomID is just for your tracking purposes, if do you want to pair your events sent with the responses to events received. You may or may not use it, it's up to you (it's doing nothing on Inara, it's just passed to the response of the respective event). What exactly are you sending and what exactly did you receive?
27 Apr 2020, 6:02pm
ArtieNope, you will get the response back immediately to the POST sent. You should get something like in the Output example (JSON) listed on top of the page here. If you did receive a completely empty page and you are absolutely sure you are reading it right, then you did something fundamentally wrong on the POSTing side (incorrect JSON format or so) and although there are some checks for that and it should return at least some error message, there may be rare cases when it will return just a blank page (but that usually shouldn't happen). I think somebody has some issue with JSON formatting in the past through javascript and/or reading the response (although it was provided). I don't recall correctly, but you can investigate in that area.

The eventCustomID is just for your tracking purposes, if do you want to pair your events sent with the responses to events received. You may or may not use it, it's up to you (it's doing nothing on Inara, it's just passed to the response of the respective event). What exactly are you sending and what exactly did you receive?



Hi Artie,
Thanks again for the response
I have tried submitting a POST request using python now (in case js was the issue) and I'm getting back a response. The exact thing I am sending is:

{
"header": {
"appName": "simpleTestApp",
"appVersion": "0.01",
"isDeveloped": true,
"APIkey": "fdg58sdf48gf8asd1"
},
"events": [
{
"eventName": "getCommanderProfile",
"eventTimestamp": "%s",
"eventData": {
"searchName": "Manic Marvin"
}
}
]
}


(the %s formatting does actually put the date in I checked so its not that).

The response I get is:
{"header":{"eventStatus":400,"eventStatusText":"This application has no access allowed."}}

I've had this and the example side by side in the browser and cant see anything wrong with my formatting (not to say there isn't just that it's escaped me). I've even tried to generate and use my own APIkey to see if that was the issue but got the same message

Thank you for your help
27 Apr 2020, 6:16pm
Ah, so you've got the response. Everything looks alright technically then, your app just needs to be white-listed first. Send me the app name and some details as mentioned in the documentation through PM.
30 Apr 2020, 5:12pm
Hi everyone,
Last year i have build my faction website using worldpress and now i would like to integrate our BGS infos on new pages.
(The same thing we can find on minor faction pages here on inara: a table listing our systems with % and one page for each system with influence curves).
I'm totally new in this API thing and i don't know how to code.
I would appreciate any tips to help me achieve this goal.
Thanks
01 May 2020, 1:46pm
Just a little observation which already might've been discussed years ago, but I'm slow as per usual.

I tried to look up which exact Type of Outpost (Civilian, Military etc.) we have in our little realm but they all are marked as Outpost (Civilian) despite us having quite a few Commercial and otherwise. Guess that info isn't included when the API sends the info over and needs to be implemented manually?
01 May 2020, 10:20pm
CorsRHi everyone,
Last year i have build my faction website using worldpress and now i would like to integrate our BGS infos on new pages.
(The same thing we can find on minor faction pages here on inara: a table listing our systems with % and one page for each system with influence curves).
I'm totally new in this API thing and i don't know how to code.
I would appreciate any tips to help me achieve this goal.
Thanks

Hello, there are no BgS data provided through Inara API. But you may be interested in this site (and its API): https://elitebgs.app/

Ryan MurdocJust a little observation which already might've been discussed years ago, but I'm slow as per usual.

I tried to look up which exact Type of Outpost (Civilian, Military etc.) we have in our little realm but they all are marked as Outpost (Civilian) despite us having quite a few Commercial and otherwise. Guess that info isn't included when the API sends the info over and needs to be implemented manually?

Yeah, it's the default outpost type as there are no type details in the journals (so it needs to be clarified manually). There possibly may be a way how to determine some outpost types by their economy/gov/allegiance automatically, but I made no research in that area yet.
09 May 2020, 1:21pm
Hello Artie, hope you are doing well.

Is the API down for the moment or am I having a problem on my side?
I use EDDiscovery and it cannot update anything on Inara starting from May 6-7 approximately. I see absolutely empty API log in my Inara profile API page and "INARA Reports: No Response" in EDDiscovery log.

Thank you!
09 May 2020, 1:25pm
If you are running it on some older OS (like Windows 7), please download the latest EDDiscovery version and run it with a parameter: -forcetls12
It should force a newer TLS for connections, as Inara is no longer supporting 1.0/1.1 TLS versions (as they are deprecated).
09 May 2020, 1:47pm
ArtieIf you are running it on some older OS (like Windows 7), please download the latest EDDiscovery version and run it with a parameter: -forcetls12
It should force a newer TLS for connections, as Inara is no longer supporting 1.0/1.1 TLS versions (as they are deprecated).



Oh, I see! This is must be the case, as I'm on the latest EDDiscovery, but on Win7 indeed. I'll give it a try, thank you for the quick answer!

Post a reply

You must be signed in to post here.
Inara API is... well... see sticky post for the details.