G2
This commit is contained in:
@ -1,12 +1,26 @@
|
||||
import requests
|
||||
import requeearts
|
||||
|
||||
|
||||
|
||||
# Create a new page from API Docs
|
||||
# This is in bash
|
||||
curl -u admin:admin -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"new page",
|
||||
"space":{"key":"TST"},"body":{"storage":{"value":"<p>This is <br/> a new page</p>","representation":
|
||||
"storage"}}}' http://localhost:8080/confluence/rest/api/content/ | python -mjson.tool
|
||||
|
||||
# This is a Northpas example in python
|
||||
import requests
|
||||
url = "https://api.northpass.com/v2/people/person_uuid/deactivations"
|
||||
headers = {"accept": "*/*"}
|
||||
response = requests.post(url, headers=headers)
|
||||
print(response.text)
|
||||
|
||||
# Confluence example in Python
|
||||
import requests
|
||||
url = "http/"
|
||||
|
||||
|
||||
|
||||
import requests
|
||||
|
||||
TODO fix this url
|
||||
@ -18,4 +32,3 @@ headers = {"accept": "application/json"}
|
||||
response = requests.get(url, headers=headers)
|
||||
|
||||
|
||||
print(response.text)
|
||||
|
||||
Reference in New Issue
Block a user