Comments (10)
@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
from jiraone.
@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" '
from jiraone.
You should not use a raw string identifier r
for your strings.
Do this ✅
jql = 'project = "project name"'
Don't do this ❌
jql = r'project = "project name" '
from jiraone.
@smaritem Let me know if you got it working for yourself?
from jiraone.
I tried it, but still dont work. I am getting an empty csv file
I also tried
load = LOGIN.get(endpoint.get_all_priorities() )
I am getting the repsonse 200, but the text doesnt contain the data.
How can I get the history in the changelog.csv file using the rest api URL, /rest/api/... ?
from jiraone.
@smaritem
From your screenshot, it doesn't seem that there's any history from that JQL. The usual message on screen should show the issues where the history is being extracted from
e.g
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.
e.g
jql = "key = ABC-123"
from jiraone.
@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" '
Or how can we use it witht the rest API url https://server_name.net/rest/api/..?
from jiraone.
@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. https://server_name.net
just the base_url only. Also, if it's on a server then you might want to add LOGIN.api = False
before calling the authentication method.
LOGIN.api = False
# before calling token_session method?
LOGIN.token_session(sess=token)
from jiraone.
@princenyeche ,
thanks, it works with
LOGIN.api = False
from jiraone.
Great.
from jiraone.
Related Issues (20)
- I found a bug in the class PROJECT.change_log
- How to export issues with needed feilds only? HOT 8
- How-to: Using Jira api token to log in HOT 8
- field_name: Target a field name to render. datatype -> string HOT 4
- Export in .RST an project, issue HOT 4
- Issue using download_attachments HOT 5
- Recurring header line with issue export HOT 3
- Jiraone delta extraction HOT 2
- JSON export HOT 5
- issue_export page size parameter needed HOT 3
- issue_export failing HOT 5
- Problem with Export parameters for field_types HOT 3
- Question about issue_export HOT 1
- Error trying to import to json (Jira Data Center) HOT 19
- issue_export stuck HOT 5
- CSV error HOT 2
- _csv.Error: field larger than field limit (131072) HOT 2
- Issue with `issue_export()` omitting last row
- Private CA certificates / OAuth login HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jiraone.