When you create a form in Sitecore, it works like an item and all its fields are the child items. Like this.
So I guess you will be able to get this using The RESTful API for the ItemService
You can use this to retrieve the children of Forms items like this.
/item/{id}/children?database&language&version&includeStandardTemplateFields&includeMetadata&fields
And for your next question where you want to export the data of forms, you can create a controller that will be inherited with ServicesApiController
and create a get method to get the data. The code will look like this.
ExportDataResult exportDataResult = this._exportDataProvider.Export(exportDataParameters.FormId, exportDataParameters.StartDate, exportDataParameters.EndDate);
string str;
if (exportDataResult == null)
{
httpResponseMessage1.StatusCode = HttpStatusCode.NoContent;
str = "nodata";
}
else if (string.IsNullOrEmpty(exportDataResult.Content))
{
httpResponseMessage1.StatusCode = HttpStatusCode.NoContent;
httpResponseMessage1.ReasonPhrase = Translate.Text("The date range is invalid. Please select a date range that is within the range of the list.");
str = "nodatainrange";
}
else
{
httpResponseMessage1.Content = (HttpContent) new StringContent(exportDataResult.Content);
httpResponseMessage1.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
httpResponseMessage1.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
{
FileName = exportDataResult.FileName
};
str = exportDataParameters.Token;
}
if (HttpContext.Current != null)
HttpContext.Current.Response.AppendCookie(new HttpCookie("fileDownloadToken" + exportDataParameters.Token, str));
}
For more details on this you may refer to this thread.
Get all the Sitecore Form's saved data in code
Hope this helps.