Skip to main content

editpkg using URL api call error

Comments

9 comments

  • cPRex Jurassic Moderator
    Hey there! Can you post the exact URL call you're using so I can do some more testing?
    0
  • Camilo Herrera
    Hey!, yes, this is the URL call "
    0
  • cPRex Jurassic Moderator
    Running that worked well on my end - I used this command in an active session: https://172.105.107.152:2087/cpsess4498069613/json-api/editpkg?api.version=1&name=testing&bwlimit=1000
    and I received this output: {"data":{"pkg":"testing"},"metadata":{"command":"editpkg","reason":"OK","version":1,"result":1}}
    I also tried with the "&quota" option as well, and that worked fine for me also. I did an addition test since you note your package is named "Personal" and did confirm that the package name is case-sensitive, so maybe that is related to the issue? But at this time, I can't reproduce the problem on my end. You're always welcome to create a ticket with our team so we can check this directly on your system.
    0
  • Camilo Herrera
    I am using a token (root user) and sending the authentication info on the "Authorization" header to execute the command, it may be related to the authentication method, it works just fine on CLI too. If possible try creating a token and then using curl from the command line as suggested on the post mentioned on the first message, like this: curl -XGET -H 'Authorization: whm root:MYTOKEN' -d 'api.version=1&name=testing&bwlimit=1000' '
    0
  • cPRex Jurassic Moderator
    I tested this with a token on my end just now, and that method is also working well for me. Could you submit a ticket so we can check the affected system?
    0
  • Camilo Herrera
    Guess i found the cause, did you checked the "Everything->All Features" privileges for the token, right?, uncheck it and try again (keep the remaining privileges checked). The question is, why do you have to give the token access to all privileges if you have a "Packages Standard Privileges->Add/Remove Packages add-pkg" and "Packages Standard Privileges->Edit Packages edit-pkg" section on the permission list?. It may be misleading.
    0
  • cPRex Jurassic Moderator
    I didn't have the "all" option checked on my end, and I wouldn't expect that to be required for that particular action.
    0
  • Camilo Herrera
    Once i checked that privilege the call worked, that's weird.
    0
  • cPRex Jurassic Moderator
    It's weird for sure - you can always put in that ticket and we'll check it out!
    0

Please sign in to leave a comment.