Service...pproval(3)
π Approval module π
okay bestie, sit down, hydrate, and let's talk about the Service-now Perl API β specifically the Approval perl module π this is Service...pproval(3) from the User Contributed Perl Documentation and she is lowkey iconic.
πΈ Desciption πΈ
(and yes she really is spelled Desciption in the source, we don't fix her, we love her π )
It's an object representation of an Approval record in the Service-now platform. That's the whole vibe. And it provides subroutines for querying, updating, and creating approvals β¨ so basically everything you'd want to do with an approval, it's giving.
π¦ System Requirements π¦
The Service-now Perl API needs Perl 5.8, plus these modules installed or she simply will not run, no cap π:
SOAP::Lite(prerequisiteshttp://soaplite.com/prereqs.html) 0.71 or laterCrypt::SSLeayIO::Socket::SSL
bestie pls actually install all three, don't be the person who shows up with two out of three π
π§ Constructor π§
β new β
new(Configuration);
Example, copy it exactly bestie:
$approvals = ServiceNow::ITIL::Approval->new($CONFIG);
So what's happening here π β it takes a configuration object and manufactures an Approval object connected to the Service-now instance. That's it. That's the whole thing. You hand her the config, she hands you back an object that's already connected. main character energy honestly π
π Subroutines π
π reject π
reject(sys_id of approval record, optional comment string)
Example:
$approval->reject($sysID,$comment);
This one rejects the Approval record with the specified sys id, and β if you gave her a comment β she adds the comment to the approval. The comment is optional, the sys id is not, iykyk π
π approve π
approve(sys_id of approval record, optional comment string)
Example:
$approval->approve($sysID,$comment);
Same shape, opposite energy β¨ this one approves the Approval record with the specified sys id, and if you passed a comment, that comment gets added to the approval. Slay. Go off. Approve that thing π«Ά
both of these want the sys_id of the approval record as the first argument, and the comment string is optional in both cases. Same rules, different outcome. Choose wisely bestie π
perl v5.42.0 π¦ 2025-07-25 β that's the version and date this page came from, mwah, thanks for reading, go approve something responsibly πβ¨π
π¦ where this page comes from
- fedora 43: perl-ServiceNow-API 1.01-38.fc43 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms