Service...pproval(3)

πŸ“¦
version 1.01 Β· 2 versions
, in fedora 43

πŸ’– 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 😭:

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