Forms 포털에서 제출된 양식을 사용하여 작업하는 API apis-to-work-with-submitted-forms-on-forms-portal
AEM Forms은 forms 포털을 통해 제출된 양식 데이터를 쿼리하는 데 사용할 수 있는 API를 제공합니다. 또한 이 문서에 설명된 API를 사용하여 제출된 양식의 속성을 게시하거나 주석을 달 수 있습니다.
NOTE
API를 호출할 사용자는 제출 검토자를 양식에 연결.
GET /content/forms/portal/submission.review.json?func=getFormsForSubmissionReview get-content-forms-portal-submission-review-json-func-getformsforsubmissionreview-br
모든 적합한 양식 목록을 반환합니다.
URL 매개 변수 url-parameters
이 API에는 추가 매개 변수가 필요하지 않습니다.
응답 response
응답 개체에는 양식 이름과 저장소 경로가 포함된 JSON 배열이 포함되어 있습니다. 응답의 구조는 다음과 같습니다.
[
{formName: "<form name>",
formPath: "<path to the form>" },
{.....},
......]
예 example
요청 URL
https://[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"}]
GET /content/forms/portal/submission.review.json?func=getAllSubmissions get-content-forms-portal-submission-review-json-func-getallsubmissions
제출된 모든 양식의 세부 정보를 반환합니다. 그러나 URL 매개 변수를 사용하여 결과를 제한할 수 있습니다.
URL 매개 변수 url-parameters-1
요청 URL에 다음 매개 변수를 지정합니다.
응답 response-1
응답 개체에는 지정된 양식의 세부 사항이 포함된 JSON 배열이 포함되어 있습니다. 응답의 구조는 다음과 같습니다.
{
total: "<total number of submissions>",
items: [{ formName: "<name of the form>", formPath: "<path to the form>", owner: "<owner of the form>"},
....]}
예 example-1
요청 URL
https://[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"}]}
POST /content/forms/portal/submission.review.json?func=addComment post-content-forms-portal-submission-review-json-func-addcomment-br
지정된 제출 인스턴스에 주석을 추가합니다.
URL 매개 변수 url-parameters-2
요청 URL에 다음 매개 변수를 지정합니다.
매개변수
설명
submitID
제출 인스턴스와 연결된 메타데이터 ID를 지정합니다.
Comment
지정한 제출 인스턴스에 추가할 주석에 대한 텍스트를 지정합니다.
응답 response-2
댓글을 성공적으로 게시할 때 댓글 ID를 반환합니다.
예 example-2
요청 URL
https://[host:[port]/content/forms/portal/submission.review.json?func=addComment&submitID=1403037413508500&comment=API+test+comment
응답
1403873422601300
GET /content/forms/portal/submission.review.json?func=getComments get-content-forms-portal-submission-review-json-func-getcomments-nbsp
지정된 제출 인스턴스에 게시된 모든 주석을 반환합니다.
URL 매개 변수 url-parameters-3
요청 URL에 다음 매개 변수를 지정합니다.
매개변수
설명
submitID
제출 인스턴스의 메타데이터 ID를 지정합니다.
응답 response-3
응답 개체에는 지정된 제출 ID와 연결된 모든 설명을 포함하는 JSON 배열이 포함되어 있습니다. 응답의 구조는 다음과 같습니다.
[{
owner: "<name of the commenter>",
comment: "<comment text>",
time: "<time when the comment was posted>"},
{ }......]
예 example-3
요청 URL
https://[host]:[port]/content/forms/portal/submission.review.json?func=getComments&submitID=1403037413508500
응답
[{"owner":"fr1","comment":"API test comment","time":1446726988250}]
POST /content/forms/portal/submission.review.json?func=updateSubmission post-content-forms-portal-submission-review-json-func-updatesubmission-br
지정된 제출된 양식 인스턴스의 지정된 속성 값을 업데이트합니다.
URL 매개 변수 url-parameters-4
요청 URL에 다음 매개 변수를 지정합니다.
매개변수
설명
submitID
제출 인스턴스와 연결된 메타데이터 ID를 지정합니다.
property
업데이트할 양식 속성을 지정합니다.
value
업데이트할 양식 속성의 값을 지정합니다.
응답 response-4
게시된 업데이트에 대한 정보가 있는 JSON 개체를 반환합니다.
예 example-4
요청 URL
https://[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"}
recommendation-more-help
a6ebf046-2b8b-4543-bd46-42a0d77792da