From 149b2be00f9664d8f03771c20537b93789234cc9 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Tue, 11 Oct 2022 09:12:11 -0400 Subject: [PATCH] confluence script get --- CustomerNotes/G2/G2.md | 8 ---- Scripts/confluence_get.py | 35 ++++++++++++++++++ ...ence_api_example.py => confluence_post.py} | 17 +++------ Timetagger/_timetagger/users/norm~bm9ybQ==.db | Bin 94208 -> 94208 bytes 4 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 Scripts/confluence_get.py rename Scripts/{confluence_api_example.py => confluence_post.py} (85%) diff --git a/CustomerNotes/G2/G2.md b/CustomerNotes/G2/G2.md index 847a6a25..55706c95 100644 --- a/CustomerNotes/G2/G2.md +++ b/CustomerNotes/G2/G2.md @@ -1,6 +1,5 @@ # G2 -!*! ## 8/12/2022 ### Kick off Call! * How can I be helpful for the first week? @@ -37,9 +36,7 @@ They feel like this has been talked about for a longtime. Just waiting for a GO * [X] Register Button Copy > Learn More * [ ] https://TBD.TBD.com * [X] Remove Learning Paths from Templates (Homepage + Subnav) -!@# -!*! ## 09/02/2022 ### Meeting with Meesha & Sara re: Workato * Meesha's Goal - best way to implement Northpass? @@ -50,9 +47,7 @@ They feel like this has been talked about for a longtime. Just waiting for a GO * Katlin also wants to trigger an email for someone that starts a course but doesn't complete * Lofty goals? Not yet, most will be on the marketo side * Setup customer MQL -!@# -!*! ## 10/03/2022 * Make lessons on cards clickable - should enter course overview page. * [ ] CTA button on overview page - back to courses? @@ -72,9 +67,7 @@ They feel like this has been talked about for a longtime. Just waiting for a GO * Erin to take over content & overall admin responsbilities * Certifications Launch in Q2 of 2023, maybe end of Q2 (April) * First Certifications Discussion Mid December to plant seed -!@# -!*! ## 10/02/2022 * Wants to hear best practices on: * AppCues Cadence @@ -92,4 +85,3 @@ They feel like this has been talked about for a longtime. Just waiting for a GO * I recommended Accredible for multiple course certs. Badges are great for coures. Certs are great for a series of badges. * They would like to cert people on subjects. "Customer Marketing Certified", but they don't need to be buyer intent certified. * Certs would allow them to become more indepth. G2 is more than just a review site. -!@# diff --git a/Scripts/confluence_get.py b/Scripts/confluence_get.py new file mode 100644 index 00000000..a87c5a52 --- /dev/null +++ b/Scripts/confluence_get.py @@ -0,0 +1,35 @@ +import requests +from requests.auth import HTTPBasicAuth +import json + +url = "https://northpass.atlassian.net/wiki/rest/api/content/2210463745/child/page" + +#auth = HTTPBasicAuth("bnJhc211c3NlbkBub3J0aHBhc3MuY29tOnFmOUlsN1g0d2t0aGdRS0JPSWx5NTczNw==") +auth = HTTPBasicAuth("nrasmussen@northpass.com", "qf9Il7X4wkthgQKBOIly5737") + +headers = { + "Accept": "application/json", +} + +#payload = json.dumps( { +# "type":"page", +# "ancestors":[{"id":2210463745}], +# "space": +# {"key":"~350535240"}, +# } ) + +response = requests.request( + "GET", + url, + headers=headers, + auth=auth +) + +jsonResponse = response.json() +for response in jsonResponse['results']: + if response['title'] == 'Flink': + print("Found") + print(response['title']) + + +#response = json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")) diff --git a/Scripts/confluence_api_example.py b/Scripts/confluence_post.py similarity index 85% rename from Scripts/confluence_api_example.py rename to Scripts/confluence_post.py index 1093f341..6bd0b655 100644 --- a/Scripts/confluence_api_example.py +++ b/Scripts/confluence_post.py @@ -7,6 +7,9 @@ import json url = "https://northpass.atlassian.net/wiki/rest/api/content" #auth = HTTPBasicAuth("bnJhc211c3NlbkBub3J0aHBhc3MuY29tOnFmOUlsN1g0d2t0aGdRS0JPSWx5NTczNw==") +# Find a page CURL +#curl -u admin:admin -X GET "http://localhost:8080/confluence/rest/api/content?title=myPage%20Title&spaceKey=TST&expand=history" | python -mjson.tool + auth = HTTPBasicAuth("nrasmussen@northpass.com", "qf9Il7X4wkthgQKBOIly5737") headers = { @@ -38,16 +41,6 @@ response = requests.request( response = json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")) print(response) -x = response.split() -print(x) +#x = response.split() +#print(x) - - -# Update a page: -response = requests.request( - "PUT", - url, - data=payload, - headers=headers, - auth=auth -) diff --git a/Timetagger/_timetagger/users/norm~bm9ybQ==.db b/Timetagger/_timetagger/users/norm~bm9ybQ==.db index 259e6b18af710a956cbc038a0f4c6808e4ebaa6d..a54105eda5f7b06ce40277abcd129157758edef5 100644 GIT binary patch delta 313 zcmZp8z}oPDb%Hcw_e2?I#_o*?OZ=J7u-i;#59noLx7j=;U>O@X7n5vAsjqWrig&?g z_wc>1P90~l{Jv1e?Y*uo|v%*-weQwej$_L^|U76|}{a$qU| delta 121 zcmZp8z}oPDb%Hcw=R_H2#?FliOZ=Hnv%61b59r-IEnpej!~ovS?%{hSm`^hYY-TT* z&bV>nCdSDQ#jKk{i`Vl&L>rJro7d;CNHBh7*v$1IfN|o2xtqU!92e O