Upload excel to generate fixtures via POST

Hi
Is there a way to upload an excel file via an API ? I’m trying to post to
the URL for uploading an excel file but it gives me a 403 Forbidden error.
I need to upload this file to generate fixtures.

Thanks
-Yash

Hi Yash,

What are the steps you’re taking to upload the file?

If you’re submitting to a url programmatically, which is a workflow we
don’t currently support very well, you will need to send your sessionid
cookie. Remember that uploading only adds new fixtures—it doesn’t delete or
replace what was there before. This is a known shortcoming of the system,
and we will eventually create better support for richer workflows.

If that didn’t make any sense, perhaps I misinterpreted your question, so
don’t hesitate ask again so I can answer you more fully.

Best,
Danny

··· 2012/12/27 yashseth

Hi
Is there a way to upload an excel file via an API ? I’m trying to post to
the URL for uploading an excel file but it gives me a 403 Forbidden error.
I need to upload this file to generate fixtures.

Thanks
-Yash

Hi Danny
You understood the question perfectly. I am trying to submit to a url
programmatically and I am currently also using sessionid and cookie. But it
it still gives me a Forbidden access. Just to be clear, this is the url I’m
posting to- https://www.commcarehq.org/a/
<project_name>/fixtures/item-lists/upload/
I have been able to successfully delete the objects using the same method
though.
Any help in this would be greatly appreciated.

Thanks
Yash

··· On Fri, Dec 28, 2012 at 12:14 AM, Daniel Roberts wrote:

Hi Yash,

What are the steps you’re taking to upload the file?

If you’re submitting to a url programmatically, which is a workflow we
don’t currently support very well, you will need to send your sessionid
cookie. Remember that uploading only adds new fixtures—it doesn’t delete or
replace what was there before. This is a known shortcoming of the system,
and we will eventually create better support for richer workflows.

If that didn’t make any sense, perhaps I misinterpreted your question, so
don’t hesitate ask again so I can answer you more fully.

Best,
Danny

2012/12/27 yashseth yash@digitalgreen.org

Hi
Is there a way to upload an excel file via an API ? I’m trying to post to
the URL for uploading an excel file but it gives me a 403 Forbidden error.
I need to upload this file to generate fixtures.

Thanks
-Yash

Hi Yash,

If your exact setup used to work and then started failing, it’s possible
that your sessionid has expired. Generally this method will not be as
robust as our supported APIs, through which we allow digest auth, but
unfortunately in this case you currently have no choice.

Let me know whether that fixes it.

Cheers,
Danny

··· 2012/12/27 Yash Seth

Hi Danny
You understood the question perfectly. I am trying to submit to a url
programmatically and I am currently also using sessionid and cookie. But it
it still gives me a Forbidden access. Just to be clear, this is the url I’m
posting to- https://www.commcarehq.org/a/
<project_name>/fixtures/item-lists/upload/
I have been able to successfully delete the objects using the same method
though.
Any help in this would be greatly appreciated.

Thanks
Yash

On Fri, Dec 28, 2012 at 12:14 AM, Daniel Roberts droberts@dimagi.comwrote:

Hi Yash,

What are the steps you’re taking to upload the file?

If you’re submitting to a url programmatically, which is a workflow we
don’t currently support very well, you will need to send your sessionid
cookie. Remember that uploading only adds new fixtures—it doesn’t delete or
replace what was there before. This is a known shortcoming of the system,
and we will eventually create better support for richer workflows.

If that didn’t make any sense, perhaps I misinterpreted your question, so
don’t hesitate ask again so I can answer you more fully.

Best,
Danny

2012/12/27 yashseth yash@digitalgreen.org

Hi
Is there a way to upload an excel file via an API ? I’m trying to post
to the URL for uploading an excel file but it gives me a 403 Forbidden
error.
I need to upload this file to generate fixtures.

Thanks
-Yash