Add Basic API to InvoicePlane v1


#1

Hi,

I am interested in adding a basic API to InvoicePlane v1.

I thought to add the following idea to the controllers of some modules:

public function api($action = "")
{
switch (action) {
    case "create":
       //create something
      return $json; // or error
        break;
    // etc... Whatever the module requires
}
}

I thought of using HTTP_POST for inputs and JSON outputs.
A method will also have to be exposed in the authentication to allow API access.

Let me know what is your thoughts on this, I am just thinking.

Thanks


#2

If you are not working on an API on your own I would advice you to wait for InvoicePlane 2 which will ship with a complete API.
However, I don’t think that a switch statement would be the best approach to implement an API. Either create additional controllers for each module.


#3

Additional Controllers would be a better approach. What is the ETA on IP2?


#4

We’re just finishing the planning for IP2 so it will may take some months.


#5

It would be great if InvoicePlane had an API so it can integrate with other systems.
I am planning to integrate InvoicPlane with a time tracking system.
I understand InvoicePlane V2 might contain an API. Do you have more info on when V2 will be available?
Let me know,
Bert-Jan


#6

Hey,

I am also interested in a time tracking/registration system.
@Kovah Any idea when you will make the planning for V2 available?


#7

Hi,

I’m also looking forward an API integration to be able to connect other apps.

Any news, sticky threads or blogs on the topic or about an ETA for InvoicePlane 2?

Keep up the excellent work!

Thanks & Regards


#8

Hello, before saying anything or aporting any idea about creating the API for IP1. Do I have to know somthing?


#9

Hi
I think we should discuss 1) what the API should cover, 2) how users or other applications are authenticated and 3) how it should be implemented before starting. Any ideas or suggestions?


#10

Hello, well.

  1. I think it should cover at least the basic needed functions such as adding new invoices, clients and payments.

  2. The authentication, maybe something classic and simple, now there are two kind of users (admin and guest), I was thinking creating a third kind of users might be the best idea.

  3. And answering the how, something modular and non destructive that interact with the current code. IP1 is already here, modifying the code maybe is not a good idea at all, and sooner or later we will have IP2 with a real API. aren’t we?


#11

API is completely “on the back burner”?