Set archive password via API

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
fitiwizz
Newbie
Newbie
Posts: 2
Joined: April 1st, 2016, 2:48 am

Set archive password via API

Post by fitiwizz »

Hello,

Didn't find any info on the API doc or the forums, but is there any way to set an archive password via the API ?

Thanks !
User avatar
safihre
Administrator
Administrator
Posts: 5678
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Set archive password via API

Post by safihre »

When adding an NZB, only by setting in the request the nzbname:

Code: Select all

nzbname: "name{{password}}"
After it is added and in the queue, changing it is harder but possible by sending a POST request to a specific URL.
This is how it is done in Glitter:

Code: Select all

           callSpecialAPI("/nzb/" + NZB_id + "/save/", {
                name: NZB_name,
                password: $('#nzb_password').val()
            })
callSpecialAPI will append the API key to the request and the send it.
The name variable is essential also.. Otherwise the password is not updated!
It will return a 303-redirect to the main page and no information about succes/failure, because there is no real API call for it but just this function that's used in the (old) skins.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
fitiwizz
Newbie
Newbie
Posts: 2
Joined: April 1st, 2016, 2:48 am

Re: Set archive password via API

Post by fitiwizz »

Thank you ! I will try this.
Post Reply