Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API giving different results between Python and Postman

Les Marsyla March 25, 2025

I am trying to select all issues for a specific project via REST API. In Postman I can set up the JQL to get the specific issue types I want returned for a specific Project and it provides the returned JSON I expect to receive.

If I try the exact same JQL request in a Python script, using the same URL, user and authentication, the message returned is that the project is not found.

Has anyone experienced this type of issue?

2 answers

0 votes
Aaron Pavez _ServiceRocket_
Community Champion
March 25, 2025

Hi @Les Marsyla 

Can you share how you dop the call with postman? add a screenshot of that, the response and the auth method.

Same for python. A screenshot of the same and add the code you are using.

Regards - Aaron

Les Marsyla March 26, 2025

Hi Aaron, I've posted the samples in a different reply on the same thread.

Aaron Pavez _ServiceRocket_
Community Champion
March 27, 2025

hihi! ill look them today. Thanks!!

0 votes
ELFAPP Technologies
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2025

Hi @Les Marsyla 

Please let us know what endpoint you're calling and what HTTP method you're making. An example would go a long way to explaining what you might be experiencing. However, it is most unlikely that you will get different results for the same API, except if the permissions differ or probably the user differs. Probably in Postman, are you likely using a different auth mechanism?

Les Marsyla March 26, 2025

Here's the GET call in Postman - 

https://jira-aes.kp.org/rest/api/2/search?maxResults=50&jql=project=52400%20and%20issuetype%20=%2010100

Authentication with Bearer Token - NDI5MTY3NTczNTgyOsOXUiz4c0vj+7QI9mHJP/907HgD

Gets these results - 

    "expand": "schema,names",
    "startAt": 0,
    "maxResults": 50,
    "total": 8,
    "issues": [
        {
            "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
            "id": "4618564",
            "key": "KPMARS-716",
            "fields": {
                "customfield_21400": null,
Here's the call as it is used in Python - 
Here's the results - 
Response = {"errorMessages":["A value with ID '52400' does not exist for the field 'project'."],"errors":{}}
I can change to a different project and it works - 
With results (a very large result JSON, this is just a part) - 
eturned issues = {'expand': 'schema,names', 'issues': [{'expand': 'operations,versionedRepresentations,editmeta,changelog,renderedFields', 'fields': {'aggregateprogress': {'progress': 0, 'total': 0}, 'aggregatetimeestimate': None, 'aggregatetimeoriginalestimate': None, 'aggregatetimespent': None, 'assignee': {'active': False, 'avatarUrls': {'16x16': 'https://www.gravatar.com/avatar/2670ea0a50e4901666bb2bf775cb66d9?d=mm&s=16', '24x24': 'https://www.gravatar.com/avatar/2670ea0a50e4901666bb2bf775cb66d9?d=mm&s=24', '32x32': 'https://www.gravatar.com/a
Same call in Postman - 
Results in Postman - 
    "expand": "schema,names",
    "startAt": 0,
    "maxResults": 50,
    "total": 8,
    "issues": [
        {
            "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
            "id": "1134533",
            "key": "SSAEM-61",
            "fields": {
                "customfield_21400": null,
Same calls in Postman and Python, same authentication, but for one project I get no return in Python. Of course the one that doesn't return is the one I need.
ELFAPP Technologies
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 1, 2025

@Les Marsyla 

It seems you've added your token to this comment, please redact it by editing your comment. I believe you might be using a different authentication in Postman as compared to Python. Please verify the authentication for both there might be a space character or a newline that may cause an issue in scripts especially if they are not formatted properly as the Python result shows a permission issue, and since Postman doesn't it suggests a permission issue with the authentication rather than the user. However, since you're on a paid plan you can raise a support request and have Atlassian look into your authentication method to identify what's wrong.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events