After a search, I have found these two tickets, but I don't know how to get their content: #583 and #638.
So I will ask :
Is there an existing API to projeqtor for tasks like :
- Create activity
- Work allocation
- Create actions
- Etc. ?
If not, is it possible, in your opinion and with your knowledge of the code, to create easily one, by using existing php code (for maintenance purpose of course) ?
For example, pre-requisites would be to have well identified functions doing the actions listed above.
Create an API would not be very complicated.
Some Web Services could do the job and save() method of all classes will generate controls and persistence instructions.
But the real "hard trick" is securing this API.
It should not be wide open so that anybody calling the API could damage any data.
The security is not a major problem for now in my context. And, using a similar system of session is maybe enough for the tasks I would like to do through the API.
I had a quick look to the code and saw the save() method.
So I have a question about the API : IYO, how do you see the API like ?
This is how I see it:
Because it is PHP, so a good thing would be to create a dedicated PHP server page POSTing (or GETing for the example) some data.
example : https://my.projeqtor.project/api.php?account=my_account&password=my_password&item=activity&action=create&parent_id=id&name=my_coding_activity&description=some_text&[...]
So, I think it can be easy this way.
Then, the second part is data retrieval. I have thought about using SQL views to prevent any change in DB but it requieres some MySQL driver. I would prefer something more flexible.
I would be in favor of Web Service in REST mode.
It would look like what you describe, but with parameters in Post in XML or JSON format.
It is important that login account and password are not in the url, because url is always in clear text ,even in https transaction.
The data retieval does not need views or alse : as it is always on server side, there is no constraint.
But what is important is that Web Service MUST control that user has the rights corresponding to his request (never trust the request).
It could be : my.projeqtor.project/webservice.php
The good practice is to use http method to match service mtehod : for instance GET to retrieve data, POST to create/update data.
New to Proteqtor and enjoying the learning - excellent functionalities and the documentation is perfectly detailed, Bravo!
We will be using it in combination with our Tiki and Drupal installation on shared LAMP.
We will be using REST API to communicate between the different installations; easier without any PHP coding.
As we are going through the different posts here, we wanted to know if the functionalities (READ/WRITE using REST API) can be implemented now (we are in v4.2.3) ?
If so please share the topic numbers here, so we can prepare a nice HowTo (happy to share with you).
En poursuivant votre navigation, vous acceptez le dépôt de cookies tiers destinés au bon fonctionnement et à la sécurisation du site (gestion de session, reCaptcha) et à une analyse statistique anonymisée des accès sur notre site (Google Analytics). Si vous vous inscrivez, les informations que vous fournirez ne seront jamais divulguées à un tiers sous quelque forme que ce soit. En savoir plus
Paramétrages de cookies
×
Cookies fonctionnels
Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.
Session
Veuillez vous connecter pour voir vos activités!
Autres cookies
Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.