0

I wanted to use the 'List' and 'View' options in Cloudant to convert the JSON documents present in my view, to csv format. I have created the 'List' function for the same. After that, I tried to access/download the data in csv format, using [this URL][1].

https://8eb92b78-aca3-4bdf-bd96-a0482df2b60c-bluemix.cloudant.com/_design/submittedView/_list/first-format/submitted-view?include_docs=true

These are the details used in the URL :

Host name : 8eb92b78-aca3-4bdf-bd96-a0482df2b60c-bluemix.cloudant.com

Name of design document used : submittedView

Name of list used : first-format

Name of view : submitted-view

The error that I get when trying to access the data is as follows :

{"error":"forbidden","reason":"server_admin access is required for this request"}

Note : I generated an API key and gave it the following access.

  _admin  
  _reader    
  _writer   
  _replicator

However, I get the same error even when I try to access the URL with this API key. Please help me understand what I can do to resolve this issue. My primary objective is to download the data present in the Cloudant db, in CSV format. Any help or advice will be much appreciated!

The material used as reference to download the data in csv format, using 'List' and 'View' is at this link.

1 Answer 1

0

The problem is your URL isn't quite right you need to swap

https://8eb92b78-aca3-4bdf-bd96-a0482df2b60c-bluemix.cloudant.com/_design/submittedView/_list/first-format/submitted-view?include_docs=true

for

https://8eb92b78-aca3-4bdf-bd96-a0482df2b60c-bluemix.cloudant.com/DATABASE_NAME/_design/submittedView/_list/first-format/submitted-view?include_docs=true

where DATABASE_NAME is the name of the database where the data you need to export resides.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much for your response Glynn! I could download the data now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.