leantime icon indicating copy to clipboard operation
leantime copied to clipboard

[Question] API?

Open Nixellion opened this issue 4 years ago • 6 comments

I'd like to export our current Trello board into ToDo board of Leantime. I can write a script to pull information from Trello and put it into Leantime, but I could not find any information about it's API and whether it even has one?

Nixellion avatar May 01 '20 13:05 Nixellion

We currently don't have an official API. We are working on one but it is still a few months away from being completed. The easiest way to add data right now would be to import it into the database directly. I'd be happy to do a quick write up on the database structure if that would help.

marcelfolaron avatar May 01 '20 14:05 marcelfolaron

Thanks. No, I dont think writeup is necessary for me, but maybe for others. I guess this is why frameworks like Django or Flask are so popular, they basically offer API out of the box :)

Nixellion avatar May 01 '20 15:05 Nixellion

Yeah, true. The very first leantime version was created a few years back as small experiment and it grew from there. There are certainly pros and cons to this. Porting it to use a framework wouldn't be feasible at this point anymore, so we re just trying to make the best of it by staying very slim.

On Fri, May 1, 2020, 8:27 AM Nixellion [email protected] wrote:

Thanks. No, I dont think writeup is necessary for me, but maybe for others. I guess this is why frameworks like Django or Flask are so popular, they basically offer API out of the box :)

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/Leantime/leantime/issues/240#issuecomment-622433663, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALG4EFV3X5KZJXXEA7FGPXDRPLS6NANCNFSM4MXC5NZA .

marcelfolaron avatar May 01 '20 15:05 marcelfolaron

Well, it's your project, so you do what you think is right :)

But there are a fair amount of huge services like Dropbox and the like that did change their backend technologies and frameworks at some point. I'm not saying you should do it, I'm just saying that sometimes even with a big project already in production it's worth it to switch to some other framework\tools for long term gains. It's often hard to see long term benefits of such decisions.

Anyway this is apparently not a topic to discuss in github issues. Will wait for API :)

Nixellion avatar May 01 '20 19:05 Nixellion

@marcelfolaron - I know its been a few years - has there been any progress made on this front?

broskees avatar Aug 23 '22 22:08 broskees

As a matter of fact, we have made some progress. The branch https://github.com/Leantime/leantime/tree/API-POC contains a current proof of concept and comes with quite a few endpoints already

To login and get a bearer token POST to auth/login with an existing user (at least editor) username, password and api (set to true)

This will get you bearer token for all subsequent calls

Existing endpoints

GET /api/tickets/ID - Get single ticket POST /api/ticket - create new ticket PATCH /api/ticket/id - update

Other endpoints /api/ideas /api/leancanvas /api/users

Would love if someone could run some tests and give feedback

marcelfolaron avatar Aug 24 '22 00:08 marcelfolaron

API is now in 2.3.10 Docs to come soon

marcelfolaron avatar Feb 12 '23 12:02 marcelfolaron