ncoa / hapid_api_documentation

HAPID API Documentation
1 stars 0 forks source link

Not clear how to get the details and options of the questions. #1

Closed craigmcnamara closed 8 months ago

craigmcnamara commented 8 months ago

I've been trying to get the plain text of the questions and available options. The docs say to get the questions details by querying the epd_Question_to_Survey_Section__c resource, but doesn't seem to have the plain text or options.

I tried SELECT FIELDS(ALL) FROM Question__c LIMIT 200 to get the text of the questions, but I get the response:

sObject type 'Question__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

Could you expand the documentation to include examples that would show how to get question details for a survey and the corresponding answers?

djschlicht commented 8 months ago

Does this help?

select Question__r.Extended_Question__c, Question__r.Question_Type__c, Question__r.Picklist_Values__c
from epd_Question_to_Survey_Section__c

And I will bring up expanding the documentation with more examples, I think that's a good idea.

craigmcnamara commented 8 months ago

Hey @djschlicht thanks for responding. I did some exploring with describe and SELECT FIELDS(ALL). I was able to get the data I needed, but I'll use your query example to see if I can do the same things with fewer requests.

These docs are very helpful, but I'm definitely running in to things that require exploring to figure out. If you'd like I'm happy to keep filing issues as I run across them.

djschlicht commented 8 months ago

@craigmcnamara I'm glad you were able to find what you needed. Please keep filing issues as you come across them, so that we can make our documentation better.

I have started a dev branch and included metadata dumps for a lot of the custom objects, if you think that might be of use: https://github.com/djschlicht/hapid_api_documentation/tree/dev/metadata

craigmcnamara commented 8 months ago

That looks exactly like what I was looking for when was stuck.