Creating assignments using the R package (SurveySolutionsAPI)

I am trying to create assignments with pre-filled data from out existing data. I want to be able to do this through API.

I tried using the SurveySolutionsAPI package’s Suso_createASS() function:

suso_createASS(
  df = df,
  server = suso_get_api_key("susoServer"),
  apiUser = suso_get_api_key("susoUser"),
  apiPass = suso_get_api_key("susoPass"),
  workspace = "xxxx",
  QUID = "xxxxxxxx",
  version = 8
)

I get this error:

[1] "Pb06"
Error in suso_createASS(df = df, server = suso_get_api_key("susoServer"),  : 
  Bad Request (HTTP 400). Failed to Assignment creation failed.

Other functions in the package work just fine. What should I be looking for to correct this error?

Also, the data frame (df) doesn’t have the Quantity and ResponsibleName variables after running the function.

I changed the format of the preload data from data.table to data.frame as per the @param df dataframe with upload data in the package code`. The error I get has changed:

Error in `:=`(ResponsibleName, NULL) : 
  Check that is.data.table(DT) == TRUE. Otherwise, := and `:=`(...) are defined for use in j, once only and in particular ways. See help(":=").

@arthurshaw2002 would love to see this functionality implemented in your package too.