Skip to main content

uapi documentation 2025 audit needed

Comments

9 comments

  • cPRex Jurassic Moderator

    Hey hey!  I spoke with the development team about this, and there are too many tests for us to possibly list every outcome.  No matter what we documented on our side, there are various error states that would need to be accounted for, and we aren't planning on adjusting the docs at this time.  Here's some potential states for just one call:

    script they are executing via open exits nonzero which likely means non-json output (likely bug or cpsrvd downed)
    script they are executing exits zero but does not return valid JSON (likely bug)
    script they are executing exits zero, valid JSON but the metadata key does not exist at top level (shouldn't happen, likely a bug)
    script they are executing exits zero, valid JSON, metadata key exists at top level, result key does not exist (likely bug)
    script they are executing exits zero, valid JSON, metadata key exists at top level, result key exists beneath it but has values other than 0 or 1
    script they are executing exits zero, valid JSON, metadata key exists at top level, result key exists beneath it and has value of 0
    script they are executing exits zero, valid JSON, metadata key exists at top level, result key exists beneath it, has value of 1 BUT data key does not exist
    script they are executing exits zero, valid JSON, metadata key exists at top level, result key exists beneath it, has value of 1, data key exists BUT doesn't have expected data structure type
    script they are executing exits zero, valid JSON, metadata key exists at top level, result key exists beneath it, has value of 1, data key exists, has expected data structure type but none of the expected entries in resultant data structure.

    and there's just no way for us to include all of this, plus more, on each page.

    0
  • JAB Creations

    Hi Rex, good to see you again!

    So no, I think you've misinterpreted my request. I don't want to know every possibly error, hell no! I just want to know if errors if going to be a string '' and/or array [] and/or null. The same thing with the success checking. Does that make the request much more viable?

    0
  • cPRex Jurassic Moderator

    Oooooooh that makes more sense!  I'm running this by some people now and I'll let you know what I find out!

    1
  • cPRex Jurassic Moderator

    Okay, apparently I missed it by that much since most of the people I want to poke about this have already run away for the weekend.  I'll revisit this on Monday and see if I can get some answers from the development team then.

    1
  • cPRex Jurassic Moderator

    I just wanted to let you know I'm reaching out to the team about this today and I'll let you know what I find out!

    1
  • cPRex Jurassic Moderator

    The team does want to address this and validate the exit codes on the API, as that does seem like it would offer serious benefit.  I'm looking into how I can make this happen, so I'll likely post another update.

    1
  • JAB Creations

    Rex, thank you. I've been out all day running around so I'm just now seeing this. So could we please take an example API documentation page and do a before-and-after? That way there isn't any over-thinking or excess work done. Then once it's clear we're all on the same page of the same book in the same universe to then move forward on everything else with confidence? I should be more responsive this week than 8-9 hours lol...

    0
  • cPRex Jurassic Moderator

    Alright - I've spoken with both the dev team and the head of docs and everyone seems to be on board with the idea of making things better.  The trick now is timing and resources - I wouldn't expect anything to happen with this for several weeks due to the holidays, wrapping up q4, and beginning q1.  BUT, they all have a link to this case and I'll be sure to post updates once I get them.

    If I get an advance copy of a before-and-after page I'll be sure to share that.

    0
  • JAB Creations

    Rex, thank you very much! I completely comprehend, a lot of shifting going on as we head in to the heart of the holidays. This will end up speeding up development for other developers and myself when we need to implement,test and commit cPanel related code. Thank you!

    0

Please sign in to leave a comment.