Vizualizați conținut de ajutor pentru versiunea:
AEM Forms provides APIs that you can use to query forms data submitted through forms portal. In addition, you can post comments or update properties of submitted forms using the APIs explained in this document.
Notă:
Users who will invoke the APIs must be added to the reviewers group as described in Associating submission reviewers to a form.
The response object contains a JSON array that includes forms names and their repository path. The structure of the response is as follows:
[
{formName: "<form name>",
formPath: "<path to the form>" },
{.....},
......]
http://[host]:[port]/content/forms/portal/submission.review.json?func=getFormsForSubmissionReview
[{"formPath":"/content/dam/formsanddocuments/forms-review/form2","formName":"form2"},{"formPath":"/content/dam/formsanddocuments/forms-review/form1","formName":"form1"}]
Parameter | Description |
---|---|
formPath | Specifies the CRX repository path where the form resides. If you do not specify the form path, it returns an empty response. |
offset (optional) |
Specifies the starting point in the index of the results set. The default value is 0. |
limit (optional) |
Limits the number of results. The default value is 30. |
orderby (optional) |
Specifies the property for sorting results. The default value is jcr:lastModified, which sorts results based on the last modified time. |
sort (optional) |
Specifies the order for sorting results. The default value is desc, which sorts results in descending order. You can specify asc to sort results in ascending order. |
cutPoints (optional) |
Specifies a comma-separated list of form properties to be included in results. The default properties are: formName, formPath, submitID, formType, jcr:lastModified, owner |
search (optional) |
Searches the specified value in form properties and returns forms with matching values. The default value is "". |
The response object contains a JSON array that includes details of the specified forms. The structure of the response is as follows:
{
total: "<total number of submissions>",
items: [{ formName: "<name of the form>", formPath: "<path to the form>", owner: "<owner of the form>"},
....]}
http://[host]:[port]/content/forms/portal/submission.review.json?func=getAllSubmissions&formPath=/content/dam/formsanddocuments/forms-review/form2
{"total":1,"items":[{"formName":"form2","formPath":"/content/dam/formsanddocuments/forms-review/form2","submitID":"1403037413508500","formType":"af","jcr:lastModified":"2015-11-05T17:52:32.243+05:30","owner":"admin"}]}
Parameter | Description |
---|---|
submitID | Specifies the metadata ID associated with a submission instance. |
Comment | Specifies the text for comment to add to the specified submission instance. |
http://[host:[port]/content/forms/portal/submission.review.json?func=addComment&submitID=1403037413508500&comment=API+test+comment
1403873422601300
The response object contains a JSON array that includes all comments associated with the specified submission ID. The structure of the response is as follows:
[{
owner: "<name of the commenter>",
comment: "<comment text>",
time: "<time when the comment was posted>"},
{ }......]
http://[host]:[port]/content/forms/portal/submission.review.json?func=getComments&submitID=1403037413508500
[{"owner":"fr1","comment":"API test comment","time":1446726988250}]
Parameter | Description |
---|---|
submitID | Specifies the metadata ID associated with a submission instance. |
property | Specifies the form property to be updated. |
value | Specifies the value of the form property to be updated. |
http://[host]:[port]/content/forms/portal/submission.review.json?func=updateSubmission&submitID=1403037413508500&value=sample_value&property=some_new_prop
{"formName":"form2","owner":"admin","jcr:lastModified":1446727516593,"path":"/content/forms/fp/admin/submit/metadata/1403037413508500.html","submitID":"1403037413508500","status":"submitted"}