Questionnaire API¶
Questionnaires high-level API.
-
class
questionnaire_api.
QuestionnaireAPI
(sdk)¶ API for the Questionnaire entities.
For now, there are just two methods for getting one or many questionnaires (as others were not yet required, but might be implemented in the future).
Example usage:
api = QuestionnaireAPI(...) # Get one questionnaire by UUID q = api.get_questionnaire('some-uuid-1234') # Get page number 1 (each page having 10 questionnaires) of # questionnaires containing the "foo" string, sorted by the UUID # attribute in the ascending order qs = api.get_questionnaires(q='foo', page=1, size=10, sort='uuid,asc')
-
model_class
¶ alias of
dsw_sdk.high_level_api.models.questionnaire.Questionnaire
-
get_questionnaire
(uuid)¶ Retrieves one questionnaire, identified by it’s UUID. Also loading all of it’s related documents.
- Parameters
uuid (str) – universally unique identifier of the questionnaire
- Returns
object representing a questionnaire
- Return type
dsw_sdk.high_level_api.models.questionnaire.Questionnaire
-
get_questionnaires
(**query_params)¶ Retrieves list of questionnaires. Also loading all related documents.
- Parameters
query_params – optional query params
q
,size
,page
andsort
- Returns
list of objects, each representing a questionnaire
- Return type
List[dsw_sdk.high_level_api.models.questionnaire.Questionnaire]
-