I read in the documentation that ]po[ has a REST API. But the most object can not be created. The only hint i found was that this depends on the manuall add fields for objects. If i want to have a API for creating object is there any plans for complete this feature to the REST API?
I dont spend not many time in looking to the XML-RPC Modul is this may be a better solution?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's right, creation of objects isn't 100% implemented yet. We can read and update
all object types "generically", but the creation of objects requires manual coding
to call the respective PL/SQL functions for creating the objects.
Can you access the database directly via ODBC? In this case you could call the
PL/SQL "constructor" functions directly…
Bests,
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In generall using Apis is a better solution than direct access to the database. If this the 'officiell' way i can think about this.
I have access to the database this is not not the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Who says that? Do you repeat "generally accepted knowledge" about data encapsulation?
(Sorry if I'm rambling about this, but this is one of my favorite topics in system's design :-)
Basically, the REST API is a "wrapper" or "proxy" for the database API in order to allow
Web-Service access.
However, the ]po[ database API is:
- More complete (there are constructor/destructor PL/SQL procedures for _all_ object types)
- Faster (you save one indirection layer and may use SQL optimization)
- More stable (the REST API is a wrapper…)
- Contains an excellent permission system using database users, groups and permissions.
In ]po[ (as in most ERP type applications) the database structure changes very slowly, so
this is actually a more reliable data source then any application level API. Even when
considering to rewrite the application in Java or PHP we would keep the database…
Having said all that: The REST API includes a permission layer that is more suitable
for remote access of user's to their information and is generally more suitable for remote
access from iPhone or Android. This is where it has been designed for…
Summary: Use REST for the iPhone and the DB API for systems integration.
I hope this helps…
Cheers!
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need the Web-Service Feature and i dont want to open the database to be accessible from remote.
i know there are some benefits to work with database object. Indeed REST is not the lovely way for systems integration.
I have no feeling. Just do it the way it work it in the best way in the selected case. In gerneral i think the internal object like database can more change than changing your systems integration. They should be more stable. I say should i know often they dont be.
Speed difference's are not the point. To be not Complete is problem of the current implementation.
Using the database permission system for user application permission of course you can but in my point of view it is bad design.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also like the REST interface very much and the entire team is quite proud about it :-)
But the fact is that the API changed more then the DB in all applications that I have been working with (that includes the production line control software of the leading European car manufacturer…). And who defines what is "good" or "bad" design? For what reasons? Do they specify the metrics they use to judge?
Well, it's a philosophical questions and thus won't have a final answer.
Enjoy any of the APIs meanwhile (there is also an interesting GPLed "xml-rpc" OpenACS package that allows you to selectively expose the TCL API).
Cheers!
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As of 09/2013 the RESTful interface supports many more ]po[ objects. Get in touch with with the core team if you come across an object not yet supported.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
and where can I find the documentation on the "many more ]po[ objects"? Because here http://www.project-open.org/en/package_intranet_rest_create its still just projects, Translation Tasks and Financial Documents. I would be interested in creating some CIs through the REST-Interface.....Is that possible already?
Regards
Jan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I read in the documentation that ]po[ has a REST API. But the most object can not be created. The only hint i found was that this depends on the manuall add fields for objects. If i want to have a API for creating object is there any plans for complete this feature to the REST API?
I dont spend not many time in looking to the XML-RPC Modul is this may be a better solution?
Hi Schnueptus,
It's right, creation of objects isn't 100% implemented yet. We can read and update
all object types "generically", but the creation of objects requires manual coding
to call the respective PL/SQL functions for creating the objects.
Can you access the database directly via ODBC? In this case you could call the
PL/SQL "constructor" functions directly…
Bests,
Frank
tanks Frank to your answer
In generall using Apis is a better solution than direct access to the database. If this the 'officiell' way i can think about this.
I have access to the database this is not not the problem.
Hi Schnueptus,
> using APIs is a better solution
Who says that? Do you repeat "generally accepted knowledge" about data encapsulation?
(Sorry if I'm rambling about this, but this is one of my favorite topics in system's design :-)
Basically, the REST API is a "wrapper" or "proxy" for the database API in order to allow
Web-Service access.
However, the ]po[ database API is:
- More complete (there are constructor/destructor PL/SQL procedures for _all_ object types)
- Faster (you save one indirection layer and may use SQL optimization)
- More stable (the REST API is a wrapper…)
- Contains an excellent permission system using database users, groups and permissions.
In ]po[ (as in most ERP type applications) the database structure changes very slowly, so
this is actually a more reliable data source then any application level API. Even when
considering to rewrite the application in Java or PHP we would keep the database…
Having said all that: The REST API includes a permission layer that is more suitable
for remote access of user's to their information and is generally more suitable for remote
access from iPhone or Android. This is where it has been designed for…
Summary: Use REST for the iPhone and the DB API for systems integration.
I hope this helps…
Cheers!
Frank
I need the Web-Service Feature and i dont want to open the database to be accessible from remote.
i know there are some benefits to work with database object. Indeed REST is not the lovely way for systems integration.
I have no feeling. Just do it the way it work it in the best way in the selected case. In gerneral i think the internal object like database can more change than changing your systems integration. They should be more stable. I say should i know often they dont be.
Speed difference's are not the point. To be not Complete is problem of the current implementation.
Using the database permission system for user application permission of course you can but in my point of view it is bad design.
Hi Schnueptus,
> I don't want to open the database
That's perfectly valid.
I also like the REST interface very much and the entire team is quite proud about it :-)
But the fact is that the API changed more then the DB in all applications that I have been working with (that includes the production line control software of the leading European car manufacturer…). And who defines what is "good" or "bad" design? For what reasons? Do they specify the metrics they use to judge?
Well, it's a philosophical questions and thus won't have a final answer.
Enjoy any of the APIs meanwhile (there is also an interesting GPLed "xml-rpc" OpenACS package that allows you to selectively expose the TCL API).
Cheers!
Frank
As of 09/2013 the RESTful interface supports many more ]po[ objects. Get in touch with with the core team if you come across an object not yet supported.
Hi Klaus,
and where can I find the documentation on the "many more ]po[ objects"? Because here http://www.project-open.org/en/package_intranet_rest_create its still just projects, Translation Tasks and Financial Documents. I would be interested in creating some CIs through the REST-Interface.....Is that possible already?
Regards
Jan
Hi Jan,
please check the code or see ]po[ API doc:
http://www.project-open.net/api-doc/procs-file-view?path=packages%2fintranet-rest%2ftcl%2fintranet-rest-create-procs.tcl&public_p=0
for more details.
CI is not yet supported. In case you want to add it yourself, we would be happy to review your work and add it to the code repository.
If you require an estimation of effort please get in touch with us.
Hope that helped
./k