The CreatorCon Call for Content is officially open! Get started here.

REST API - Create Survey

markwinap
Giga Contributor

Hi

Im unable to find how to create a survey on REST API. If im correct i understand that surveys are stored in table asmt_assessment_instance table and that responses are stored in smt_assessment_instance_question table.

My issues

  • Unable to POST parameter metric_type on table asmt_assessment
  • Unable to POST parameter assessment_group on table asmt_assessment_instance

So in other words the survey flow should look like this.(Create assessment_group ASG, create assessment instance AINST, then   create and fill the questions)

asmt_assessment   -> asmt_assessment_instance   -> asmt_assessment_instance_question  

Can someone point me to the right direction on how to create a survey using REST API please

3 REPLIES 3

markwinap
Giga Contributor

I forgot to mention that my goal is to create and fill a survey from REST API. For using and external survey system and publish the results in servicenow


DevMax
Kilo Contributor

Really late to this post, but I'm on the same journey and running into a similar issue.

I've gotten the same understanding you listed above as far as the process of completing a Risk Assessment via the API:

  1. Create the Risk Assessment Group (asmt_assessment)
  2. Create the Risk Assessment Instance (asmt_assessment_instance)
  3. Create the Risk Assessment Instance Questions (asmt_assessment_instance_question)
  4. Create the Risk Assessment Metric Results (asmt_metric_result)

But, you're correct, it looks like it's not possible to provide the metric_type when creating the asmt_assessment entity through the Table API.

 

Did you ever find a solution?

ahmed21
Kilo Expert

I have the same question