[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=abcd12345&api_token_secret=abcd12345
True

Get question report element response (.json format)

At times, the data_ready parameter will return as false. This indicates that SurveyGizmo is still processing responses and as such all submitted data is not yet available. If this is the case, you will need to retry the call at a later time.

{
    "result_ok": true,
    "data_ready": true,
    "data_progress": 100,
    "result": {
        "total": 4,
        "values": [
            {
                "sku": "10011",
                "count": 3,
                "percent": 75,
                "option_title": "Male",
                "rep_val": "Male",
                "special": false
            },
            {
                "sku": "10012",
                "count": 1,
                "percent": 25,
                "option_title": "Female",
                "rep_val": "Female",
                "special": false
            }
        ],
        "stats": {
            "count": 4,
            "min": 0,
            "max": 0,
            "avg": 0,
            "sum": 0,
            "sum_of_squares": 0,
            "variance": 0,
            "std_deviation": 0,
            "std_deviation_bounds": {
                "upper": 0,
                "lower": 0
            },
            "skipped": 7
        }
    }
}

Get rscript report element response (.json format)

At times, the data_ready parameter will return as false. This indicates that SurveyGizmo is still processing responses and as such all submitted data is not yet available. If this is the case, you will need to retry the call at a later time.

{ 
 "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)

At times, the data_ready parameter will return as false. This indicates that SurveyGizmo is still processing responses and as such all submitted data is not yet available. If this is the case, you will need to retry the call at a later time.

{ 
 "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=abcd12345&api_token_secret=abcd12345
True
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=abcd12345&api_token_secret=abcd12345
True
{
"result_ok": true,
"status": "ok"
}