3

I have been trying to retrieve reports based on default report templates through REST API calls. But the fields returned for each report instance is not same as what it is supposed to according to a report instance's description.

Here is an example query in the API explorer,

Query to retrieve Constituent Summary report:

Query

Here is the result of the query:

query result

The default description of the Constituent Summary report is:

Provides a list of address and telephone information for constituent records in your system.

But as you see the result of the query, all the returned rows have only name, and there is no other option in the API explorer to specify fields to be returned.

Things I did to analyse/rectify my query's result it further:

  • Made sure that the report instance created in the UI has more than one column selected (that is, not only name but other fields like address, email etc.)
  • Deleted the default report instance and created by own in the UI based on the default report templates. But still, the API query returns only these specific fields (in image.)

The above behavior is true for all query against report: It returns only specific fields/columns irrespective of the column selected in the UI.

Please let me know how can I retrieve a report with all columns (as specified for a particular report in Reports tab)

1

If you choose a particular report id rather than a general template it should get the config from that report. I'm not sure if it picks up stuff from anywhere from the default templates (e.g first configured instance of that template).

You can pass in other parameters somewhat in line with the POST vars I believe

  • 1
    Thanks Eileen for responding! As far as I know, the only way to retrieve report is to query on the ReportTemplate entity which requires a report_id to be specified. So, in the example, I did specify a particular report_id, that is contact/summary. Could you please post an example query which retrieves a report through the rest API as expected (with all columns configured for a report in the UI)? – Mouna Annavarapu Jun 16 '16 at 6:19
0

A report id could be a number of a report instance as well a string representing a template

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.