I am calling the API from a python script.
query = {
'jql': 'project = MA',
'fields': ['key','statuscategorychangedate','project','created','customfield_10020','summary','assignee','updated','status','duedate','issuetype','customfield_10016', 'parent', 'team'],
'maxResults': '5000'
}
try:
# Fetch data from the API
response = utils.get_json_from_api("/rest/api/3/search/jql", query)Whereas removing fields, increases the result to 411. In fact any fields other than just keys, limits the result to 100 issues returned.
How does fields limit the results set?
To complete the code I am adding the get_json_from_api function.
def post_json_to_api(endpoint, payload):
response = requests.post(
url=connection_info['base_url'] + endpoint,
headers={
"Content-Type": "application/json",
"Accept": "application/json"
},
auth=HTTPBasicAuth(
connection_info['username'],
connection_info['api_token']
),
data=json.dumps(payload)
)
if response.status_code == 201:
print(f"Posted successfully.")
else:
print(f"Failed to Post: {response.status_code}")
print(response.json())