cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Rest API: POST rest/item no longer available in 2.0 Husky

Nico_M
10-Marble

Rest API: POST rest/item no longer available in 2.0 Husky

It seems that with 2.0.0.5 version the posting of items no longer works with the REST API?

We know that the future is with Swagger but it was never announced that REST calls would be disabled. Is this documented somewhere which REST calls are dismantled with which version?

Specific call that does not work anymore:

POST <baseURL>/cb/rest/item

 

Response:

 

405: The page /cb/rest/item does not exist.
ACCEPTED SOLUTION

Accepted Solutions
alfonso_c
14-Alexandrite
(To:Nico_M)

Edited - added bug ID

 

Hello @Nico_M , per my tests, it appears the usage of the ending forward slash / is required on this version. To be more specific, I reproduced the HTTP 405 error with POST rest/item but it worked with POST rest/item/, here is a screenshot from my test via Postman:

alfonso_c_0-1725602196098.png

 

Please let me know if that works.

 

Side notes:

  • Rest API V1 is a legacy integration but still available on Codebeamer, I documented some common Q&A at the page REST API (v1) support in Codebeamer.
  • This is currently being handled as a bug under Codebeamer SPR 13644853 - A REST API Endpoint needs now a „/“ at the end, which was not necessary before, future versions should no longer require the forward slash to be added at the end.

 

View solution in original post

5 REPLIES 5
alfonso_c
14-Alexandrite
(To:Nico_M)

Edited - added bug ID

 

Hello @Nico_M , per my tests, it appears the usage of the ending forward slash / is required on this version. To be more specific, I reproduced the HTTP 405 error with POST rest/item but it worked with POST rest/item/, here is a screenshot from my test via Postman:

alfonso_c_0-1725602196098.png

 

Please let me know if that works.

 

Side notes:

  • Rest API V1 is a legacy integration but still available on Codebeamer, I documented some common Q&A at the page REST API (v1) support in Codebeamer.
  • This is currently being handled as a bug under Codebeamer SPR 13644853 - A REST API Endpoint needs now a „/“ at the end, which was not necessary before, future versions should no longer require the forward slash to be added at the end.

 

Dear Alfonso,

 

Thanks for your quick reply, this works for us.


Could you already tell me in which cB version/SP this will be patched?

 

Cheers,

 

Nico

alfonso_c
14-Alexandrite
(To:Nico_M)

Hi @Nico_M , as I can see, the fix is candidate for release on 2.0.0.6,  2.1.0.4, 2.2.0.2. Please note this is just an unconfirmed estimation, it is highly tentative and may be subject to change. To know if the fix is eventually present, you may search for #13644853 in the Release Notes once the new version is released.

IM_10356021
5-Regular Member
(To:alfonso_c)

Also possible solution is, adding this rule into the cb/web/WEB-INF/urlrewrite.xml and restart the Codebeamer

 

	<rule>
		<from>^/rest/(.*)(?&#60;!/)(?&#60;!\.spr)$</from>
		<to>/rest/$1/</to>
	</rule>

 

GC_11015087
5-Regular Member
(To:Nico_M)

Note that "swagger" is not a different API ... it just a way of describing a REST API, and there are tools that use the swagger description to simplify experimentation with the API.   So swagger does not replace the REST API, but just describes the REST API.

Announcements



Top Tags