# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth
import json
print("url")
url = "https://domain-name.atlassian.net/rest/api/2/project/search"
print(" url is done")
auth = HTTPBasicAuth("gmail_id@gmail.com", "API-TOKEN")
print("authenticated")
headers = {
"Accept": "application/json"
}
print("headers ")
response = requests.request(
"GET",
url,
headers=headers,
auth=auth
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.