I am using below code
url = "https://{domain_name}/rest/api/latest/issuetypescheme/project"
auth = HTTPBasicAuth('username', 'password')
headers = {
"Accept": "application/json"
}
query = {
'projectId': 'project_id'
}
response = requests.request(
"GET",
url,
headers=headers,
params=query,
auth=auth
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
i am getting below error
{
"errorMessages": [
"not a valid scheme id: project"
],
"errors": {}
}
@Niranjan , I've been googlin around for this forever and never saw the /associations documented anywhere and it works! Thanks you!
@chaitali k , knowing what Niranjan just showed us, here is how I am going to approach the same issue you are having.
If I was calling a Jira Cloud instance, it would be much easier, but this is the only way I see to do it. If anyone knows of a better way (using version 2 API), please comment.
yes I tried this but its taking lot of time to run python script.
that's why i need another way to do that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @chaitali k ,
Could you use this restapi call as url /rest/api/2/issuetypescheme/. ? This call should list all issue types schemes in the instance. /rest/api/2/issuetypescheme/schemeid will give the project associated with the scheme.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
/rest/api/2/issuetypescheme/{schemeId}/associations - This call should give you the associated projects (provided you give the scheme ID)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you for your help.
I need to find issuetypescheme associate to that project using projectid/projectkey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.