Getting question id

How does one access the qnr_id in the susoapi package?

How to access QuestionnaireGuid in particular

There are a few ways. I’ve organized them below into two broad categories:

  1. Via the UI
  2. Via the API

Via the UI

The short version:

  • open a a questionnaire
  • strip out the questionnaire GUID component from the URL

The longer version

Option 1: Via surveys and statuses

Go to the surveys and statuses

Click on a survey and note the address in your browser’s address bar

Option 2: Via Survey Setup

Go to Survey Setup > Questionnaires

image

Click on a questionnaire and select Details

Note that the address in your browser’s address bar now has the questionnaire ID and the questionnaire version. The part before the $ is the questionnaire ID, the part after $ is the version number.

Via the API

Fetch the list of questionnaires. The data returned from this request will include what you need.

Here’s an example return from my testing server (gotten via susoapi::get_questionnaires())

2 Likes

Thank you! This has greatly helped!