organzing for portfolio

This commit is contained in:
2024-12-13 17:32:49 -06:00
parent 299f95e2fb
commit 1b0612b005
30 changed files with 910 additions and 0 deletions

View File

@ -0,0 +1,21 @@
function api_key_phpiahm()
{
#Description: obtain api key from phpipam for future operations
#Arguments: none
#Outputs: api key
curl \
--silent \
-X POST \
--user $UN:$PW \
-H "Content-Type: application/xml" \
$PHPIPAM_BASE_URL/user/ > /tmp/phpipam/$CURR_EX_VAR-token.xml
export API_TOKEN=$(while read_dom; do
if [[ $ENTITY = "token" ]]; then
echo $CONTENT
fi
done < /tmp/phpipam/$CURR_EX_VAR-token.xml)
rm -f /tmp/phpipam/$CURR_EX_VAR-token.xml
}