How to get the content page details through rest api service for confluence in trail version?
Asked by karthick tgi:

Hi Team,

I am using the **free trail version for confluence.**

I create a multiple pages \& blogs.

I am trying to get the page details through http api service("[http://karthicksivan.atlassian.net/confluence/rest/api/content?type=page\&spaceKey=TECHGLOBAL\&title=Testingwithslack\&expand=space,body.view,version,container](http://karthicksivan.atlassian.net/confluence/rest/api/content?type=page&spaceKey=TECHGLOBAL&title=Testingwithslack&expand=space,body.view,version,container)").

Finally i got the **response details only in html page.** Refer the attachment in below the screenshot.

![confluence_api_service_response.png](/t5/image/serverpage/image-id/41436i15CAE9F1FED3087F/image-size/large?v=v2&px=999 "confluence_api_service_response.png")If you have any solutions., please do share..


Answers:
author: Shradha Singh
body: Hi,

I have a similar question, can we use Wiki REST API to get all pages which are created in last 24 hours in a given Space Key.

Please suggest.

Regards  
Shradha


author: David at David Simpson Apps
body: Hello,

It looks like the page you're getting is for Jira Service Desk rather than the Confluence REST endpoint - see the page title "**Service Desk**"

Try using this URL instead:

[https://karthicksivan.atlassian.net/wiki/rest/api/content?type=page\&spaceKey=TECHGLOBAL\&title=Testingwithslack\&expand=space,body.view,version,container](https://karthicksivan.atlassian.net/wiki/rest/api/content?type=page&spaceKey=TECHGLOBAL&title=Testingwithslack&expand=space,body.view,version,container)

I get the following which appears to be much more healthy considering I cannot authenticate against your site:

```
{"statusCode":403,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"Not permitted to use confluence"}
```

I've used Postman to do something very similar and get JSON returned:

![Screen Shot 2019-01-02 at 14.54.15.png](https://community.atlassian.com/t5/image/serverpage/image-id/41443i8FB8F1A17FF9880E/image-size/large?v=v2&px=999 "Screen Shot 2019-01-02 at 14.54.15.png")

Here's how it's represented as a CURL:

```
curl -X GET \
 'https://dvdsmpsn.atlassian.net/wiki/rest/api/content?type=page&title=Configuration&spaceKey=analytics&expand=space,body.view,version,container' \
 -H 'Authorization: Basic *******' \
 -H 'Content-Type: application/json' \
 -H 'Cache-Control: no-cache'
```

I've hidden my auth string, sorry ;)

Some things that I particularly notice:

1. You're using **/confluence/rest** rather than **/wiki/rest** in the URL. I'm not sure why that is.
2. I'm setting a **Content-Type** header
3. I'm using **Basic Auth** - I don't know what you're using for authentication

Also note, that this page is open access, so the REST API can be accessed at...

```
https://dvdsmpsn.atlassian.net/wiki/rest/api/content?type=page&title=Configuration&spaceKey=analytics&expand=space,body.view,version,container
```

...if you want to test things out.

comments: author: karthick tgi
body: thanks for your update [@David at David Simpson Apps](/t5/user/viewprofilepage/user-id/781462)


author: David at David Simpson Apps
body: [@karthick tgi](/t5/user/viewprofilepage/user-id/1221751) check the latest update above.


Tags: cloud

confluence-cloud