You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-10-22 16:28:35

evobe
Member
Registered: 2023-10-22
Posts: 4

Help with updating Notepad under Computers using PowerShell

Not sure if I'm allowed to crosspost - but just putting it under the English board too. Delete if needed.
So I'm having what seems to be a common issue. Updating entries in other databases connected to the main.
Read this - Use:

curl -X POST \
-H 'Content-Type: application/json' \
-H "Session-Token xxxx" \
-H "App-Token xxxx" \
-d '{"input": {"itemtype": "Problem", "items_id": ## problem_id##, "content": "my note content"}}' \
'http://path/to/glpi/apirest.php/Notepad/'

I changed the "itemtype" to computer, added the correct computer ID and now I get a return that the note is incrementing but no note in the associated computer item.

 id message
 -- -------
7745

Can someone help with the correct syntax? Is something missing?

Offline

#2 2023-10-23 13:08:25

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: Help with updating Notepad under Computers using PowerShell

Did you put "Computer" or "computer"? It is case sensitive and must be "Computer".


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

Board footer

Powered by FluxBB