Get Form Report

POST https://restapi.actonsoftware.com/api/1/form/{form id}/report/

This endpoint allows you to pull a report on a specified form.

Parameters

Name Parameter
Type
Allow
Multiple
Required/
Optional
Data Type Description
Authorization: Header False Required String Insert your generated access token.
("Bearer {access token}")
formid Path False Required String Specify the ID of the form.

Response

{
  "count": 1,
  "result": [
    {
      "source": "Page:Exampletest",
      "submits": 4,
      "unique": 2,
      "views": 5,
      "percent": 80,
      "non_submitters": "1"
    }
  ]
}

Code Examples

cURLJavaComing Soon...

curl -X GET -H "Authorization: Bearer 6c0d2882-8a9e-34e9-a244-451b44925d09" -H "oftware.com/api/1/form/e8e1da5d-f55f-4506-997d-38bf14782726/report/

package content;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import util.Utility;

public class GetFormReport
{
	static String BASE_URL         = "https://restapi.actonsoftware.com/api/1/";

	public static void main(String[] args)
		{
				getForm();
				getFormReport();
		}
	public static void getForm(){
	try
		{
		String accessToken  = Utility.getAccessToken();
		Unirest.setHttpClient(Utility.makeClient());
		Unirest.setDefaultHeader("Authorization", "Bearer " + accessToken);
		HttpResponse jsonResponse = Unirest.get(BASE_URL + "form")
				.header("accept", "application/json")
				.asString();

		if(jsonResponse.getCode()==200){
			String jsonResponseBody = jsonResponse.getBody();
			System.out.println("The response body is : "+jsonResponseBody );
		}else {
			System.out.println("The response is : "+ jsonResponse);
		}

		}
	catch (UnirestException e)
		{
		e.printStackTrace();
		}

	}

	public static void getFormReport(){
	try
		{
		String accessToken  = Utility.getAccessToken();
		Unirest.setHttpClient(Utility.makeClient());
		String id = "";
		Unirest.setDefaultHeader("Authorization", "Bearer " +accessToken );
		HttpResponse jsonResponse = Unirest.get(BASE_URL + "form/"+id +"/report")
				.header("accept", "application/json")
				.asString();

		if(jsonResponse.getCode()==200){
			String jsonResponseBody = jsonResponse.getBody();
			System.out.println("The response body is : "+jsonResponseBody );
		}else {
			System.out.println("The response is : "+ jsonResponse);
		}

		}
	catch (UnirestException e)
		{
		e.printStackTrace();
		}
	}
}}

Coming Soon…