transform

GETALL,RDA/GetFormInstancesArrayForFormId/{formId}

IN THIS PAGE

Arguments

formIdCharacter

FormId of the form definition

paginatedLogical

true/false - indicates if the results should be paginated.

pageSizeNumeric

number of records per page

pageNumberNumeric

page number for which data is returned

modeCharacter

detailed/summary - determines if form meta data and data or just form instanceId and date created are returned

resolveMediaFieldsLogical

determine if coded values for media fields are resolved to the actual URL on Amazon S3.

getRecordCountLogical

if true, count of number of records is returned

timestampCharacter

timestamp (format yyyy-mm-dd 0h:0m:0s). If blank all records are returned. If not blank only records > timestamp are returned. You can prefix with timestamp value with '>=' to return records greater or equal to the timestamp value

fieldlistCharacter

a list of the top level form fields that you want to return data from. if blank then data for all form fields are returned.

returnMediaFileListLogical

specify if an array of media files should be returned - only honored if 'resolveMediaFields' is not true.

getFormDefinitionLogical

specify if the form definition should also be returned

Returns

resultJSON Object

Returns an object with these properties:

errorboolean

true if there was an error

errorTextstring
hightimestring

date of the last update to any record in the array (format yyyy-dd-mm 0h:0m:0s)

recordCount

number of records (1 if not paginated and getRecordCount is false)

pageCount

number of pages of data (1 if not paginated)

resultarray
formid
forminstanceid
created

date when the form instance was created

timestamp

date when the form instance was last updated

Description

Get information (meta data and form data) for all form instances of the specified formId in the account associated with the API token.

CURL 

CURL --insecure -H "apikey:Your_api_key" -H "accept: application/json"  "https://transform.alphasoftware.com/transformAPIVersion1.a5svc/GetFormInstancesArrayForFormId/value_of_formId?paginated=value_of_paginated&pagesize=value_of_pagesize&pageNumber=value_of_pageNumber&mode=value_of_mode&resolveMediaFields=value_of_resolveMediaFields&getRecordCount=value_of_getRecordCount&timestamp=value_of_timestamp&fieldList=value_of_fieldList&returnMediaFileList=value_of_returnMediaFileList&getFormDefinition=value_of_getFormDefinition"

Node 

var https = require('https');
var options = {
  protocol: "https:",
  hostname: "transform.alphasoftware.com",
  path: "/transformAPIVersion1.a5svc/GetFormInstancesArrayForFormId/value_of_formId?paginated=value%5fof%5fpaginated&pagesize=value%5fof%5fpagesize&pageNumber=value%5fof%5fpageNumber&mode=value%5fof%5fmode&resolveMediaFields=value%5fof%5fresolveMediaFields&getRecordCount=value%5fof%5fgetRecordCount&timestamp=value%5fof%5ftimestamp&fieldList=value%5fof%5ffieldList&returnMediaFileList=value%5fof%5freturnMediaFileList&getFormDefinition=value%5fof%5fgetFormDefinition",
  headers: {apikey: "Your_api_key"}
};

https.get(options, (resp) => {
  let data = '';
  resp.on('data', (chunk) => {data += chunk;});
  resp.on('end', () => {console.log(data);});
}).on("error", (err) => {console.log("Error: " + err.message);});

Xbasic 

dim apikey as c = "Your_api_key"
dim postdata as c 
dim url as c = "/GetFormInstancesArrayForFormId/value_of_formId?paginated=value%5fof%5fpaginated&pagesize=value%5fof%5fpagesize&pageNumber=value%5fof%5fpageNumber&mode=value%5fof%5fmode&resolveMediaFields=value%5fof%5fresolveMediaFields&getRecordCount=value%5fof%5fgetRecordCount&timestamp=value%5fof%5ftimestamp&fieldList=value%5fof%5ffieldList&returnMediaFileList=value%5fof%5freturnMediaFileList&getFormDefinition=value%5fof%5fgetFormDefinition"
dim pr as p
pr = a5dialogHelper_transformAPIQuery(url,postdata,apikey)
if pr.error = .f. then
	dim result as c 
	result = pr.result
else
	dim errorText as c 
	errorText = pr.errorText
end if