API を使用した Web ページ上のフォームの一覧表示 listing-forms-on-a-web-page-using-apis
AEM Formsは、Web 開発者が検索条件を満たす一連のフォームに対してクエリを実行し、取得する際に使用できる、REST ベースの検索 API を提供します。 API を使用して、様々なフィルターに基づいてフォームを検索できます。 応答オブジェクトには、フォームの属性、プロパティおよびフォームのレンダリングエンドポイントが含まれます。
REST API を使用してフォームを検索するには、以下に説明するクエリパラメーターを使用して、https://[server]:[port]/libs/fd/fm/content/manage.json
にあるサーバーに GET リクエストを送信します。
クエリパラメーター query-parameters
リクエストのサンプル sample-request
func : searchForms
appPath : /content/dam/formsanddocuments/MyApplication23
cutPoints : title|description|author|status|creationDate|lastModifiedDate|activationDate|expiryDate|tags|allowedRenderFormat|formmodel
relation : NO_RELATION
includeXdp : false
maxSize : 10
offset : 0
returnCount : true
statements: [{"name":"name","value":"*Claim.xdp","operator":"CONTAINS"},
{"name":"","value":"Expense","operator":"FULLTEXT"},
{"name":"description","value":"ABCD*","operator":"CONTAINS"},
{"name":"status","value":"false","operator":"EQ"},
{"name":"lastModifiedDate","value":"01/09/2013","operator":"GTEQ"},
{"name":"lastModifiedDate","value":"01/18/2013","operator":"LTEQ"}]
orderings:[{"name" :“lastModifiedDate“:”order”:”ASC”}]
レスポンスのサンプル sample-response
[
{"resultCount":2},
{"assetType":"FORM","name":"ExpenseClaim.xdp","id":"509fa2d5-e3c9-407b-b8dc-fa0ba08eb0ce",
"path":"/content/dam/formsanddocuments/MyApplication23/1.0/ExpenseClaim.xdp",
"title":"Expense Report","description":"ABCDEFGIJK","author":"Frank Bowman",
"tags":[],"formUrl":"/content/dam/formsanddocuments/MyApplication23/1.0/ExpenseClaim.xdp/jcr:content",
"pdfUrl":"/content/dam/formsanddocuments/MyApplication23/1.0/ExpenseClaim.xdp/jcr:content?type=pdf",
"references":[],"images":[{"assetType":"resource","name":"Image.gif","id":"5477a127-8bbf-4cec-8f81-2689e5cb4a15",
"path":"/content/dam/formsanddocuments/MyApplication23/1.0/Image.gif","resourceSize":0}],
"status":false,"creationDate":1358429845623,"lastModifiedDate":1358429846771},
{"assetType":"FORM","name":"ExpenseClaim.xdp","id":"4312239b-b666-4d36-95bc-641b3a39ddd4",
"path":"/content/dam/formsanddocuments/MyApplication23/ExpenseClaim.xdp",
"title":"Expense Report","description":"ABCDefghijklm","author":"Frank Bowman",
"tags":[],"formUrl":"/content/dam/formsanddocuments/MyApplication23/ExpenseClaim.xdp/jcr:content",
"pdfUrl":"/content/dam/formsanddocuments/MyApplication23/ExpenseClaim.xdp/jcr:content?type=pdf",
"references":[],"images":[{"assetType":"resource","name":"Image.gif","id":"118a2e3f-7097-4d8c-85d1-651306de284a",
"path":"/content/dam/formsanddocuments/MyApplication23/Image.gif","resourceSize":0}],"status":false,
"creationDate":1358429856690,"lastModifiedDate":1358430109023}
]
関連記事
recommendation-more-help
a6ebf046-2b8b-4543-bd46-42a0d77792da