View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - API method POST - ProjeQtOr
 

API method POST

More
10 Mar 2025 16:03 #1 by CAIE_guens
API method POST was created by CAIE_guens
Hi,
Iwant to add Tichet, projects, tasks with the API.
In the documentation, there is a POST example with API.
I don't know how to make it to do th rigth thing.
I test the API with POSTMAN, I can read all(Client, Product, Project,....)
I test the API with PHP, I can red / search all for my need.
But the POST, it's a mistery for me, it'like the APIKey is not the good for the user logged to the API.
Where I lost to make the rigth thing ?
HELP HELP, my SVN is  about 100 revisions and not work.
Thanks
Guénolé
I give you the code for test, if someone can tell me where is the mistake
the user 'apipro' have the same password in the projeqtor user database and in api/.htpasswd 

File Attachment:

File Name: projATi_php.txt
File Size:2 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
10 Mar 2025 17:08 #2 by CAIE_guens
Replied by CAIE_guens on topic API method POST
Hi,
This is the response :
Données avant chiffrement : {"id":"1", "name":"name to be changed for Ticket 1"}

Données après chiffrement : GgPP01oNz2djy1AZa8ya+D5eh/dRCHflMFgaeT0iWSOUKXuO0ueTwOMY/kq+CqtvTE1Ky5ErBnWXZchnI+XZ/kU0Btvmpg==

Réponse décryptée : "{\"id\":\"1\", \"name\":\"name to be changed for Ticket 1\"}"
Json Payload : {"data":"GgPP01oNz2djy1AZa8ya+D5eh\/dRCHflMFgaeT0iWSOUKXuO0ueTwOMY\/kq+CqtvTE1Ky5ErBnWXZchnI+XZ\/kU0Btvmpg=="}
* Trying 192.168.12.10:80...
* TCP_NODELAY set
* Connected to 192.168.12.10 (192.168.12.10) port 80 (#0)
* Server auth using Basic with user 'projapi'
> POST /projeqtor/api/Ticket HTTP/1.1
Host: 192.168.12.10
Authorization: Basic cHJvamFwaTpwcm9qYXBp
Accept: */*
Content-Type: application/json
Content-Length: 110

* upload completely sent off: 110 out of 110 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Mon, 10 Mar 2025 16:03:38 GMT
< Server: Apache/2.4.41 (Ubuntu)
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< Set-Cookie: PHPSESSID=6ft69rvmlap7mj2trhtc796lge; path=/
< Transfer-Encoding: chunked
< Content-Type: application/json; charset=UTF-8
<
* Connection #0 to host 192.168.12.10 left intact
Réponse de l'API : {"error":"invalid API query", "message":""'data' is not correctly encoded for method POST. Request for correct API KEY""}

Helps thanks
I can do it in SQL but the is normaly more efficient.
Guenole

Please Log in or Create an account to join the conversation.

More
12 Mar 2025 09:49 #3 by CAIE_guens
Replied by CAIE_guens on topic API method POST
HI,
Good job for me, it works !!!

I release a new api/index.php whitch work for my needs
The POST Method was not encrypted ( it works in a LAN and have no needs of security trasaction) and I wanted to see the rhe good result of API POST.
After, there are 2 or 3 modifications for adapt data.

Thanks for Projeqtor
I make planning of OF CEGID PMI (mssql) -> API PROJEQTOR
BI with
- Testing needs in stock, commands vérification, Tickets for command if not
- Plan to dispatch MP for OF, ticket for missing part
- Plan for product with tasks
- Report of non quality
- import time / COST from PMI
- and many little app which are on excel
and more that I don't know now

Guénolé Michel

 

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.048 seconds

Cookies settings

×

Functional Cookies

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

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.