I'm trying to create project on jira from my c# code and it is not working but when i used postman to create projcet, it create the project on jira.
Please suggest me something i reach bottleneck
Hi Harry - to get a decent answer, you'll need to share a bit more information here.
What are you expecting to happen and what is actually happening. Are you getting an error message? If so post the details.
If you can share a snippet of the code you are using which shows how you are calling the API, it will help people understand what you are trying to do.
Finally, since your question is development related, consider asking it over on the dedicated developer's community: https://community.developer.atlassian.com. If you do that, post a link here so that others can follow the trail.
Below is the code :-
NewProject objnewprj = new NewProject();
objnewprj.key = "TEST";
objnewprj.name = "TEST";
objnewprj.projectTypeKey = "business";
objnewprj.projectTemplateKey = "com.atlassian.jira-core-project-templates:jira-core-project-management";
objnewprj.description = "Example Project description";
objnewprj.lead = "admin";
objnewprj.url = "http://abc.co.in/";
objnewprj.assigneeType = "UNASSIGNED";
objnewprj.avatarId = 10204;
objnewprj.issueSecurityScheme = 10000;
objnewprj.permissionScheme = 10100;
objnewprj.notificationScheme = 10100;
objnewprj.categoryId = "10000";
byte formbytes = System.Text.ASCIIEncoding.Default.GetBytes(projectitem.ToString());
var webrequest = (HttpWebRequest)WebRequest.Create("http://jirademoseasia.atlassian.net/rest/api/2/project");
webrequest.Method = "POST";
webrequest.ContentType = "application/json";
webrequest.UserAgent = "xx";
var webresponse = webrequest.GetResponse();
System.IO.StreamReader reader = null;
System.IO.Stream responseStream = webresponse.GetResponseStream();
reader = new System.IO.StreamReader(responseStream);
result = reader.ReadToEnd();
This implementation is working fine on Postman Software but when implementing through code giving "The remote server returned an error: (400) Bad Request." error.
One thing the url specified here is dummy and you have to provide some actual url here to run thid code.
Please review the code and give your valuable feedback.
Good morning All, Our goal is to get you into the habit of while enjoying your favorite morning drink you are checking the NOVA "space" for topics and comments. Your input is really needed and...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG