Forums

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

Using the next link of a space in a rest api call returns 400 bad request

thomas.fregin November 30, 2020

So i am using the Rest Api to extract a space from confluence.

If i request the next site with the next link on spaces it answers with a 400 bad request but using the exact same link in the browser works.

I thought it could be a problem with the login but using another resttemplate without authentication is resulting in a 403.

Any help or advice appreciated.

 

 

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 3, 2020

Hello @thomas.fregin !

As I understand, you need to read content from your Confluence Spaces via REST API but faces a 400 message when trying to do so.

However, it is not totally clear what you mean by “next site”. With this in mind, I would like to ask you a few questions:

  1. What is the REST API call that you are trying to use?
  2. What do you mean by “Next site”?
  3. Has this worked at some point?

Here is our documentation on REST API:

Let us hear from you!

thomas.fregin December 8, 2020

Hello @Diego 

The next link didnt work for me so far or better to say i cant use it in rest. If i try to call any of the links in the browser it works flawlessly. So i am trying to receive an answer on the following rest call for the space and pages:

ResponseEntity<String>contentJson=restTemplate.getForEntity(<the url of our page+the next link>,String.class);

using the next link as described here => https://developer.atlassian.com/server/confluence/pagination-in-the-rest-api/ 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events