# Create project REST API in Spring boot application for Jira Cloud Add-on gives 400 error

**URL:** <https://community.developer.atlassian.com/t/create-project-rest-api-in-spring-boot-application-for-jira-cloud-add-on-gives-400-error/29899>\
**Category:** Jira Cloud\
**Tags:** ac-spring-boot\
**Created:** [June 14, 2019, 12:33pm UTC](https://community.developer.atlassian.com/t/create-project-rest-api-in-spring-boot-application-for-jira-cloud-add-on-gives-400-error/29899 "2019-06-14T12:33:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![epehrson](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/epehrson/32/35813_2.png) [@epehrson](https://community.developer.atlassian.com/u/epehrson)\
**Post date:** [June 14, 2019, 1:52pm UTC](https://community.developer.atlassian.com/t/create-project-rest-api-in-spring-boot-application-for-jira-cloud-add-on-gives-400-error/29899/2 "2019-06-14T13:52:03Z")

</div>

Hi @zuber,

I assume that Jira is returning a detailed error message along with the 400 status code, so I suggest making sure that is printed first of all.

You can bump the log level of `RestTemplate` using `logging.level.org.springframework.web.client=DEBUG`, as described in [this StackOverflow post](https://stackoverflow.com/questions/7952154).

But I also recall coming across [SPR-9367](https://github.com/spring-projects/spring-framework/issues/14004), suggesting that the default `SimpleClientHttpRequestFactory` doesn’t support this, and that the best solution is switching the underlying HTTP client to Apache HttpComponents.

```auto
@Bean
public RestTemplateCustomizer httpComponentsRestTemplateRequestFactoryCustomizer() {
    return restTemplate -> restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory());
}

```

Once you’ve done that, you can also bump `logging.level.org.apache.http=DEBUG`.

---

_[View the full topic](https://community.developer.atlassian.com/t/create-project-rest-api-in-spring-boot-application-for-jira-cloud-add-on-gives-400-error/29899)._
