[BETA] ReportElement Object

The following API calls are currently available for the report element object:

GET REPORT ELEMENT - Get information about a specified Standard Report element.

https://restapi.surveygizmo.com/v5/survey/[id]/reporting/[id]/reportelement/[id]
ParametersExampleRequired
Authentication Credentialsapi_token=5D685159B6964FB69B044D3E7D2676D1True

Get question report element response (.json format)

{ 
 "result_ok":true,
 "data_ready":true,
 "data_progress":100,
 "result":{ 
 "total":27,
 "values":[ 
 { 
 "sku":"10001",
 "count":10,
 "percent":37,
 "option_title":"Option 1",
 "rep_val":"Option 1",
 "special":false
 },
 { 
 "sku":"10002",
 "count":17,
 "percent":63,
 "option_title":"Option 2",
 "rep_val":"Option 2",
 "special":false
 }
 ],
 "stats":{ 
 "skipped":0
 }
 }
}

Get rscript report element response (.json format)

{ 
 "result_ok":true,
 "data_ready":true,
 "data_progress":100,
 "result":{ 
 "string_out":...your rscript output here,
 "charts":null,
 "node_out":"nothing neat",
 "node_err":""
 }
}

Get responsemetrics report element response (.json format)

{ 
 "result_ok":true,
 "data_ready":true,
 "data_progress":100,
 "result":{ 
 "values":{ 
 "complete":27,
 "total":27
 }
 }
}

CREATE REPORT ELEMENT - Create a new Standard Report element.

https://restapi.surveygizmo.com/v5/survey/[id]/reporting/[id]/reportelement?_method=PUT
ParametersExampleRequired
Authentication Credentialsapi_token=5D685159B6964FB69B044D3E7D2676D1True
options[type]responsemetrics, question, rscriptFalse
options[question][id]if options[type]=question
options[script_id][id]if options[type]=rscript

Response Example (.json format)

{ 
 "result_ok":true,
 "result":{ 
 "element_id":"5"
 }
}
{ 
 "result_ok":true,
 "result":{ 
 "element_id":"rscript_58af63c23ddc3"
 }
}
{ 
 "result_ok":true,
 "result":{ 
 "element_id":"responsemetrics_58af644e761ea"
 }
}

DELETE REPORT ELEMENT- Delete a specified Standard Report element.

https://restapi.surveygizmo.com/v5/survey/[id]/reporting/[id]/reportelement/[id]?_method=DELETE
ParametersExampleRequired
Authentication Credentialsapi_token=5D685159B6964FB69B044D3E7D2676D1True
{
"result_ok": true,
"status": "ok"
}