최신 버전의 Jira (https://www.atlassian.com/software/jira/download)를 다운로드하여 랩탑에 설치했습니다. 프로젝트를 생성하고 문제를 실행하기 위해 REST API를 사용하려고합니다. 자바를 사용하여 호출합니다. 나는, 내가 사용하고 {\"key\":\"VSPRJ\",\"name\":\"FROMVSPROJ\",\"projectTypeKey\":\"software\",\"description\":\"VSPROJDESC\",\"lead\":\"ADMIN\",\"assigneeType\":\"PROJECT_LEAD\"}
JIRA REST API - 프로젝트 HTTP 400 오류 생성
자바 코드는 내가 내가 보내는 오전 JSON에 WRT를 변경할 중요하지 (400)를 얻고
private static ResponseEntity WriteProjectIssueInformation2Jira()
{
httpHeaders = createHeadersWithAuthentication();
String createProjJSON = createCreateProjectJSON("INEMP2", "EMPMGMT", "com.atlassian.jira-core-project-templates:jira-core-project-management","business","ADMIN","PROJECT_LEAD","10000","0","http://atlassian.com","10324","0","0","projfromcode");
String url = JIRA_URL + "/rest/api/2/project";
System.out.println(url);
httpHeaders.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<String> requestEntity = new HttpEntity<String>(createProjJSON, httpHeaders);
return restTemplate.exchange(url, HttpMethod.POST, requestEntity, String.class);
}
이하 -
내가 보내는 오전 JSON이다 프로젝트 가져 오기 API를 시도하고 데이터를 반환합니다. 샘플 Java 프로그램과 JIRA 모두 로컬 랩탑에서 실행 중입니다. 어떤 권한,
요청시에만 문제가되어야합니다. 참조 https://developer.atlassian.com/jiradev/jira-apis/about-the-jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue#JIRARESTAPI 예 - CreateIssue 데이터가 도움이 될 수 있습니다. – Chidambaram
감사합니다. 내가 이전에 링크를 확인하고 그것은 프로젝트 생성을위한 샘플을 가지고 있지 않습니다. 권한 문제 일 수 있다고 말하는 이유는이 스레드 (https://groups.google.com/forum/#!topic/atlassian-connect-dev/s9uyP3tmxu4)를 본 후입니다. –