[SOLVED] Bug or normal behaviour PBS API taskId (UPID) pattern

Mirmanium

Active Member
Aug 14, 2020
73
11
28
45
Hi,

I am creating some flows in node-red to call Proxmox API to perform some backup actions.
Although I created some of them successfully to create backups and check if task of each one finished well or not, when trying to check if a task from a "sync" job finished, it always returns error to parse JSON because javascript transforms "\x3a" into ":" before call so end up failing.
Why only this type of task is using hex to overcome special characters?

I don't face this problem using curl in a linux terminal thought but I don't know how can I do it in javascript.


1712430319743.png
Rest of (UPIDs) used does not include this hex characters and works well with javascript.
Any idea how can I solve this problem? or should I created a ticket for fixing this problem?

Thank you,
 

Attachments

  • 1712430305514.png
    1712430305514.png
    15.1 KB · Views: 0
Last edited:
I found a way by encoding each backslash \ highlighted in the previous post (only the backslash) by "%5c" (encoded backslash). Now it returns valid json parsed.
It shows like this ...%5cx3a...