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.
03 Nov 2017, 5:43pm
Martind ForlonAdded one suggestion for MrSheepSheep EDMC plugin: https://gitlab.com/mrsheepsheep/EDMC-Inara/issues/5

Hi, could be possible in the next version (with Inara API) make changes to the way how are recorded credits/assets? Atm plugin doing entry into credits/assets on each dock and it makes cmdr financial overview very spammed. It would be great if these record would be done only once per session, or if each cmdr can set this as option. Thx for your work on this plugin.



I can only second that, I like Artie's suggestion for it. But yep, also agree with Phelbore, being able to choose would be the greatest option.
03 Nov 2017, 6:01pm
ArtieI recommended in the API documentation to not update credits too often, on each minor credits change (for example like picking up the bounties, one by one, etc.). A good way may be on the session end/start, big changes and/or in hourly intervals. Otherwise it may cause too much clutter in the credits log for the player and it simply may become unusable from the user's point of view. But, it is a decision of each API user/developer, of course.


Oh, I'm certainly not saying every commodity sold or every bounty turned in, every limpet bought! Per docking is just fine for my purposes (as long as it doesn't cause problems for the site). A week after, I honestly only care per-session.
04 Nov 2017, 2:43pm
My preference is intervals. Indeed, having too much information in the balance log makes no sense. What about updating the location on jump / dock (defined by user) ?
On session start / end, update as much info as possible. Log credits info every 30min or every hour (user defined ?), update location on jump/dock (user defined ?)...
By "session" I mean EDMC session of course, as we can't easily tell when the game closes.
We've got many options here, and I'm sure it would be nice to let the user choose himself.
04 Nov 2017, 3:21pm
MrSheepSheepMy preference is intervals. Indeed, having too much information in the balance log makes no sense. What about updating the location on jump / dock (defined by user) ?
On session start / end, update as much info as possible. Log credits info every 30min or every hour (user defined ?), update location on jump/dock (user defined ?)...
By "session" I mean EDMC session of course, as we can't easily tell when the game closes.
We've got many options here, and I'm sure it would be nice to let the user choose himself.


I think thats a good way to go. My days of programming stuff are a long time away. So i have no plan of how much work this would be.
But i belive it is a good way, if everybody can decide when the data is send. But there should be restrictions, so we don´t spam the inara server.

Greetings
Frog2001
04 Nov 2017, 3:56pm
MrSheepSheepMy preference is intervals. Indeed, having too much information in the balance log makes no sense. What about updating the location on jump / dock (defined by user) ?
On session start / end, update as much info as possible. Log credits info every 30min or every hour (user defined ?), update location on jump/dock (user defined ?)...
By "session" I mean EDMC session of course, as we can't easily tell when the game closes.
We've got many options here, and I'm sure it would be nice to let the user choose himself.


I use credits uploaded on dock/Inara to work out my cr/hr, and track how different things affect it. There are better tools for that, I'm sure, but I do that work on a second screen powered by an Intel Compute Stick so Elite doesn't lose focus.
04 Nov 2017, 4:06pm
Frog2001[UGC
MrSheepSheepMy preference is intervals. Indeed, having too much information in the balance log makes no sense. What about updating the location on jump / dock (defined by user) ?
On session start / end, update as much info as possible. Log credits info every 30min or every hour (user defined ?), update location on jump/dock (user defined ?)...
By "session" I mean EDMC session of course, as we can't easily tell when the game closes.
We've got many options here, and I'm sure it would be nice to let the user choose himself.



I think thats a good way to go. My days of programming stuff are a long time away. So i have no plan of how much work this would be.
But i belive it is a good way, if everybody can decide when the data is send. But there should be restrictions, so we don´t spam the inara server.

Greetings
Frog2001

Of course it will be restricted, the main concern being not to spam Inara. As soon as I'm not sending data too often, that's fine. There are many events being logged between each update without having to send anything.

Phelbore
MrSheepSheepMy preference is intervals. Indeed, having too much information in the balance log makes no sense. What about updating the location on jump / dock (defined by user) ?
On session start / end, update as much info as possible. Log credits info every 30min or every hour (user defined ?), update location on jump/dock (user defined ?)...
By "session" I mean EDMC session of course, as we can't easily tell when the game closes.
We've got many options here, and I'm sure it would be nice to let the user choose himself.



I use credits uploaded on dock/Inara to work out my cr/hr, and track how different things affect it. There are better tools for that, I'm sure, but I do that work on a second screen powered by an Intel Compute Stick so Elite doesn't lose focus.


I can setup an option that will log any balance change when you're docked, but it won't be enabled by default.

Artie, should I keep the journal import for now ? I can now send it on session end only (removing the upload button). I think that's still really useful for most people.


Last edit: 04 Nov 2017, 4:17pm
04 Nov 2017, 4:13pm
Yep, feel free to keep it until the new plugin version will be made. I will be adding more events to the API continually in the following days and the goal is to completely cover all the stuff that is made on the journals import, so you can eventually remove it then.
04 Nov 2017, 4:15pm
MrSheepSheepI can setup an option that will log any balance change when you're docked, but it won't be enabled by default.

Artie, should I keep the journal import for now ? I can now send it on session end only (removing the upload button). I think that's still really useful for most people.


That would be lovely, thank you! That way I can disable it (to not overload Inara) when I'm doing stuff besides grinding credits. I'd also be willing to use a different tool if it can run on a separate pc without too much fiddling. No sense complicating your code just for me.
04 Nov 2017, 4:21pm
Phelbore
MrSheepSheepI can setup an option that will log any balance change when you're docked, but it won't be enabled by default.

Artie, should I keep the journal import for now ? I can now send it on session end only (removing the upload button). I think that's still really useful for most people.



That would be lovely, thank you! That way I can disable it (to not overload Inara) when I'm doing stuff besides grinding credits. I'd also be willing to use a different tool if it can run on a separate pc without too much fiddling. No sense complicating your code just for me.


Don't worry about the code

ArtieYep, feel free to keep it until the new plugin version will be made. I will be adding more events to the API continually in the following days and the goal is to completely cover all the stuff that is made on the journals import, so you can eventually remove it then.


Ehm I just realized it will be weird to login with both creditentials and API key... I'll simply remove it for now.
04 Nov 2017, 6:08pm
Update:
There were new material/cargo events added to the API, namely:
  • addCommanderInventoryCargoItem
  • delCommanderInventoryCargoItem
  • setCommanderInventoryCargo
  • setCommanderInventoryCargoItem
  • addCommanderInventoryMaterialsItem
  • delCommanderInventoryMaterialsItem
  • setCommanderInventoryMaterials
  • setCommanderInventoryMaterialsItem

Also, I discovered a bug where the Pilots licence on CMDR's page is not properly updated with rank/etc. changes via API. It is just a minor stuff and has no effect on the ranks set, I will fix that later.
04 Nov 2017, 6:36pm
Nice, I just finished implementing the first set of events... and you give me more work
04 Nov 2017, 8:56pm
Great! And there will be more of it. I want to add stuff for the missions, combat log, etc. still....
05 Nov 2017, 3:20pm
You should also add a "addSessionStartEnd" method for the flight log.
05 Nov 2017, 4:07pm
It is not needed, the session start/ends are detected and displayed automatically in the flight log (basically, when there is a long delay between the records).
05 Nov 2017, 8:50pm
@MrSheepSheep: Thx for prepared optional change for credits records, what you posted is perfect.

Post a reply

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