-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication with bearer token #94
Comments
@smaritem To use a Bearer token, you will need to call the token_session() method. from jiraone import LOGIN, endpoint
# previous statement
# You must declare a base_url
url = "https://yourinstance.atlassian.net"
token = "GHxxxxxPPPxx" # Your bearer token
# First assign a base_url to the attribute below
LOGIN.base_url = url
# You need to pass the token variable to a keyword argument called `sess`
LOGIN.token_session(sess=token)
# Afterwards you can make calls such as
data = LOGIN.get(endpoint.myself())
print(data.status_code)
# result
# 200 |
@princenyeche , thanks for the reply I am getting an unknow error with the code PROJECT.change_log(jql=jql) , where jql = r'project = "project name" ' |
You should not use a raw string identifier jql = 'project = "project name"' Don't do this ❌ jql = r'project = "project name" ' |
@smaritem Let me know if you got it working for yourself? |
@smaritem Extracting issue histories...
Getting history from IP-132 So if the CSV file is empty, does it include any headers? If yes, there is probably no history of the issues being queried. Probably what you can do is simply test it on a single issue history instead. jql = "key = ABC-123" |
@princenyeche that jql gives back more than 10000 issues, and most of them do have histories Is there an alternative to PROJECT.change_log(jql=jql) , where jql = 'project = "project name" ' |
@smaritem Your base_url must point to your instance URL, so if you're a server, let it be to the API endpoint that is available. e.g. LOGIN.api = False
# before calling token_session method?
LOGIN.token_session(sess=token) |
@princenyeche , |
Great. |
Hello Prince,
the autentication doesnt work with the bearer token. In our company we can only retrieve data over a login with bearer token.
Can you help us with the autentication?
Thanks & best regards
Smari
The text was updated successfully, but these errors were encountered: