Case List and Case Data

Hi,

I am struggling with both of these API calls at present.

Case List
https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/?offset=0&limit=100&format=xml&type=xxxxx

Works fine but if I add closed=any or closed=true I get a very shortened
XML with no cases.
https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/?offset=0&limit=100&format=xml&type=xxxxx&
closed=any

Am I missing something or is there another way to get all open and closed
cases?

Case Data
https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/xxxxxxxxxxxxxxxxxxx/?format=xml&properties=all&indices=all
This gives me the case information but not the form information for the
case as shown here:
https://confluence.dimagi.com/display/commcarepublic/Case+Data

Again, am I missing something or is there another way to get the forms used
to submit the case? A little like the Case List > Case History report works?

Much Thanks in Advance

Tim

Sorry Updated the call to include the &xforms_by_name__full=true call :slight_smile:

··· On Monday, October 6, 2014 4:09:33 PM UTC+1, Tim Butler wrote: > > Hi, > > I am struggling with both of these API calls at present. > > Case List > > https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/?offset=0&limit=100&format=xml&type=xxxxx > > Works fine but if I add closed=any or closed=true I get a very shortened > XML with no cases. > > https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/?offset=0&limit=100&format=xml&type=xxxxx& > closed=any > > Am I missing something or is there another way to get all open and closed > cases? > > Case Data > > https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/xxxxxxxxxxxxxxxxxxx/?format=xml&properties=all&indices=all&xforms_by_name__full=true > This gives me the case information but not the form information for the > case as shown here: > https://confluence.dimagi.com/display/commcarepublic/Case+Data > > Again, am I missing something or is there another way to get the forms > used to submit the case? A little like the Case List > Case History report > works? > > Much Thanks in Advance > > Tim > > > > > > > > >

Hey,

The default result set should include all open and closed cases. Adding
closed=true or closed=false should split them out. ?closed=any is not
supported (and it looks like the API is treating that the same as
closed=true). Did you get that from somewhere in the docs? If so they
should be updated.

Cory

··· On Mon, Oct 6, 2014 at 11:20 AM, Tim Butler wrote:

Sorry Updated the call to include the &xforms_by_name__full=true call :slight_smile:

On Monday, October 6, 2014 4:09:33 PM UTC+1, Tim Butler wrote:

Hi,

I am struggling with both of these API calls at present.

Case List
https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/?offset=
0&limit=100&format=xml&type=xxxxx

Works fine but if I add closed=any or closed=true I get a very shortened
XML with no cases.
https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/?offset=
0&limit=100&format=xml&type=xxxxx&closed=any

Am I missing something or is there another way to get all open and closed
cases?

Case Data

https://www.commcarehq.org/a/xxxxxx/api/v0.4/case/xxxxxxxxxxxxxxxxxxx/?format=xml&properties=all&indices=all&xforms_by_name__full=true
This gives me the case information but not the form information for the
case as shown here: https://confluence.dimagi.com/
display/commcarepublic/Case+Data

Again, am I missing something or is there another way to get the forms
used to submit the case? A little like the Case List > Case History report
works?

Much Thanks in Advance

Tim

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Cory,

I tried both options, I will try again I'm the morning. The reference comes from the case list api docs.

Do you have a pointer on the case data api issue?

Much thanks in advance

Tim

Hi Cory,

Checked the two options. False gives a list of open cases with their data,
True gives a list of closed cases without their data or even their case
name to use as a link.

Is it possible to have true give the same data as false?

Best

Tim

··· On Monday, October 6, 2014 8:35:37 PM UTC+1, Tim Butler wrote: > > Hi Cory, > > I tried both options, I will try again I'm the morning. The reference > comes from the case list api docs. > > Do you have a pointer on the case data api issue? > > Much thanks in advance > > Tim > >

Hi Tim,

This appears to be a bug in the XML version of the APIs. I've entered it
into the system and assigned to our dev team and will update as soon as
it's addressed.

Is there a reason you're using the XML version of th APIs? Generally we've
found the JSON friendlier to work with (and the JSON version properly has
properties for closed cases in the interim).

thanks,
Cory

··· On Tue, Oct 7, 2014 at 4:24 AM, Tim Butler wrote:

Hi Cory,

Checked the two options. False gives a list of open cases with their data,
True gives a list of closed cases without their data or even their case
name to use as a link.

Is it possible to have true give the same data as false?

Best

Tim

On Monday, October 6, 2014 8:35:37 PM UTC+1, Tim Butler wrote:

Hi Cory,

I tried both options, I will try again I'm the morning. The reference
comes from the case list api docs.

Do you have a pointer on the case data api issue?

Much thanks in advance

Tim

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Cory,

Thanks for this - I can see that the JSON versions include the form data,
so we will need to use these instead of the current code.

Back to the drawing board :frowning:

Best

Tim

··· On Tuesday, October 7, 2014 3:52:09 PM UTC+1, Cory Zue wrote: > > Hi Tim, > > This appears to be a bug in the XML version of the APIs. I've entered it > into the system and assigned to our dev team and will update as soon as > it's addressed. > > Is there a reason you're using the XML version of th APIs? Generally we've > found the JSON friendlier to work with (and the JSON version properly has > properties for closed cases in the interim). > > thanks, > Cory > > On Tue, Oct 7, 2014 at 4:24 AM, Tim Butler <tim.bu...@gmail.com > wrote: > >> Hi Cory, >> >> Checked the two options. False gives a list of open cases with their >> data, True gives a list of closed cases without their data or even their >> case name to use as a link. >> >> Is it possible to have true give the same data as false? >> >> Best >> >> Tim >> >> On Monday, October 6, 2014 8:35:37 PM UTC+1, Tim Butler wrote: >>> >>> Hi Cory, >>> >>> I tried both options, I will try again I'm the morning. The reference >>> comes from the case list api docs. >>> >>> Do you have a pointer on the case data api issue? >>> >>> Much thanks in advance >>> >>> Tim >>> >>> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "CommCare Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-developers+unsubscribe@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hey Tim,

Sorry about that. Please do feel free to update the docs or suggest updates
wherever you've found something inconsistent.

Does this mean that it's no longer a priority to fix the closed case XML
representation?

thanks,
cory

··· On Tue, Oct 7, 2014 at 11:56 AM, Tim Butler wrote:

Hi Cory,

Thanks for this - I can see that the JSON versions include the form data,
so we will need to use these instead of the current code.

Back to the drawing board :frowning:

Best

Tim

On Tuesday, October 7, 2014 3:52:09 PM UTC+1, Cory Zue wrote:

Hi Tim,

This appears to be a bug in the XML version of the APIs. I've entered it
into the system and assigned to our dev team and will update as soon as
it's addressed.

Is there a reason you're using the XML version of th APIs? Generally
we've found the JSON friendlier to work with (and the JSON version properly
has properties for closed cases in the interim).

thanks,
Cory

On Tue, Oct 7, 2014 at 4:24 AM, Tim Butler tim.bu...@gmail.com wrote:

Hi Cory,

Checked the two options. False gives a list of open cases with their
data, True gives a list of closed cases without their data or even their
case name to use as a link.

Is it possible to have true give the same data as false?

Best

Tim

On Monday, October 6, 2014 8:35:37 PM UTC+1, Tim Butler wrote:

Hi Cory,

I tried both options, I will try again I'm the morning. The reference
comes from the case list api docs.

Do you have a pointer on the case data api issue?

Much thanks in advance

Tim

--


You received this message because you are subscribed to the Google
Groups "CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Cory,

I think having both options would be good.

We will rewrite our en, but I think having XML across the board is a good
thing.

Best

Tim

··· On Tuesday, October 7, 2014 5:04:38 PM UTC+1, Cory Zue wrote: > > Hey Tim, > > Sorry about that. Please do feel free to update the docs or suggest > updates wherever you've found something inconsistent. > > Does this mean that it's no longer a priority to fix the closed case XML > representation? > > thanks, > cory > > On Tue, Oct 7, 2014 at 11:56 AM, Tim Butler <tim.bu...@gmail.com > wrote: > >> Hi Cory, >> >> Thanks for this - I can see that the JSON versions include the form data, >> so we will need to use these instead of the current code. >> >> Back to the drawing board :( >> >> Best >> >> Tim >> >> >> On Tuesday, October 7, 2014 3:52:09 PM UTC+1, Cory Zue wrote: >>> >>> Hi Tim, >>> >>> This appears to be a bug in the XML version of the APIs. I've entered it >>> into the system and assigned to our dev team and will update as soon as >>> it's addressed. >>> >>> Is there a reason you're using the XML version of th APIs? Generally >>> we've found the JSON friendlier to work with (and the JSON version properly >>> has properties for closed cases in the interim). >>> >>> thanks, >>> Cory >>> >>> On Tue, Oct 7, 2014 at 4:24 AM, Tim Butler wrote: >>> >>>> Hi Cory, >>>> >>>> Checked the two options. False gives a list of open cases with their >>>> data, True gives a list of closed cases without their data or even their >>>> case name to use as a link. >>>> >>>> Is it possible to have true give the same data as false? >>>> >>>> Best >>>> >>>> Tim >>>> >>>> On Monday, October 6, 2014 8:35:37 PM UTC+1, Tim Butler wrote: >>>>> >>>>> Hi Cory, >>>>> >>>>> I tried both options, I will try again I'm the morning. The reference >>>>> comes from the case list api docs. >>>>> >>>>> Do you have a pointer on the case data api issue? >>>>> >>>>> Much thanks in advance >>>>> >>>>> Tim >>>>> >>>>> -- >>>> >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "CommCare Developers" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to commcare-developers+unsubscribe@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "CommCare Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-developers+unsubscribe@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >