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

Mirmanium

Member
Aug 14, 2020
60
8
13
44
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...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!