Parameter List
uuid
: Device unique IDclientVersion
: Client versionUsage Example
<script> $.getJSON('${site.dynamicPath}api/appClient?uuid=1&clientVersion=1.0&appToken=Interface access authorization Token', function(data){ }); </script>
Parameter List
appKey
: Application keyappSecret
: Application secretReturn Result
appToken
: Interface access authorization TokenexpiryDate
: Expiration dateerror
: Error message, returns "secretError" when appKey or appSecret is empty or incorrectUsage Example
<script> $.getJSON('${site.dynamicPath}api/appToken?appKey=1&appSecret=1', function(data){ $('article p em').text(data.clicks); }); </script>
Parameter List
uuid
: Device unique IDusername
: Usernamechannel
: Login channelReturn Result
result
: Login result, ["true","false"]authToken
: User login authorizationexpiryDate
: Expiration dateuser
: User information
id
: IDname
: UsernameweakPassword
: Weak passwordnickname
: Nicknamecover
: Cover imagedeptId
: Department IDcontentPermissions
: Content permissions (0:self,1:all,2:dept)roles
: Role IDsemail
: Email addressemailChecked
: Verified emailsuperuser
: Administratordisabled
: DisabledlastLoginDate
: Last login datelastLoginIp
: Last login IPloginCount
: Login countregisteredDate
: Registration dateupdateDate
: Update dateUsage Example
<script> $.getJSON('${site.dynamicPath}api/autoLogin?uuid=1&username=admin&channel=web', function(data){ console.log(result+","+authToken+","+user.nickname+","+expiryDate); }); </script>
Parameter List
uuid
: Device unique IDchannel
: Client versionReturn Result
result
: Binding resultUsage Example
<script> $.getJSON('${site.dynamicPath}api/bindingUser?uuid=1&channel=web&authToken=User login authorization&authUserId=1', function(data){ console.log(data.result); }); </script>
Usage Example
<script> $.getJSON('${site.dynamicPath}api/clearCache&appToken=Interface access authorization Token', function(data){ console.log("ok"); }); </script>
Parameter List
ids
: Multiple content IDsuncheck
: Cancel review, ["true","false"], default is false
Return Result
Usage Example
<script> $.getJSON('${site.dynamicPath!}api/contentCheck?ids=1,2&authToken=User login authorization&authUserId=1&appToken=Interface access authorization Token', function(data){ }); </script>
Parameter List
id
: Content IDReturn Result
clicks
: Content click countUsage Example
<script> $.getJSON('${site.dynamicPath}api/contentClick?id=1', function(data){ console.log(data.clicks); }); </script>
Parameter List
id
: Content ID, creates new content when emptycategoryId
: Category IDmodelId
: Model IDtitle
: Titledescription
: Descriptionauthor
: Authoreditor
: Editorcopied
: Repost, ["true","false"], default is false
publishDate
: Publish date, defaults to current datetagNames
: Multiple tag namestagIds
: Multiple tag IDsurl
: URL, valid when model is external linkchecked
: Reviewed, ["true","false"], default is false
extendData
: Extended data mapsource
: SourcesourceUrl
: Source URLtext
: Main text HTMLdraft
: Draft, valid when checked is false
, ["true","false"], default is false
parentId
: Parent ID, valid when model is child modelfilePaths
: Multiple file pathsfileDescriptions
: Multiple file descriptionsimagePaths
: Multiple image pathsimageDescriptions
: Multiple image descriptionsReturn Result
result
: Result ["failed","success"]contentId
: Content ID, valid when result is "success"error
: Error, valid when result is "failed"Usage Example
<script> $.getJSON('${site.dynamicPath!}api/contentCreate?categoryId=1&modelId=article&title=title&text=%3Cdiv%3Econtent%3C/div%3E&extendData.field1=value1&extendData.field2=value2&authToken=User login authorization&authUserId=1&appToken=Interface access authorization Token', function(data){ console.log(data.result); }); </script>
Parameter List
username
: Device unique IDpassword
: Usernameencoding
: Password encryption methodchannel
: Login channelReturn Result
result
: Login result, ["true","false"]authToken
: User login authorizationexpiryDate
: Expiration dateuser
: User information
id
: IDname
: UsernameweakPassword
: Weak passwordnickname
: Nicknamecover
: Cover imagedeptId
: Department IDcontentPermissions
: Content permissions (0:self,1:all,2:dept)roles
: Role IDsemail
: Email addressemailChecked
: Verified emailsuperuser
: Administratordisabled
: DisabledlastLoginDate
: Last login datelastLoginIp
: Last login IPloginCount
: Login countregisteredDate
: Registration dateupdateDate
: Update dateUsage Example
<script> $.getJSON('${site.dynamicPath}api/login?username=admin&password=sha512encodingpassword&encoding=sha512&channel=web', function(data){ console.log(result+","+authToken+","+user.nickname+","+expiryDate); }); </script>
Parameter List
categoryId
: Category ID, effective when parentId is emptycontainChild
: Whether to include child categories, 【true, false】categoryIds
: Multiple category IDs, effective when categoryId is emptymodelId
: Multiple model IDsparentId
: Parent content IDonlyUrl
: External link, 【true, false】hasImages
: Has image list, 【true, false】hasFiles
: Has attachment list, 【true, false】hasProducts
: Has product list, 【true, false】startPublishDate
: Start publish date, 【2020-01-01 23:59:59】, 【2020-01-01】endPublishDate
: End publish date, cannot exceed the current time when advanced options are disabled, 【2020-01-01 23:59:59】, 【2020-01-01】status
: Content status, 【0: Draft, 1: Published, 2: Pending, 3: Rejected】emptyParent
: Advanced option: Whether the parent content ID is empty, 【true, false】, effective when parentId is emptyorderField
: Sorting field, 【score: Rating, comments: Comment count, clicks: Click count, publishDate: Publish date, updateDate: Update date, checkDate: Review date】, defaults to top-level descending order, publish date sorted by orderTypeorderType
: Sorting type, 【asc: Ascending, desc: Descending】, defaults to descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDtitle
: TitleuserId
: User ID of the publisherdeptId
: Department ID of the publishercheckUserId
: Reviewer user IDcategoryId
: Category IDmodelId
: Model IDparentId
: Parent content IDquoteContentId
: Quoted content IDcopied
: Repostedauthor
: Authoreditor
: EditoronlyUrl
: External linkhasImages
: Has image listhasFiles
: Has attachment listhasProducts
: Has product listhasStatic
: Staticizedurl
: Link addressdescription
: DescriptiontagIds
: Multiple tag IDscover
: Cover imagechilds
: Number of child contentsscores
: Total scoresscoreUsers
: Number of users who ratedscore
: Scorecomments
: Comment countclicks
: Click countcollections
: Collection countpublishDate
: Publish dateexpiryDate
: Expiry datecheckDate
: Review dateupdateUserId
: User ID of the updaterupdateDate
: Update datecreateDate
: Creation datesort
: Top-level prioritystatus
: Status (0: Draft, 1: Published, 2: Pending, 3: Rejected)Usage Example
<script> $.getJSON('${site.dynamicPath!}api/myContentList?pageSize=10&authToken=User login authorization&authUserId=1', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
appToken
: Device unique IDReturn Result
authToken
: User login authorizationexpiryDate
: Expiry dateerror
: Error message 【needNotRefresh】Usage Example
<script> $.getJSON('${site.dynamicPath}api/login?appToken=Interface access authorization Token', function(data){ console.log(appToken+","+expiryDate); }); </script>
Parameter List
uuid
: Device unique IDchannel
: Client versionReturn Result
result
: Unbinding resultUsage Example
<script> $.getJSON('${site.dynamicPath}api/unBindingUser?uuid=1&channel=web&authToken=User login authorization&authUserId=1', function(data){ console.log(data.result); }); </script>
Authentication Headers
appToken
: Application authorization TokenauthToken
: User login TokenauthUserId
: User IDParameter List
file
: Filebase64File
: Base64 encoded string of the file, effective when the file is emptyoriginalFilename
: Original filename, required when uploading via base64privatefile
: Whether the file is privateReturn Result
result
: Upload result, 【true, false】error
: Error reason codefileName
: File pathfileType
: File typefileSize
: File sizeUsage Example
<script> $('input[type=file]').change(function() { var formData = new FormData(); var file = this.files[0]; formData.append('file', file); $.ajax({url:'${site.dynamicPath}api/upload',type:'post',headers: {'appToken': 'your app token','':'','':''},data: formData,, success:function(data){ console.log(result+","+error+","+fileName); }); }); </script>
Parameter List
id
: Category ID, returns object
id
: IDname
: NameparentId
: Parent IDtypeId
: Category type IDchildIds
: Child category IDstagTypeIds
: Tag type IDscode
: CodecustomPath
: Custom access pathonlyUrl
: External linkhasStatic
: Has static fileurl
: Link addresscustomContentPath
: Custom content access pathcontainChild
: Include child category contentpageSize
: Content page sizeallowContribute
: Allow contributionssort
: Sorthidden
: Hidden on frontendworkflowId
: Workflowcode
: Category code, effective when ID is empty, returns object
absoluteURL
: Process URL as absolute path, defaults to true
containsAttribute
: Defaults to false
, when true, object.attribute
is category extended data map
(field code, value
)ids
: Multiple category IDs, comma or space separated, effective when ID or code is empty, returns map
(ID, object
)Usage Example
<@cms.category id=1>${object.name}</@cms.category>
<@cms.category ids=1,2,3><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.category>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/category?id=1', function(data){ console.log(data.name); }); </script>
Parameter List
parentId
: Parent category IDtypeId
: Category type IDabsoluteURL
: Process URL as absolute path, defaults to true
queryAll
: Query all, 【true, false】, effective when parentId is emptyadvanced
: Enable advanced options, defaults to false
containsAttribute
: Defaults to true
, when true, category.attribute
is category extended data map
(field code, value
)disabled
: Advanced option: Disabled status, defaults to false
hidden
: Advanced option: Hidden, 【true, false】pageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list, sorted by ID in descending order
id
: IDname
: NameparentId
: Parent IDtypeId
: Category type IDchildIds
: Child category IDstagTypeIds
: Tag type IDscode
: CodecustomPath
: Custom access pathonlyUrl
: External linkhasStatic
: Has static fileurl
: Link addresscustomContentPath
: Custom content access pathcontainChild
: Include child category contentpageSize
: Content page sizeallowContribute
: Allow contributionssort
: Sorthidden
: Hidden on frontendworkflowId
: WorkflowUsage Example
<@cms.categoryList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.categoryList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/categoryList?pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
categoryId
: Category ID, returns object
id
: IDcustomContentPath
: Custom content access pathtemplatePath
: Template pathcontentPath
: Content pathmodelId
: Content model ID, effective when ID is empty, returns object
modelIds
: Multiple content model IDs, effective when categoryId exists and modelId is empty, returns map
(content model ID, object
)categoryIds
: Multiple category IDs, effective when categoryId does not exist and modelId exists, returns map
(category ID, object
)Usage Example
<@cms.categoryModel categoryId=1 modelId='article'>${object.templatePath}</@cms.categoryModel>
<@cms.categoryModel categoryIds=1,2,3 modelId='article'><#list map as k,v>${k}:${v.templatePath}<#sep>,</#list></@cms.categoryModel>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/categoryModel?categoryId=1&modelId=article', function(data){ console.log(data.templatePath); }); </script>
Parameter List
modelId
: Content model IDcategoryId
: Category IDReturn Result
list
: List type, query result entity list
id
: IDcustomContentPath
: Custom content access pathtemplatePath
: Template pathcontentPath
: Content pathUsage Example
<@cms.categoryModelList modelId='article'><#list list as a>${a.templatePath}<#sep>,</#list></@cms.categoryModelList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/categoryModelList?modelId=article', function(data){ console.log(data[0].totalCount); }); </script>
Parameter List
id
: Category ID, returns object
id
: IDname
: NameonlyUrl
: External linksort
: SorttemplatePath
: Static template pathpath
: Access pathcontainChild
: Include child category contentpageSize
: Page sizeextendList
: Extended field listids
: Multiple category IDs, comma or space separated, effective when ID or code is empty, returns map
(ID, object
)Usage Example
<@cms.categoryType id=1>${object.name}</@cms.categoryType>
<@cms.categoryType ids=1,2,3><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.categoryType>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/categoryType?id=banner', function(data){ console.log(data.name); }); </script>
No parameters available for query, this directive returns all results by default, no pagination
Return Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDname
: NameonlyUrl
: External linksort
: SorttemplatePath
: Static template pathpath
: Access pathcontainChild
: Include child category contentpageSize
: Page sizeextendList
: Extended field listUsage Example
<@cms.categoryTypeList><#list page.list as a>${a.name}<#sep>,</#list></@cms.categoryTypeList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/categoryTypeList', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
replaceSensitive
: Replace sensitive words, defaults to true
id
: Comment ID, returns object
id
: IDuserId
: User ID of the publisherreplyId
: Reply comment IDreplyUserId
: Reply user IDreplies
: Number of repliesscores
: ScorescontentId
: Content IDip
: IPcheckUserId
: Reviewer usercheckDate
: Review dateupdateDate
: Update datecreateDate
: Creation datestatus
: Status (1: Published, 2: Pending)ids
: Multiple comment IDs, comma or space separated, effective when ID is empty, returns map
(ID, object
)Usage Example
<@cms.comment id=1>${object.text}</@cms.comment>
<@cms.comment ids=1,2,3><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.comment>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/comment?id=1&appToken=Interface access authorization Token', function(data){ console.log(data.text); }); </script>
Parameter List
userId
: User ID of the comment publisherreplyId
: Reply comment IDcontentId
: Content IDemptyReply
: Whether reply ID is empty, effective when replyId is empty, defaults to false
replyUserId
: Reply user IDreplaceSensitive
: Replace sensitive words, defaults to true
advanced
: Enable advanced options, defaults to false
status
: Advanced option: Comment status, 【1: Published, 2: Pending】checkUserId
: Advanced option: Reviewer user IDdisabled
: Advanced option: Comment deleted, 【true, false】orderField
: Sorting field, 【replies: Reply count, scores: Rating, checkDate: Review date, updateDate: Update date, createDate: Creation date】, defaults to top-level ID sorted by orderTypeorderType
: Sorting type, 【asc: Ascending, desc: Descending】, defaults to descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDuserId
: User ID of the publisherreplyId
: Reply comment IDreplyUserId
: Reply user IDreplies
: Number of repliesscores
: ScorescontentId
: Content IDip
: IPcheckUserId
: Reviewer usercheckDate
: Review dateupdateDate
: Update datecreateDate
: Creation datestatus
: Status (1: Published, 2: Pending)Usage Example
<@cms.commentList contentId=1 pageSize=10><#list page.list as a>${a.text}<#sep>,</#list></@cms.commentList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/commentList?contentId=1&pageSize=10&appToken=Interface access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
Content ID, returns object
id
: IDtitle
: TitleuserId
: User ID (Publisher)deptId
: Department ID (Publisher)checkUserId
: Reviewer User IDcategoryId
: Category IDmodelId
: Model IDparentId
: Parent Content IDquoteContentId
: Quoted Content IDcopied
: Copied (Repost)author
: Authoreditor
: EditoronlyUrl
: External LinkhasImages
: Has Image ListhasFiles
: Has Attachment ListhasProducts
: Has Product ListhasStatic
: Staticizedurl
: URLdescription
: DescriptiontagIds
: Tag IDs (Multiple)cover
: Cover Imagechilds
: Child Content Countscores
: Total ScoresscoreUsers
: Score User Countscore
: Scorecomments
: Comment Countclicks
: Click Countcollections
: Collection CountpublishDate
: Publish DateexpiryDate
: Expiry DatecheckDate
: Review DateupdateUserId
: Update User IDupdateDate
: Update DatecreateDate
: Creation Datesort
: Top Level (Sticky)status
: Status (0:Draft,1:Published,2:Pending,3:Rejected)absoluteURL
: Convert URL to absolute path. Default is true
absoluteId
: Convert ID to referenced content ID. Default is true
containsAttribute
: Default is false
. For HTTP requests, when true, object.attribute
is the content extended data map
(field code, value
)ids
: Multiple content IDs, separated by commas or spaces. Takes effect when ID is empty. Returns map
(ID, object
)Usage Example
<@cms.content id=1>${object.title}</@cms.content>
<@cms.content ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.content>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/content?id=1', function(data){ console.log(data.title); }); </script>
Parameter List
fileTypes
: File types, 【image: Image, video: Video, audio: Audio, other: Other】image
: Whether it is an image. Takes effect when fileTypes is empty, 【true, false】contentId
: Content IDuserId
: User IDabsoluteURL
: Convert URL to absolute path. Default is true
orderField
: Sorting field, 【size: File size, clicks: Click count】. Default is ascending order by ID.orderType
: Sorting type, 【asc: Ascending, desc: Descending】. Default is descending.pageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting positionpageIndex
: Current pagetotalPage
: Total pageslist
: Result listpage.list
: List type, query result entity list
id
: IDcontentId
: Content IDuserId
: Upload User IDfilepath
: File PathfileType
: File TypefileSize
: File Sizewidth
: Widthheight
: Heightclicks
: Clickssort
: Sortdescription
: DescriptionUsage Example
<@cms.contentFileList contentId=1 pageSize=10><#list page.list as a>${a.filePath}<#sep>,</#list></@cms.contentFileList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/contentFileList?contentId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
categoryId
: Category ID. Takes effect when parentId is empty.containChild
: Include child categories, 【true, false】categoryIds
: Multiple category IDs. Takes effect when categoryId is empty.modelId
: Multiple model IDsparentId
: Parent content IDonlyUrl
: External link, 【true, false】hasImages
: Has image list, 【true, false】hasFiles
: Has attachment list, 【true, false】hasProducts
: Has product list, 【true, false】hasCover
: Has cover image, 【true, false】userId
: Publisher user IDstartPublishDate
: Start publish date, 【2020-01-01 23:59:59】, 【2020-01-01】endPublishDate
: End publish date. Cannot exceed current time when advanced options are disabled, 【2020-01-01 23:59:59】, 【2020-01-01】advanced
: Enable advanced options. Default is false
status
: Advanced option: Content status, 【0: Draft, 1: Published, 2: Pending, 3: Rejected】disabled
: Advanced option: Disabled status. Default is false
emptyParent
: Advanced option: Whether parent content ID is empty, 【true, false】. Takes effect when parentId is empty.title
: Advanced option: TitleabsoluteURL
: Convert URL to absolute path. Default is true
absoluteId
: Convert ID to referenced content ID. Default is true
containsAttribute
: Default is false
. For HTTP requests, when true, content.attribute
is the content extended data map
(field code, value
)orderField
: Sorting field, 【score: Score, comments: Comment count, clicks: Click count, collections: Collection count, publishDate: Publish date, updateDate: Update date, checkDate: Review date】. Default is descending by sticky level and publish date.orderType
: Sorting type, 【asc: Ascending, desc: Descending】. Default is descending.firstResult
: Starting position, starting from 1pageIndex
: Page number. Takes effect when firstResult is not provided.pageSize
: Items per pagemaxResults
: Maximum results countReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting positionpageIndex
: Current pagetotalPage
: Total pageslist
: Result listpage.list
: List type, query result entity list
id
: IDtitle
: TitleuserId
: User ID (Publisher)deptId
: Department ID (Publisher)checkUserId
: Reviewer User IDcategoryId
: Category IDmodelId
: Model IDparentId
: Parent Content IDquoteContentId
: Quoted Content IDcopied
: Copied (Repost)author
: Authoreditor
: EditoronlyUrl
: External LinkhasImages
: Has Image ListhasFiles
: Has Attachment ListhasProducts
: Has Product ListhasStatic
: Staticizedurl
: URLdescription
: DescriptiontagIds
: Tag IDs (Multiple)cover
: Cover Imagechilds
: Child Content Countscores
: Total ScoresscoreUsers
: Score User Countscore
: Scorecomments
: Comment Countclicks
: Click Countcollections
: Collection CountpublishDate
: Publish DateexpiryDate
: Expiry DatecheckDate
: Review DateupdateUserId
: Update User IDupdateDate
: Update DatecreateDate
: Creation Datesort
: Top Level (Sticky)status
: Status (0:Draft,1:Published,2:Pending,3:Rejected)<@cms.contentList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/contentList?pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Content ID, returns object
id
: IDcontentId
: ContentuserId
: Upload User IDcover
: Covertitle
: Titleprice
: PriceminQuantity
: Minimum QuantitymaxQuantity
: Maximum Quantityinventory
: Inventorysales
: SalesabsoluteURL
: Convert cover to absolute path. Default is true
ids
: Multiple content IDs, separated by commas or spaces. Takes effect when ID is empty. Returns map
(ID, object
)Usage Example
<@cms.contentProduct id=1>${object.title}</@cms.contentProduct>
<@cms.contentProduct ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.contentProduct>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/contentProduct?id=1', function(data){ console.log(data.title); }); </script>
Parameter List
contentId
: Content IDuserId
: Product publisher user IDtitle
: TitlestartPrice
: Start priceendPrice
: End priceabsoluteURL
: Convert cover to absolute path. Default is true
orderField
: Sorting field, 【price: Price, inventory: Stock, sales: Sales volume】. Default is ID sorted by orderType.orderType
: Sorting type, 【asc: Ascending, desc: Descending】. Default is descending.pageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting positionpageIndex
: Current pagetotalPage
: Total pageslist
: Result listpage.list
: List type, query result entity list
id
: IDcontentId
: ContentuserId
: Upload User IDcover
: Covertitle
: Titleprice
: PriceminQuantity
: Minimum QuantitymaxQuantity
: Maximum Quantityinventory
: Inventorysales
: SalesUsage Example
<@cms.contentProductList contentId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentProductList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/contentProductList?contentId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
quoteId
: Quoted content IDReturn Result
list
: List type, query result entity list
id
: IDtitle
: TitleuserId
: User ID (Publisher)deptId
: Department ID (Publisher)checkUserId
: Reviewer User IDcategoryId
: Category IDmodelId
: Model IDparentId
: Parent Content IDquoteContentId
: Quoted Content IDcopied
: Copied (Repost)author
: Authoreditor
: EditoronlyUrl
: External LinkhasImages
: Has Image ListhasFiles
: Has Attachment ListhasProducts
: Has Product ListhasStatic
: Staticizedurl
: URLdescription
: DescriptiontagIds
: Tag IDs (Multiple)cover
: Cover Imagechilds
: Child Content Countscores
: Total ScoresscoreUsers
: Score User Countscore
: Scorecomments
: Comment Countclicks
: Click Countcollections
: Collection CountpublishDate
: Publish DateexpiryDate
: Expiry DatecheckDate
: Review DateupdateUserId
: Update User IDupdateDate
: Update DatecreateDate
: Creation Datesort
: Top Level (Sticky)status
: Status (0:Draft,1:Published,2:Pending,3:Rejected)Usage Example
<@cms.contentQuoteList contentId=1 pageSize=10><#list list as a>${a.title}<#sep>,</#list></@cms.contentQuoteList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/contentQuoteList?contentId=1', function(data){ console.log(data); }); </script>
Parameter List
contentId
: Content IDrelatedContentId
: Recommended content IDrelationType
: Relation typerelation
: RelationorderField
: Sorting field, 【clicks: Click count】. Default is ascending by ID.orderType
: Sorting type, 【asc: Ascending, desc: Descending】. Default is descending.pageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting positionpageIndex
: Current pagetotalPage
: Total pageslist
: Result listpage.list
: List type, query result entity list
id
: IDcontentId
: Content IDrelationType
: Relation typerelation
: RelationrelatedContentId
: Recommended content IDuserId
: Recommended user IDurl
: URLtitle
: Titledescription
: Descriptionsort
: SortingUsage Example
<@cms.contentRelatedList contentId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentRelatedList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/contentRelatedList?contentId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Value, returns object
name
: NamechildDepth
: Child depthids
: Multiple values, separated by commas or spaces. Takes effect when ID is empty. Returns map
(ID, object
)Usage Example
<@cms.dictionary id='data'>${object.name}</@cms.dictionary>
<@cms.dictionary values='data,data2'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.dictionary>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/dictionary?dictionaryId=data&value=1', function(data){ console.log(data.name); }); </script>
Parameter List
dictionaryId
: Data dictionary IDvalue
: Value, returns object
parentValue
: Parent valuetext
: Textsort
: Sortvalues
: Multiple values, separated by commas or spaces. Takes effect when value is empty. Returns map
(ID, object
)Usage Example
<@cms.dictionaryData dictionaryId='data' value='1'>${object.text}</@cms.dictionaryData>
<@cms.dictionaryData dictionaryId values='1,2,3'><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.dictionaryData>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryData?dictionaryId=data&value=1', function(data){ console.log(data.text); }); </script>
Parameter List
dictionaryId
: Dictionary ID. Returns empty result if empty.parentValue
: Parent node valueReturn Result
list
: List type, query result entity list
parentValue
: Parent valuetext
: Textsort
: SortUsage Example
<@cms.dictionaryDataList dictionaryId='data'><#list list as a>${a.text}<#sep>,</#list></@cms.dictionaryDataList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryDataList?dictionaryId=1&parentValue=text', function(data){ console.log(data); }); </script>
Parameter List
dictionaryId
: Data dictionary IDexcludeDictionaryId
: Excluded dictionary, returns object
excludeDictionaryIds
: Multiple excluded dictionaries, separated by commas or spaces. Takes effect when excludeDictionaryId is empty. Returns map
(id, object
)Usage Example
<@cms.dictionaryExclude dictionaryId='data' excludeDictionaryId='data1'>${object.id.excludeDictionaryId}</@cms.dictionaryExclude>
<@cms.dictionaryExclude dictionaryId='data' excludeDictionaryIds='data1,data2'><#list map as k,v>${k}:${v.id.excludeDictionaryId}<#sep>,</#list></@cms.dictionaryExclude>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExclude?dictionaryId=data&value=1', function(data){ console.log(data.id.excludeDictionaryId); }); </script>
Parameter List
dictionaryId
: Dictionary IDexcludeDictionaryId
: Excluded data dictionary IDReturn Result
list
: List type, query result entity list
Usage Example
<@cms.dictionaryExcludeList dictionaryId='data'><#list list as a>${a.id.excludeDictionaryId}<#sep>,</#list></@cms.dictionaryExcludeList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExcludeList?dictionaryId=1&parentValue=text', function(data){ console.log(data); }); </script>
Parameter List
dictionaryId
: Data dictionary IDexcludeDictionaryId
: Excluded dictionaryvalue
: Dictionary value, returns object
excludeValues
: Excluded valuesvalues
: Multiple dictionary values, separated by commas or spaces. Takes effect when value is empty. Returns map
(id, object
)Usage Example
<@cms.dictionaryExcludeValue dictionaryId='data' excludeDictionaryId='data1' value='data1'>${object.excludeValues}</@cms.dictionaryExcludeValue>
<@cms.dictionaryExcludeValue dictionaryId='data' excludeDictionaryId='data1' values='1,2'><#list map as k,v>${k}:${v.excludeValues}<#sep>,</#list></@cms.dictionaryExcludeValue>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExcludeValue?dictionaryId=data&excludeDictionaryId=data1&value=1', function(data){ console.log(data.excludeValues); }); </script>
Parameter List
name
: Dictionary namepageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting positionpageIndex
: Current pagetotalPage
: Total pageslist
: Result listpage.list
: List type, query result entity list
name
: NamechildDepth
: Child depthUsage Example
<@cms.dictionaryList name='data'><#list page.list as a>${a.name}<#sep>,</#list></@cms.dictionaryList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryList?name=data', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: ID, returns object
id
: IDitemType
: Item typeitemId
: Item IDfieldName
: Field namecreateDate
: Creation dateuserId
: Usertext
: Content textids
: Multiple IDs, separated by commas or spaces. Takes effect when id is empty. Returns map
(id, object
)Usage Example
<@cms.editorHistory id=1>${object.text}</@cms.editorHistory>
<@cms.editorHistory ids=1,2,3><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.editorHistory>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/editorHistory?id=1&appToken=Access Authorization Token', function(data){ console.log(data.text); }); </script>
Parameter List
itemType
: Item typeitemId
: Item IDfieldName
: Field nameuserId
: User IDorderType
: Sort type, [asc: ascending, desc: descending], default is publish date descendingpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting positionpageIndex
: Current pagetotalPage
: Total pageslist
: Result listpage.list
: List type, query result entity list
id
: IDitemType
: Item typeitemId
: Item IDfieldName
: Field namecreateDate
: Creation dateuserId
: Usertext
: Content textUsage Example
<@cms.editorHistoryList contentId=1 fieldName='text' pageSize=10><#list page.list as a>${a.text}<#sep>,</#list></@cms.editorHistoryList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/editorHistoryList?contentId=1&fieldName='text'&pageSize=10&appToken=Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
Return Result
page
: Faceted search result
facetMap
: Faceted search result (field, (value, count))page.list
: List type, query result entity list
id
: IDtitle
: TitleuserId
: Publishing user IDdeptId
: Publishing user department IDcheckUserId
: Review user IDcategoryId
: Category IDmodelId
: Model IDparentId
: Parent content IDquoteContentId
: Quoted content IDcopied
: Repostedauthor
: Authoreditor
: EditoronlyUrl
: External linkhasImages
: Has image listhasFiles
: Has attachment listhasProducts
: Has product listhasStatic
: Has static fileurl
: URLdescription
: DescriptiontagIds
: Multiple tag IDscover
: Cover imagechilds
: Child content countscores
: Total scoresscoreUsers
: Rating user countscore
: Scorecomments
: Comment countclicks
: Click countcollections
: Collection countpublishDate
: Publish dateexpiryDate
: Expiry datecheckDate
: Review dateupdateUserId
: Update user IDupdateDate
: Update datecreateDate
: Creation datesort
: Top levelstatus
: Status (0: Draft, 1: Published, 2: Pending, 3: Rejected)Usage Example
<@cms.facetSearch word='cms' pageSize=10> <p> category: <#list page.facetMap.categoryId as k,v><@cms.category id=k>${object.name}</@cms.category>(${v})</#list></p> <p> model: <#list page.facetMap.modelId as k,v><@cms.model id=k>${object.name}</@cms.model>(${v})</#list></p> <#list page.list as a><p>${a.title}</p></#list> </@cms.facetSearch>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/facetSearch?word=cms&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Content model ID, returns object
id
: IDparentId
: Parent IDname
: NamesearchableModel
: Searchable modeltemplatePath
: Static template pathcontentPath
: Content patheditorType
: Editor typecoverWidth
: Cover widthcoverHeight
: Cover heighthasChild
: Has childonlyUrl
: Extend linkhasImages
: Has image listhasFiles
: Has file listhasProducts
: Has product listsearchable
: Text searchablefieldList
: Field listrequiredFieldList
: Required field listfieldTextMap
: Field text mapextendList
: Extend field listrelatedList
: Related listids
: Multiple content model IDs, separated by commas or spaces. Takes effect when id is empty. Returns map
(id, object
)Usage Example
<@cms.model id='article'>${object.name}</@cms.model>
<@cms.model ids='article,link,picture'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.model>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/model?id=article', function(data){ console.log(data.name); }); </script>
Parameter List
parentId
: Parent content model IDqueryAll
: Query all models, takes effect when parentId is empty. [true, false], default is falsehasChild
: Has child model, [true, false]onlyUrl
: External link, [true, false]hasImages
: Has image list, [true, false]hasFiles
: Has file list, [true, false]Return Result
list
: List type, query result entity list
id
: IDparentId
: Parent IDname
: NamesearchableModel
: Searchable modeltemplatePath
: Static template pathcontentPath
: Content patheditorType
: Editor typecoverWidth
: Cover widthcoverHeight
: Cover heighthasChild
: Has childonlyUrl
: Extend linkhasImages
: Has image listhasFiles
: Has file listhasProducts
: Has product listsearchable
: Text searchablefieldList
: Field listrequiredFieldList
: Required field listfieldTextMap
: Field text mapextendList
: Extend field listrelatedList
: Related listUsage Example
<@cms.modelList><#list page.list as a>${a.name}<#sep>,</#list></@cms.modelList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/modelList', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Recommended position ID, returns object
id
: IDpath
: Recommended position pathuserId
: Creation user IDcheckUserId
: Review user IDitemType
: Item typeitemId
: Item IDtitle
: Titleurl
: URLdescription
: Descriptioncover
: Cover imagecreateDate
: Creation datepublishDate
: Publish dateexpiryDate
: Expiry datestatus
: Status (0: Draft, 1: Published, 2: Pending)clicks
: Click countmaxClicks
: Maximum click countupdateDate
: Update dateabsoluteURL
: Process URL as absolute path, default is true
containsAttribute
: Default is false
. When true, object.attribute
is the recommended position extended data map
(field code, value
)ids
: Multiple recommended position IDs, separated by commas or spaces. Takes effect when id is empty. Returns map
(id, object
)Usage Example
<@cms.place id=1>${object.title}</@cms.place>
<@cms.place ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.place>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/place?id=1&appToken=Access Authorization Token', function(data){ console.log(data.title); }); </script>
Parameter List
path
: Page fragment pathuserId
: Publishing user IDadvanced
: Enable advanced options, default is false
status
: Advanced option: Data status, [0: Operation, 1: Published, 2: Pending]disabled
: Advanced option: Disabled status, default is false
startPublishDate
: Start publish date, [2020-01-01 23:59:59], [2020-01-01]endPublishDate
: End publish date, cannot exceed current time when advanced option is disabled, [2020-01-01 23:59:59], [2020-01-01]itemType
: Item type, [content: Content, category: Category, custom: Custom]itemId
: Item IDabsoluteURL
: Process URL and cover image as absolute path, default is true
containsAttribute
: Default is false
. For HTTP requests, it is an advanced option. When true, place.attribute
is the recommended position extended data map
(field code, value
)orderField
: Sort field, [createDate: Creation date, clicks: Click count], default is publish date sorted by orderTypeorderType
: Sort type, [asc: ascending, desc: descending], default is descendingpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting positionpageIndex
: Current pagetotalPage
: Total pageslist
: Result listpage.list
: List type, query result entity list
id
: IDpath
: Recommended position pathuserId
: Creation user IDcheckUserId
: Review user IDitemType
: Item typeitemId
: Item IDtitle
: Titleurl
: URLdescription
: Descriptioncover
: Cover imagecreateDate
: Creation datepublishDate
: Publish dateexpiryDate
: Expiry datestatus
: Status (0: Draft, 1: Published, 2: Pending)clicks
: Click countmaxClicks
: Maximum click countupdateDate
: Update dateUsage Example
<@cms.placeList path='/1.html' pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.placeList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/placeList?path=/1.html&pageSize=10&appToken=Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
word
: Search term, returns union results for multiple termsexclude
: Exclusion termstagIds
: Multiple tag IDs, returns union results for multiple tagsuserId
: User IDparentId
: Parent content IDcategoryId
: Category IDcontainChild
: Include sub-categories, effective when categoryId is not emptycategoryIds
: Multiple category IDs, effective when categoryId is emptymodelIds
: Multiple model IDsextendsValues
Multiple full-text search field values, format: [field code]:[field value], e.g.: extendsValues='isbn:value1,unicode:value2'dictionaryValues
Multiple dictionary search field values, includes all child results when parent value is used, format: [field code]_[field value], e.g.: dictionaryValues='extend1_value1,extend1_value2'dictionaryUnion
Return union results for dictionary values, effective when dictionaryUnion is not empty, [true,false], defaults to intersection resultshighlight
: Highlight keywords, [true,false], defaults to false. When enabled, title, author, editor, and description fields should add ?no_esc to enable HTML highlighting. CMS automatically escapes HTML for security.preTag
: Highlight prefix, effective when highlighting is enabled, defaults to "<B>"postTag
: Highlight suffix, effective when highlighting is enabled, defaults to "</B>"projection
: Project results, [true,false], defaults to falsephrase
: Exact search, [true,false], defaults to falsefields
: Search fields, [title:title, author:author, editor:editor, description:description, text:content,files:attachments]containsAttribute
Defaults to false
, advanced option for HTTP requests. When true, content.attribute
contains content extension data map
(field code, value
)startPublishDate
: Start publish date, ["2000-01-01 23:59:59"], ["2000-01-01"]endPublishDate
: End publish date, ["2000-01-01 23:59:59"], ["2000-01-01"]orderField
Sort field, [clicks:click count descending,score:score descending,publishDate:publish date descending,collections:collection count descending,minPrice:minimum price,maxPrice:maximum price,extend.sort1-extend.sort10]:extension field sort flags], defaults to relevance descendingpageIndex
: Page numberpageSize
: Items per pagemaxResults
: Maximum results countReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: total countpageSize
: items per pagefirstResult
: first result offsetpageIndex
: current page numbertotalPage
: total pageslist
: result listpage.list
:List type query result entities
id
: idtitle
: titleuserId
: publisher user IDdeptId
: publisher department IDcheckUserId
: reviewer user IDcategoryId
: category IDmodelId
: model IDparentId
: parent content IDquoteContentId
: referenced content IDcopied
: repostedauthor
: authoreditor
: editoronlyUrl
: external linkhasImages
: has image listhasFiles
: has attachment listhasProducts
: has product listhasStatic
: has static fileurl
: URLdescription
: descriptiontagIds
: multiple tag IDscover
: cover imagechilds
: child content countscores
: total scorescoreUsers
: scoring user countscore
: scorecomments
: comment countclicks
: click countcollections
: collection countpublishDate
: publish dateexpiryDate
: expiry datecheckDate
: review dateupdateUserId
: updater user IDupdateDate
: update datecreateDate
: creation datesort
: top levelstatus
: status(0:Draft,1:Published,2:Pending,3:Rejected)<@cms.search word='cms' pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.search>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/search?word=cms&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
:Survey ID, returns object
id
: iduserId
: publisher user IDsurveyType
: survey type(survey,exam)title
: titledescription
: descriptionvotes
: vote countstartDate
: start dateendDate
: end dateallowAnonymous
: allow anonymouscreateDate
: creation dateids
: Multiple survey IDs, comma or space separated, returns map
(id,object
) when id is emptyUsage Example
<@cms.survey id=1>${object.title}</@cms.survey>
<@cms.survey ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.survey>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/survey?id=1', function(data){ console.log(data.title); }); </script>
Parameter List
userId
: Publisher user IDsurveyType
: Survey type, [exam: exam, survey: survey]startStartDate
: Start date range begin, ["2020-01-01 23:59:59"], ["2020-01-01"]endStartDate
: Start date range end, ["2020-01-01 23:59:59"], ["2020-01-01"]startEndDate
: End date range begin, ["2020-01-01 23:59:59"], ["2020-01-01"]endEndDate
: End date range end, ["2020-01-01 23:59:59"], ["2020-01-01"]title
: Titledisabled
: Disabled status, defaults to false
orderField
Sort field, [votes: participant count, startDate: start date, endDate: end date, createTime: creation date], defaults to ID sorted by orderTypeorderType
: Sort type, [asc: ascending, desc: descending], defaults to descendingpageIndex
: Page numberpageSize
: Items per pageReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: First result offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entities
id
: IDuserId
: Publisher user IDsurveyType
: Survey type(survey,exam)title
: Titledescription
: Descriptionvotes
: Vote countstartDate
: Start dateendDate
: End dateallowAnonymous
: Allow anonymouscreateDate
: Creation dateUsage Example
<@cms.surveyList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/surveyList?pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Survey question ID, returns object
id
: IDsurveyId
: Survey IDtitle
: Titlescore
: ScorequestionType
: Question type[radio,select,checkbox,text,file,picture]cover
: Imageanswer
: Answersort
: Sort orderids
: Multiple survey question IDs, comma or space separated, returns map
(id,object
) when id is emptyabsoluteURL
: Convert cover image to absolute path, defaults to true
advanced
: Enable advanced options, defaults to false
Usage Example
<@cms.surveyQuestion id=1>${object.title}</@cms.surveyQuestion>
<@cms.surveyQuestion ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.surveyQuestion>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestion?id=1&appToken=Access Token', function(data){ console.log(data.title); }); </script>
Parameter List
id
: Survey question ID, returns object
id
: IDquestionId
: Question IDvotes
: Vote counttitle
: Titlesort
: Sort orderids
: Multiple survey question IDs, comma or space separated, returns map
(id,object
) when id is emptyUsage Example
<@cms.surveyQuestionItem id=1>${object.title}</@cms.surveyQuestionItem>
<@cms.surveyQuestionItem ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.surveyQuestionItem>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionItem?id=1', function(data){ console.log(data.title); }); </script>
Parameter List
questionId
: Question IDorderField
: Sort field, [votes: vote count], defaults to sort by orderorderType
: Sort type, [asc: ascending, desc: descending], defaults to descendingpageIndex
: Page numberpageSize
: Items per pageReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: First result offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entities
id
: IDquestionId
: Question IDvotes
: Vote counttitle
: Titlesort
: Sort orderUsage Example
<@cms.surveyQuestionItemList questionId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyQuestionItemList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionItemList?questionId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
surveyId
: Survey IDquestionTypes
Multiple question types, [radio: single choice,select: dropdown,checkbox: multiple choice,text: text,file: file,picture: picture]absoluteURL
: Convert cover image to absolute path, defaults to true
advanced
: Enable advanced options, defaults to false
orderType
: Sort type, [asc: ascending, desc: descending], defaults to sort orderpageIndex
: Page numberpageSize
: Items per pageReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: First result offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entities
id
: IDsurveyId
: Survey IDtitle
: Titlescore
: ScorequestionType
: Question type[radio,select,checkbox,text,file,picture]cover
: Imageanswer
: Answersort
: Sort orderUsage Example
<@cms.surveyQuestionList surveyId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyQuestionList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionList?surveyId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Tag ID, returns object
id
: IDname
: NametypeId
: Type IDsearchCount
: Search countids
: Multiple tag IDs, comma or space separated, returns map
(id,object
) when id is emptyUsage Example
<@cms.tag id=1>${object.name}</@cms.tag>
<@cms.tag ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.tag>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/tag?id=1', function(data){ console.log(data.name); }); </script>
Parameter List
typeId
: Tag type IDname
: Tag nameadvanced
: Enable advanced options, defaults to false
orderField
: Advanced option: Sort field, [searchCount: search count], defaults to searchCount sorted by orderTypeorderType
: Sort type, [asc: ascending, desc: descending], defaults to descendingpageIndex
: Page numberpageSize
: Items per pageReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: First result offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entities
id
: IDname
: NametypeId
: Type IDsearchCount
: Search countUsage Example
<@cms.tagList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.tagList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/tagList?pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Tag type ID, returns object
id
: IDname
: Namecount
: Tag countids
: Multiple tag type IDs, comma or space separated, returns map
(id,object
) when id is emptyUsage Example
<@cms.tagType id=1>${object.name}</@cms.tagType>
<@cms.tagType ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.tagType>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/tagType?id=1', function(data){ console.log(data.name); }); </script>
Parameter List
name
: Tag namepageIndex
: Page numberpageSize
: Items per pageReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: First result offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entities
id
: IDname
: Namecount
: Tag countUsage Example
<@cms.tagTypeList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.tagTypeList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/tagTypeList?pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
: User IDcontentId
: Content ID, returns object
id
: IDcreateDate
: Creation datecontentIds
: Multiple item IDs, comma or space separated, returns map
(contentId,object
) when contentId is emptyUsage Example
<@cms.userCollection userId=1 contentId=1>${object.scores}</@cms.userCollection>
<@cms.userCollection userId=1 contentIds='1,2,3'><#list map as k,v>${k}:${v.contentId}<#sep>,</#list></@cms.userCollection>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userCollection?id=1', function(data){ console.log(data.scores); }); </script>
Parameter List
userId
: User IDcontentId
: Content IDpageIndex
: Page numberpageSize
: Items per pageReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: First result offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entities
id
: IDcreateDate
: Creation dateUsage Example
<@cms.userCollectionList userId=1 pageSize=10><#list page.list as a>${a.scores}<#sep>,</#list></@cms.userCollectionList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userCollectionList?userId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
: User IDitemType
: Item typeitemId
: Item ID, returns object
id
: IDscore
: Scoreip
: IPcreateDate
: Creation dateitemIds
: Multiple item IDs, comma or space separated, returns map
(itemId,object
) when itemId is emptyUsage Example
<@cms.userScore userId=1 itemType="content" itemId=1>${object.scores}</@cms.userScore>
<@cms.userScore userId=1 itemType="content" itemIds='1,2,3'><#list map as k,v>${k}:${v.scores}<#sep>,</#list></@cms.userScore>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userScore?id=1', function(data){ console.log(data.scores); }); </script>
Parameter List
userId
: User IDitemType
: Item typeitemId
: Item IDpageIndex
: Page numberpageSize
: Items per pageReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: First result offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entities
id
: IDscore
: Scoreip
: IPcreateDate
: Creation dateUsage Example
<@cms.userScoreList userId=1 pageSize=10><#list page.list as a>${a.scores}<#sep>,</#list></@cms.userScoreList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userScoreList?userId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
: User IDsurveyId
: Survey ID, returns object
id
: IDanonymous
: Anonymous userscore
: Scoreip
: IPcreateDate
: Creation datesurveyIds
: Multiple survey IDs, comma or space separated, returns map
(surveyId,object
) when surveyId is empty and userId is not emptyuserIds
: Multiple user IDs, comma or space separated, returns map
(userId,object
) when userId is empty and surveyId is not emptyUsage Example
<@cms.userSurvey id=1>${object.score}</@cms.userSurvey>
<@cms.userSurvey ids='1,2,3'><#list map as k,v>${k}:${v.score}<#sep>,</#list></@cms.userSurvey>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userSurvey?id=1&appToken=Access Token', function(data){ console.log(data.score); }); </script>
Parameter List
userId
: User IDsurveyId
: Survey IDorderField
: Sort field, [score: rating, createDate: creation date], defaults to createDate sorted by orderTypeorderType
: Sort type, [asc: ascending, desc: descending], defaults to descendingpageIndex
: Page numberpageSize
: Items per pageReturn Results
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: First result offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entities
id
: IDanonymous
: Anonymous userscore
: Scoreip
: IPcreateDate
: Creation dateUsage Example
<@cms.userSurveyList userId=1 pageSize=10><#list page.list as a>${a.score}<#sep>,</#list></@cms.userSurveyList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyList?userId=1&pageSize=10&appToken=Access Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
: User IDquestionId
: Question ID, returns object
id
: IDsurveyId
: Survey IDanswer
: Answerscore
: ScorecreateDate
: Creation DatequestionIds
: Multiple question IDs, comma or space separated. Takes effect when questionId is empty and userId is not empty. Returns map
(questionId,object
)userIds
: Multiple user IDs, comma or space separated. Takes effect when userId is empty and questionId is not empty. Returns map
(userId,object
)Usage Example
<@cms.userSurveyQuestion id=1>${object.answer}</@cms.userSurveyQuestion>
<@cms.userSurveyQuestion ids='1,2,3'><#list map as k,v>${k}:${v.answer}<#sep>,</#list></@cms.userSurveyQuestion>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyQuestion?id=1&appToken=Interface Access Authorization Token', function(data){ console.log(data.answer); }); </script>
Parameter List
userId
: User IDquestionId
: Question IDsurveyId
: Survey IDorderField
: Sorting field, [score: Score, createDate: Creation Date], default is createDate sorted by orderTypeorderType
: Sorting type, [asc: Ascending, desc: Descending], default is descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDsurveyId
: Survey IDanswer
: Answerscore
: ScorecreateDate
: Creation DateUsage Example
<@cms.userSurveyQuestionList userId=1 pageSize=10><#list page.list as a>${a.answer}<#sep>,</#list></@cms.userSurveyQuestionList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyQuestionList?userId=1&pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
: User IDvoteId
: Vote ID, returns object
id
: IDanonymous
: Anonymous useritemId
: Option IDip
: IPcreateDate
: Creation DatevoteIds
: Multiple vote IDs, separated by commas or spaces, takes effect when voteId is empty, returns map
(voteId, object
)Usage Example
<@cms.userVote id=1>${object.itemId}</@cms.userVote>
<@cms.userVote ids='1,2,3'><#list map as k,v>${k}:${v.itemId}<#sep>,</#list></@cms.userVote>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userVote?id=1', function(data){ console.log(data.itemId); }); </script>
Parameter List
userId
: User IDvoteId
: Vote IDorderType
: Sorting type, [asc: Ascending, desc: Descending], default is creation date descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDanonymous
: Anonymous useritemId
: Option IDip
: IPcreateDate
: Creation DateUsage Example
<@cms.userVoteList userId=1 pageSize=10><#list page.list as a>${a.ip}<#sep>,</#list></@cms.userVoteList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/userVoteList?userId=1&pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Vote ID, returns object
id
: IDstartDate
: Start DateendDate
: End Datevotes
: Number of votestitle
: Titledescription
: DescriptionallowAnonymous
: Allow anonymouscreateDate
: Creation Dateids
: Multiple vote IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id, object
)Usage Example
<@cms.vote id=1>${object.title}</@cms.vote>
<@cms.vote ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.vote>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/vote?id=1', function(data){ console.log(data.title); }); </script>
Parameter List
id
: Vote option ID, returns object
id
: IDvoteId
: Vote IDtitle
: Titlevotes
: Votessort
: Sortids
: Multiple vote option IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id, object
)Usage Example
<@cms.voteItem id=1>${object.title}</@cms.voteItem>
<@cms.voteItem ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.voteItem>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/voteItem?id=1', function(data){ console.log(data.title); }); </script>
Parameter List
voteId
: Vote IDorderField
: Sorting field, [votes: Number of voters, sort: Sort ascending], default is sort ascendingorderType
: Sorting type, [asc: Ascending, desc: Descending], default is descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDvoteId
: Vote IDtitle
: Titlevotes
: Votessort
: SortUsage Example
<@cms.voteItemList voteId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.voteItemList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/voteItemList?voteId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
startStartDate
: Start start date, [2020-01-01 23:59:59], [2020-01-01]endStartDate
: End start date, [2020-01-01 23:59:59], [2020-01-01]startEndDate
: Start end date, [2020-01-01 23:59:59], [2020-01-01]endEndDate
: End end date, [2020-01-01 23:59:59], [2020-01-01]advanced
: Enable advanced options, default is false
disabled
: Advanced option: Disabled status, default is false
title
: Advanced option: TitleorderField
: Sorting field, [startDate: Start date, endDate: End date, votes: Number of voters, createDate: Creation date], default is id sorted by orderTypeorderType
: Sorting type, [asc: Ascending, desc: Descending], default is descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDstartDate
: Start dateendDate
: End datevotes
: Number of votestitle
: Titledescription
: DescriptionallowAnonymous
: Allow anonymouscreateDate
: Creation dateUsage Example
<@cms.voteList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.voteList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/voteList?pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Search term ID, returns object
id
: IDname
: NamesearchCount
: Search counthidden
: Hiddenip
: IPcreateDate
: Creation dateids
: Multiple search term IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id, object
)Usage Example
<@cms.word id=1>${object.name}</@cms.word>
<@cms.word ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.word>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/word?id=1&appToken=Interface Access Authorization Token', function(data){ console.log(data.name); }); </script>
Parameter List
startCreateDate
: Start creation date, [2020-01-01 23:59:59], [2020-01-01]endCreateDate
: End creation date, [2020-01-01 23:59:59], [2020-01-01]advanced
: Enable advanced options, default is false
hidden
: Advanced option: Disabled status, default is false
name
: Advanced option: NameorderField
Advanced option: Sorting, [searchCount: Search count, createDate: Creation date, id: ID], default is searchCount sorted by orderTypeorderType
: Sorting type, [asc: Ascending, desc: Descending], default is creation date descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDname
: NamesearchCount
: Search counthidden
: Hiddenip
: IPcreateDate
: Creation dateUsage Example
<@cms.wordList userId=1 pageSize=10><#list page.list as a>${a.ip}<#sep>,</#list></@cms.wordList>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/wordList?userId=1&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
status
: Multiple content statuses, [0: Draft, 1: Published, 2: Pending review, 3: Rejected]startCreateDate
: Start creation date, [2020-01-01 23:59:59], [2020-01-01]endCreateDate
: End creation date, [2020-01-01 23:59:59], [2020-01-01]workloadType
: Workload type [dept: Department, user: User], default is departmentdateField
: Date field [createDate: Creation date, publishDate: Publish date], default is creation dateReturn Result
list
: List type, query result entity list
Usage Example
<@cms.wordload pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.wordload>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/wordload?pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
: User IDstartCreateDate
: Start creation date, [2020-01-01 23:59:59], [2020-01-01]endCreateDate
: End creation date, [2020-01-01 23:59:59], [2020-01-01]channel
: Login channelloginMethod
: Login methodresult
: Login result, [true, false]name
: Usernameip
: IPorderType
: Sorting type, [asc: Ascending, desc: Descending], default is descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDname
: NameuserId
: User IDip
: IPchannel
: Login channelloginMethod
: Login methodresult
: Login resultcreateDate
: Login dateerrorPassword
: Error passwordUsage Example
<@log.loginList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.loginList>
<script> $.getJSON('${site.dynamicPath}api/directive/log/loginList?pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Log ID, returns object
id
: IDuserId
: User IDdeptId
: Department IDchannel
: Channeloperate
: Operation channelip
: IPcreateDate
: Operation datecontent
: Contentids
: Multiple log IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id, object
)<@log.operate id=1>${object.content}</@log.operate>
<@log.operate ids='1,2,3'><#list map as k,v>${k}:${v.content}<#sep>,</#list></@log.operate>
<script> $.getJSON('${site.dynamicPath}api/directive/log/operate?id=1&appToken=Interface Access Authorization Token', function(data){ console.log(data.content); }); </script>
Parameter List
channel
: Channeloperate
: Operation codeuserId
: User IDstartCreateDate
: Start creation date, [2020-01-01 23:59:59], [2020-01-01]endCreateDate
: End creation date, [2020-01-01 23:59:59], [2020-01-01]content
: Operation contentname
: Usernameip
: IPorderType
: Sorting type, [asc: Ascending, desc: Descending], default is descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDuserId
: User IDdeptId
: Department IDchannel
: Channeloperate
: Operation channelip
: IPcreateDate
: Operation datecontent
: ContentUsage Example
<@log.operateList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.operateList>
<script> $.getJSON('${site.dynamicPath}api/directive/log/OperateList?pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Log ID, returns object
id
: IDtaskId
: Task IDbegintime
: Begin timeendtime
: End timesuccess
: Successresult
: Resultids
: Multiple log IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id, object
)<@log.task id=1>${object.result}</@log.task>
<@log.task ids='1,2,3'><#list map as k,v>${k}:${v.result}<#sep>,</#list></@log.task>
<script> $.getJSON('${site.dynamicPath}api/directive/log/task?id=1&appToken=Interface Access Authorization Token', function(data){ console.log(data.result); }); </script>
Parameter List
taskId
: Task plan IDstartCreateDate
: Start creation date, [2020-01-01 23:59:59], [2020-01-01]endCreateDate
: End creation date, [2020-01-01 23:59:59], [2020-01-01]success
: Execution result, [true, false]orderType
: Sorting type, [asc: Ascending, desc: Descending], default is descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDtaskId
: Task IDbegintime
: Begin timeendtime
: End timesuccess
: Successresult
: ResultUsage Example
<@log.taskList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.taskList>
<script> $.getJSON('${site.dynamicPath}api/directive/log/TaskList?pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
fileTypes
: File types, [image, video, audio, document, other]image
: Whether image, [true, false]userId
: User IDchannel
: Channelprivatefile
: Private file, [true, false], default false
originalName
: Original filenamefilePath
: File pathorderField
: Sorting field, [createDate: Creation date, fileSize: File size], default ID descendingorderType
: Sorting type, [asc: Ascending, desc: Descending], default is descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDuserId
: User IDchannel
: Operation channeloriginalName
: Original filenameprivatefile
: Private filefileType
: File typefileSize
: File sizewidth
: Image widthheight
: Image heightip
: IPcreateDate
: Upload datefilePath
: File pathUsage Example
<@log.uploadList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.uploadList>
<script> $.getJSON('${site.dynamicPath}api/directive/log/UploadList?pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Application ID, returns object
id
: IDchannel
: ChannelappKey
: App keyappSecret
: App secretauthorizedApis
: Authorized APIsexpiryMinutes
: Expiry minutesids
: Multiple application IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id, object
)<@sys.app id=1>${object.channel}</@sys.app>
<@sys.app ids='1,2,3'><#list map as k,v>${k}:${v.channel}<#sep>,</#list></@sys.app>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/app?id=1&appToken=Interface Access Authorization Token', function(data){ console.log(data.channel); }); </script>
Parameter List
id
: Client ID, returns object
id
: IDchannel
: Channeluuid
: UUIDuserId
: User IDclientVersion
: Client versionlastLoginDate
: Last login datelastLoginIp
: Last login IPcreateDate
: Creation dateids
: Multiple client IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id, object
)Usage Example
<@sys.appClient id=1>${object.clientVersion}</@sys.appClient>
<@sys.appClient ids='1,2,3'><#list map as k,v>${k}:${v.clientVersion}<#sep>,</#list></@sys.appClient>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/appClient?id=1&appToken=Interface Access Authorization Token', function(data){ console.log(data.clientVersion); }); </script>
Parameter List
advanced
: Enable advanced options, default is false
disabled
: Advanced option: Disabled status, [true, false], default falsechannel
: ChanneluserId
: User IDstartLastLoginDate
: Start last login date, [2020-01-01 23:59:59], [2020-01-01]endLastLoginDate
: End last login date, [2020-01-01 23:59:59], [2020-01-01]startCreateDate
: Start creation date, [2020-01-01 23:59:59], [2020-01-01]endCreateDate
: End creation date, [2020-01-01 23:59:59], [2020-01-01]orderField
: Sorting field, [lastLoginDate: Last login date, createDate: Creation date], default creation date descendingorderType
: Sorting type, [asc: Ascending, desc: Descending], default is descendingpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDchannel
: Channeluuid
: UUIDuserId
: User IDclientVersion
: Client versionlastLoginDate
: Last login datelastLoginIp
: Last login IPcreateDate
: Creation dateUsage Example
<@sys.appClientList pageSize=10><#list page.list as a>${a.uuid}<#sep>,</#list></@sys.appClientList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/appClientList?pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
channel
: ChannelpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset, current starting positionpageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type, query result entity list
id
: IDchannel
: ChannelappKey
: App keyappSecret
: App secretauthorizedApis
: Authorized APIsexpiryMinutes
: Expiry minutesUsage Example
<@sys.appList pageSize=10><#list page.list as a>${a.channel}<#sep>,</#list></@sys.appList>
Parameter List
appId
: Application IDpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset (current starting position)pageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type query result entity list
authToken
: Authorization verification codeappId
: Application IDcreateDate
: Creation dateexpiryDate
: Expiration dateUsage Example
<@sys.appTokenList pageSize=10><#list page.list as a>${a.authToken}<#sep>,</#list></@sys.appTokenList>
Parameter List
roleIds
: Multiple role IDsurl
: URL. When both roleIds and url are provided, returns true
or false
, indicating whether these roles have permission for the URL.urls
: Multiple URLs. Effective when roleIds is provided and url is empty. Returns map
(url, true
or false
).Usage Example
<@sys.authorized roleIds='1,2,3' url='cmsContent/list'>${object}</@sys.authorized>
<@sys.authorized roleIds='1,2,3' urls='cmsContent/list,cmsCategory/list'><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.authorized>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/authorized?roleIds=1,2,3&url=cmsContent/list&appToken=Interface Access Authorization Token', function(data){ console.log(data); }); </script>
Parameter List
startHeartbeatDate
: Start heartbeat date, e.g., ["2020-01-01 23:59:59", "2020-01-01"]endHeartbeatDate
: End heartbeat date, e.g., ["2020-01-01 23:59:59", "2020-01-01"]master
: Whether it is the master node, ["true", "false"], default is false.orderField
: Sorting field, ["createDate": Last login date, "heartbeatDate": Creation date, "id"], default is ID in descending order.orderType
: Sorting type, ["asc": Ascending, "desc": Descending], default is descending.pageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset (current starting position)pageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type query result entity list
uuid
: UUIDcreateDate
: Startup dateheartbeatDate
: Last heartbeat datemaster
: Management nodecmsVersion
: CMS versionrevision
: Revision versionUsage Example
<@sys.clusterList pageSize=10><#list page.list as a>${a.uuid}<#sep>,</#list></@sys.clusterList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/clusterList?pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
code
: Configuration code. Returns object
:
code
: Codedescription
: Descriptioncustomed
: CustomizedUsage Example
<@sys.config code='site'>${object.description}</@sys.config>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/config?code=site&appToken=Interface Access Authorization Token', function(data){ console.log(data.description); }); </script>
Parameter List
code
: Configuration code. Returns object
:
id
: IDdata
: Configuration datacreateDate
: Creation dateupdateDate
: Update datecodes
: Multiple configuration codes. Returns map
(code, object
).Usage Example
<@sys.configData code='site'>${object.register_url}</@sys.configData>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/configData?code=site&appToken=Interface Access Authorization Token', function(data){ console.log(data.register_url); }); </script>
Parameter List
code
: Configuration codeReturn Result
list
: List type query result entity list
id
: IDrequired
: Required fieldsearchable
: Searchablesortable
: Sortable fieldmaxlength
: Maximum lengthwidth
: Image widthheight
: Image heightname
: Namedescription
: DescriptioninputType
: Form typedefaultValue
: Default valuedictionaryId
: Data dictionarymultiple
: Multiple selectionsort
: SortingUsage Example
<@sys.configFieldList pageSize=10><#list list as a>${a.name}<#sep>,</#list></@sys.configFieldList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/configFieldList?appToken=Interface Access Authorization Token', function(data){ console.log(data); }); </script>
Return Result
list
: List type query result entity list
code
: Codedescription
: Descriptioncustomed
: CustomizedUsage Example
<@sys.configList><#list list as a>${a.code}<#sep>,</#list></@sys.configList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/configList?appToken=Interface Access Authorization Token', function(data){ console.log(data); }); </script>
Parameter List
id
: Department ID. Returns object
:
id
: IDname
: Namecode
: CodeparentId
: Parent department IDdescription
: DescriptionuserId
: Responsible user IDhasChild
: Has child departmentsmaxSort
: Maximum content pinning levelownsAllCategory
: Owns all categoriesownsAllPage
: Owns all pagesownsAllConfig
: Owns all configurationsids
: Multiple department IDs, comma or space separated. Effective when id is empty. Returns map
(id, object
).Usage Example
<@sys.dept id=1>${object.name}</@sys.dept>
<@sys.dept ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.dept>
<script> $.getJSON('//sys.publicsys.com/api/directive/sys/dept?id=1&appToken=Interface Access Authorization Token', function(data){ console.log(data.name); }); </script>
Parameter List
deptId
: Department IDItemId
: Category ID. When both deptId and ItemId are provided, returns true
or false
, indicating whether the department has data permissions for the category.ItemIds
: Multiple category IDs. Effective when deptId is provided and ItemId is empty. Returns map
(category ID, true
or false
).Usage Example
<@sys.deptItem deptId=1 ItemId=1>${object}</@sys.deptItem>
<@sys.deptItem deptId=1 ItemIds=1,2,3><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.deptItem>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/deptItem?deptId=1&ItemId=1&appToken=Interface Access Authorization Token', function(data){ console.log(data); }); </script>
Parameter List
deptId
: Department IDitemType
: Item typeitemId
: Item IDpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset (current starting position)pageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type query result entity list
id
: IDUsage Example
<@sys.deptCategoryList deptId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.deptCategoryList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/deptCategoryList?deptId=1&pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
parentId
: Parent department IDuserId
: Responsible user IDname
: NamepageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset (current starting position)pageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type query result entity list
id
: IDname
: Namecode
: CodeparentId
: Parent department IDdescription
: DescriptionuserId
: Responsible user IDhasChild
: Has child departmentsmaxSort
: Maximum content pinning levelownsAllCategory
: Owns all categoriesownsAllPage
: Owns all pagesownsAllConfig
: Owns all configurationsUsage Example
<@sys.deptList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.deptList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/deptList?pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Domain. Returns object
:
name
: Domain namesiteId
: Site IDwild
: Wildcard domainpath
: Root template pathids
: Multiple domains, comma or space separated. Effective when id is empty. Returns map
(id, object
).Usage Example
<@sys.domain id='www.publiccms.com'>${object.name}</@sys.domain>
<@sys.domain ids='www.publiccms.com,www.sanluan.com'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.domain>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/domain?id=1&appToken=Interface Access Authorization Token', function(data){ console.log(data.name); }); </script>
Parameter List
advanced
: Enable advanced options, default is false
.siteId
: Advanced option: Site IDwild
: Advanced option: Wildcard domain, ["true", "false"]pageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset (current starting position)pageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type query result entity list
name
: Domain namesiteId
: Site IDwild
: Wildcard domainpath
: Root template pathUsage Example
<@sys.domainList deptId=1 pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.domainList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/domainList?pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
extendId
: Extended IDinputType
: Multiple input types ["text: input box, number: number, textarea: multi-line text, file: file, image: image, video: video, password: password, editor: Baidu editor, ckeditor: CKEditor, tinymce: TinyMCE, date: date, datetime: time, color: color, alphaColor: color with transparency, template: template path, boolean: yes/no, user: user, dept: department, content: content, category: category, dictionary: data dictionary, categoryType: category type, tagType: tag type, vote: vote, survey: survey, tag: tag"]searchable
: Searchable, ["true", "false"]Return Result
list
: List type query result entity list
id
: IDrequired
: Required fieldsearchable
: Searchablesortable
: Sortable fieldmaxlength
: Maximum lengthwidth
: Image widthheight
: Image heightname
: Namedescription
: DescriptioninputType
: Form typedefaultValue
: Default valuedictionaryId
: Data dictionarymultiple
: Multiple selectionsort
: SortingUsage Example
<@sys.extendFieldList deptId=1 pageSize=10><#list list as a>${a.name}<#sep>,</#list></@sys.extendFieldList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/extendFieldList?extendId=1&appToken=Interface Access Authorization Token', function(data){ console.log(data); }); </script>
Parameter List
itemType
: Item typeitemId
: Item ID. Returns object
:
id
: IDuserId
: User IDcount
: Lock countcreateDate
: Creation dateupdateDate
: Update dateitemIds
: Multiple item IDs, comma or space separated. Effective when id is empty. Returns map
(id, object
).Usage Example
<@sys.lock id=1>${object.count}</@sys.lock>
<@sys.lock ids='1,2,3'><#list map as k,v>${k}:${v.count}<#sep>,</#list></@sys.lock>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/lock?id=1', function(data){ console.log(data.count); }); </script>
Parameter List
id
: Module ID. Returns object
:
id
: IDurl
: URLauthorizedUrl
: Authorized access URLattached
: Attached informationparentId
: Parent module IDmenu
: Is menuhasChild
: Has child modulessort
: Sortingids
: Multiple module IDs, comma or space separated. Effective when id is empty. Returns map
(id, object
).Usage Example
<@sys.module id='page'>${object.url}</@sys.module>
<@sys.module ids='page,develop'><#list map as k,v>${k}:${v.url}<#sep>,</#list></@sys.module>
<script> $.getJSON('//sys.publicsys.com/api/directive/sys/module?id=page&appToken=Interface Access Authorization Token', function(data){ console.log(data.url); }); </script>
Parameter List
moduleId
: Module ID. Returns object
:
id
: IDurl
: URLauthorizedUrl
: Authorized access URLattached
: Attached informationparentId
: Parent module IDmenu
: Is menuhasChild
: Has child modulessort
: Sortinglang
: Language ["zh: Chinese, en: English, ja: Japanese"]Usage Example
<@sys.moduleLang moduleId='page' lang='zh'>${object}</@sys.moduleLang>
<script> $.getJSON('//sys.publicsys.com/api/directive/sys/moduleLang?moduleId=page&lang=zh', function(data){ console.log(data); }); </script>
Parameter List
advanced
: Enable advanced options, default is false
.menu
: Advanced option: Is menu, ["true", "false"]parentId
: Parent module IDpageIndex
: Page numberpageSize
: Number of items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default number of items per pageMAX_PAGE_SIZE
: Maximum number of items per pagetotalCount
: Total countpageSize
: Number of items per pagefirstResult
: First result offset (current starting position)pageIndex
: Current page indextotalPage
: Total number of pageslist
: Result listpage.list
: List type query result entity list
id
: IDurl
: URLauthorizedUrl
: Authorized access URLattached
: Attached informationparentId
: Parent module IDmenu
: Is menuhasChild
: Has child modulessort
: SortingUsage Example
<@sys.moduleList parentId='page' pageSize=10><#list page.list as a>${springMacroRequestContext.getMessage('menu.'+a.id)}<#sep>,</#list></@sys.moduleList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/moduleList?parentId=page&pageSize=10&appToken=Interface Access Authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
code
: Record code. Returns object
.data
: Record data. If not empty, records the data:
id
: IDdata
: Record datacreateDate
: Creation dateupdateDate
: Update datecodes
: Multiple record codes. Returns map
(id, object
).Usage Example
<@sys.record code='site' data='data'>${object.data}</@sys.record>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/record?code=site&data=data&appToken=Interface Access Authorization Token', function(data){ console.log(data.data); }); </script>
Parameter List
code
: CodestartCreateDate
: Start creation date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】endCreateDate
: End creation date (cannot exceed current time when advanced options are disabled), format: 【2020-01-01 23:59:59】 or 【2020-01-01】orderField
: Sorting field, 【updateDate: update date】 Default: creation date in descending orderorderType
: Sorting type, 【asc: ascending, desc: descending】, Default: descendingpageIndex
: Page numberpageSize
: Items per pageReturn Result
list
: List type query result entity list
id
: iddata
: record datacreateDate
: creation dateupdateDate
: update dateUsage Example
<@sys.recordList><#list list as a>${a.data}<#sep>,</#list></@sys.recordList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/recordList?appToken=API access token', function(data){ console.log(data); }); </script>
Parameter List
id
: Role id, returns object
id
: idname
: nameownsAllRight
: owns all rightshowAllModule
: show all modulesids
: Multiple role ids, comma or space separated, takes effect when id is empty, returns map
(id,object
)Usage Example
<@sys.role id=1>${object.name}</@sys.role>
<@sys.role ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.role>
<script> $.getJSON('//sys.publicsys.com/api/directive/sys/role?id=1&appToken=API access token', function(data){ console.log(data.name); }); </script>
Parameter List
pageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: idname
: nameownsAllRight
: owns all rightshowAllModule
: show all modulesUsage Example
<@sys.roleList deptId=1 pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.roleList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/roleList?deptId=1&pageSize=10&appToken=API access token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
roleIds
: Multiple role idsmoduleId
Module id, when both roleIds and moduleId exist, returns true
or false
indicating whether these roles have data permissions for this modulemoduleIds
Multiple module ids, takes effect when roleIds exist and moduleId is empty, returns map
(module id, true
or false
)Usage Example
<@sys.roleModule roleIds='1,2,3' modelId='page'>${object}</@sys.roleModule>
<@sys.roleModule roleIds='1,2,3' modelIds='page,content'><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.roleModule>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/roleModule?roleIds=1,2,3&modelId=page&appToken=API access token', function(data){ console.log(data); }); </script>
Parameter List
roleId
: Role idmoduleId
: Module idpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: idUsage Example
<@sys.roleModuleList roleId=1 pageSize=10><#list page.list as a>${a.id.roleId}<#sep>,</#list></@sys.roleModuleList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/sysDeptCategoryList?roleId=1&pageSize=10&appToken=API access token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
roleId
: Role iduserId
: User idpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: idUsage Example
<@sys.roleUserList roleId=1 pageSize=10><#list page.list as a>${a.id.roleId}<#sep>,</#list></@sys.roleUserList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/roleUserList?roleId=1&pageSize=10&appToken=API access token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Site id, returns object
id
: idparentId
: parent site iddirectory
: directoryname
: nameuseStatic
: use staticsitePath
: site urluseSsi
: use SSIdynamicPath
: dynamic site urlhasChild
: has child sitemultiple
: multiple siteids
: Multiple site ids, comma or space separated, takes effect when id is empty, returns map
(id,object
)Usage Example
<@sys.site id=1>${object.name}</@sys.site>
<@sys.site ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.site>
<script> $.getJSON('//sys.publicsys.com/api/directive/sys/site?id=1&appToken=API access token', function(data){ console.log(data.name); }); </script>
Parameter List
advanced
: Enable advanced options, default false
disabled
: Advanced option: disabled, 【true,false】parentId
: Parent site idname
: NamepageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: idparentId
: parent site iddirectory
: directoryname
: nameuseStatic
: use staticsitePath
: site urluseSsi
: use SSIdynamicPath
: dynamic site urlhasChild
: has child sitemultiple
: multiple siteUsage Example
<@sys.siteList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.siteList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/siteList?pageSize=10&appToken=API access token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Task plan id, returns object
id
: idname
: namestatus
: status(0:ready,1:running,2:paused,3:error)multiNode
: multi-node executioncronExpression
: cron expressiondescription
: descriptionfilepath
: file pathupdateDate
: update dateids
: Multiple task plan ids, comma or space separated, takes effect when id is empty, returns map
(id,object
)Usage Example
<@sys.task id=1>${object.name}</@sys.task>
<@sys.task ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.task>
<script> $.getJSON('//sys.publicsys.com/api/directive/sys/task?id=1&appToken=API access token', function(data){ console.log(data.name); }); </script>
Parameter List
status
: Status 【0:ready,1:running,2:paused,3:error】startUpdateDate
: Start update date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】pageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: idname
: namestatus
: status(0:ready,1:running,2:paused,3:error)multiNode
: multi-node executioncronExpression
: cron expressiondescription
: descriptionfilepath
: file pathupdateDate
: update dateUsage Example
<@sys.taskList deptId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.taskList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/taskList?deptId=1&pageSize=10&appToken=API access token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
replaceSensitive
: Replace sensitive words, default true
id
: User id, returns object
id
: idname
: nameweakPassword
: weak passwordnickname
: nicknamecover
: cover imagedeptId
: department idcontentPermissions
: content permissions(0:self,1:all,2:dept)roles
: role idsemail
: email addressemailChecked
: email verifiedsuperuser
: super user (admin)disabled
: disabledlastLoginDate
: last login datelastLoginIp
: last login iploginCount
: login countregisteredDate
: register dateupdateDate
: update dateids
: Multiple user ids, comma or space separated, takes effect when id is empty, returns map
(id,object
)absoluteURL
: Process cover as absolute path, default true
Usage Example
<@sys.user id=1>${object.name}</@sys.user>
<@sys.user ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.user>
<script> $.getJSON('//sys.publicsys.com/api/directive/sys/user?id=1&appToken=API access token', function(data){ console.log(data.name); }); </script>
Parameter List
advanced
: Enable advanced options, default false
replaceSensitive
: Replace sensitive words, default true
disabled
: Advanced option: disabled, 【true,false】, default false
deptId
: Department idstartRegisteredDate
: Start registration date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】endRegisteredDate
: End registration date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】startLastLoginDate
: Start last login date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】endLastLoginDate
: End last login date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】superuser
: Admin, 【true,false】emailChecked
: Email verified, 【true,false】name
: Nickname, username, or emailorderField
: Sorting field, 【lastLoginDate:last login date,loginCount:login count,registeredDate:registration date,followers:followers count】, default creation date sorted by orderTypeorderType
: Sorting type, 【asc:ascending,desc:descending】, default descendingpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: idname
: nameweakPassword
: weak passwordnickname
: nicknamecover
: cover imagedeptId
: department idcontentPermissions
: content permissions(0:self,1:all,2:dept)roles
: role idsemail
: email addressemailChecked
: email verifiedsuperuser
: super user (admin)disabled
: disabledlastLoginDate
: last login datelastLoginIp
: last login iploginCount
: login countregisteredDate
: registration dateupdateDate
: update dateUsage Example
<@sys.userList deptId=1 pageSize=10><#list page.list as a>${a.nickname}<#sep>,</#list></@sys.userList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/userList?deptId=1&pageSize=10&appToken=API access token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
: User IDcode
: Configuration code, returns string
when userId is not emptydata
: Configuration data, returns string
when both configuration code and userId are not emptycodes
: Multiple configuration codes, returns map
(code,string
) when userId is not emptyuserIds
: Multiple user IDs, returns map
(userId,string
) when code is not emptyUsage Example
<@sys.UserSetting userId=1 code='home_title'>${object}</@sys.UserSetting>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/UserSetting?uscode=site&appToken=API access token', function(data){ console.log(data.register_url); }); </script>
Parameter List
userId
: User idchannel
: ChannelorderField
: Sorting field, 【expiryDate:expiration date,createDate:creation date】, default creation date sorted by orderTypeorderType
: Sorting type, 【asc:ascending,desc:descending】, default descendingpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
authToken
: auth tokenuserId
: user idchannel
: channelcreateDate
: creation dateexpiryDate
: expiration dateloginIp
: login ipUsage Example
<@sys.userTokenList userId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.userTokenList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/userTokenList?pageSize=10&authToken=User login token&authUserId=User id', function(data){ console.log(data.page.totalCount); }); </script>
Workflow Step List Query Directive
Parameter List
workflowId
: Workflow idReturn Result
list
: List type query result entity list
id
: idrequired
: requiredsearchable
: searchablesortable
: sortable fieldmaxlength
: max lengthwidth
: image widthheight
: image heightname
: namedescription
: descriptioninputType
: input typedefaultValue
: default valuedictionaryId
: dictionary idmultiple
: multiple selectionsort
: sort orderUsage Example
<@sys.extendFieldList deptId=1 pageSize=10><#list list as a>${a.name}<#sep>,</#list></@sys.extendFieldList>
<script> $.getJSON('${site.dynamicPath}api/directive/sys/workflowStepList?workflowId=1', function(data){ console.log(data); }); </script>
Parameter List
clearDate
: Start publication date, formats: 【2020-01-01 23:59:59】, 【2020-01-01】, default is 3 months agoReturn Result
result
: Map typeresult.loginLog
: Login log deletion countresult.operateLog
: Operation log deletion countresult.taskLog
: Task schedule log deletion countUsage Example
<@task.clearLog><#list result as k,v>${k}:${v}<#sep>,</#list></@task.clearLog>
<script> $.getJSON('${site.dynamicPath}api/directive/task/clearLog?appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Content ID, effective when ids is emptyids
: Multiple content IDsUsage Example
<@task.indexContent id=1><</@task.indexContent>
<script> $.getJSON('${site.dynamicPath}api/directive/task/indexContent?id=1&appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Category IDids
: Multiple category IDspageIndex
: Current page number, default is 1totalPage
: Maximum page number, if empty only generates current pageReturn Result
map
: Map type, key is content ID, value is generation resultUsage Example
<@task.publishCategory id=1><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishCategory>
<script> $.getJSON('${site.dynamicPath}api/directive/task/publishCategory?id=1&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
id
: Content IDids
: Multiple content IDs, effective when id is emptyReturn Result
map
: Map type, key is content ID, value is generation resultUsage Example
<@task.publishContent id=1><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishContent>
<script> $.getJSON('${site.dynamicPath}api/directive/task/publishContent?id=1&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
path
: Page path, default is "/"Return Result
map
: Map type, key is page path, value is generation resultUsage Example
<@task.publishPage><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishPage>
<script> $.getJSON('${site.dynamicPath}api/directive/task/publishPage?path=&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
path
: Page path, default is "/"Return Result
map
: Map type, key is page path, value is generation resultUsage Example
<@task.publishPlace><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishPlace>
<script> $.getJSON('${site.dynamicPath}api/directive/task/publishPlace?path=&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
id
: Category IDtemplatePath
: Template pathfilePath
: Static file pathpageIndex
: Current page number, default is 1totalPage
: Maximum page number, if empty only generates current pageReturn Result
url
: Static file pathUsage Example
<@tools.createCategoryFile id=1 templatePath='category.html' filePath='category/'+1+'.html'>${url}</@tools.createCategoryFile>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/createCategoryFile?id=1&templatePath=category.html&filePath=category/1.html&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
id
: Content IDtemplatePath
: Template pathfilePath
: Static file pathpageIndex
: Current page number, default is 1Return Result
url
: Static file pathUsage Example
<@tools.createContentFile id=1 templatePath='content.html' filePath='content/'+1+'.html'>${url}</@tools.createContentFile>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/createContentFile?id=1&templatePath=content.html&filePath=content/1.html&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
itemType
: Locked item typeitemId
: Locked item IDuserId
: Locking user IDcounter
: Count, default is 0
:Return Result
object
:
id
: IDuserId
: User IDcount
: Locked countcreateDate
: Create dateupdateDate
: Update dateUsage Example
<@tools.createLock itemType='content' itemId='1' userId='1'>${url}</@tools.createLock>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/createLock?itemType=content&itemId=1&userId=1&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
templatePath
: Template pathfilePath
: Static file pathpageIndex
: Current page number, default is 1parameters
: Parameter mapReturn Result
url
: Static file pathUsage Example
<@tools.createTemplateFile templatePath='template.html' filePath='page/'+1+'.html' parameters={"parameter1","value1"}>${url}</@tools.createTemplateFile>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/createTemplateFile?id=1&templatePath=template.html&filePath=page/1.html¶meters.parameter1=value1&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
admin
: Whether for admin, default is false
:Return Result
Usage Example
<input type="hidden" name="_csrf" value="<@tools.csrfToken/>"/>
Return Result
freeSpace
: Free spacetotalSpace
: Total spaceusableSpace
: Usable spacerootPath
: Absolute pathUsage Example
<@tools.disk>${freeSpace}</@tools.disk>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/disk?appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
itemType
: Metadata type, 【region, layout, module】itemId
: Metadata IDReturn Result
object
: DIY Metadata region
:
id
: IDcategoryType
: Category typename
: Namelayout
:
id
: IDregion
: Regionname
: Nametemplate
: Templatestyle
: Stylemodule
:
id
: IDregion
: Regionname
: Nameclone
: Clonecover
: Coverplace
: Place pathfragment
: Fragment pathfilePath
: File pathUsage Example
<@tools.diyMetadata itemType='region' itemId='00000000-0000-0000-0000-000000000000'>${object.name}</@tools.diyMetadata>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/diyMetadata?itemType=region&itemId=00000000-0000-0000-0000-000000000000&appToken=Access Token', function(data){ console.log(data.name); }); </script>
Parameter List
itemType
: Metadata type, 【region, layout, module】region
: Region ID, valid when itemType is layout or moduleshowGlobal
: Metadata type, 【true, false】, valid when itemType is layout or module, default is true
:Return Result
list
: DIY Metadata list region
:
id
: IDcategoryType
: Category typename
: Namelayout
:
id
: IDregion
: Regionname
: Nametemplate
: Templatestyle
: Stylemodule
:
id
: IDregion
: Regionname
: Nameclone
: Clonecover
: Coverplace
: Place pathfragment
: Fragment pathfilePath
: File pathUsage Example
<@tools.diyMetadataList itemType='region'><#list page.list as a>${a.name}<#sep>,</#list></@tools.diyMetadataList>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/diyMetadataList?itemType=region&appToken=Access Token', function(data){ console.log(data.name); }); </script>
Parameter List
id
: Region IDcategoryId
: Category IDReturn Result
object
:
id
: IDlayoutList
: Layout data listcategoryLayoutMap
: Layout data list mapUsage Example
<@tools.diyMetadata id='00000000-0000-0000-0000-000000000000'>${object.id}</@tools.diyMetadata>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/regionData?itemId=00000000-0000-0000-0000-000000000000&appToken=Access Token', function(data){ console.log(data.id); }); </script>
Return Result
object
: Exception stringUsage Example
<@tools.exception>${object}</@tools.exception>
Parameter List
command
: Command 【sync.bat, sync.sh, backupDB.bat, backupDB.sh】parameters
: Parameter arrayPrint execution result
Usage Example
<@tools.executeScript command='backupdb.bat'/>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/executeScript?command=backupdb.bat&appToken=Access Token', function(data){ console.log(data.id); }); </script>
Parameter List
type
: File type 【file, task, template】, default templatepath
: File pathReturn Result
object
: File content textUsage Example
<@tools.fileBackupContent type='file' path='index.html'>${object}</@tools.fileBackupContent>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/fileBackupContent?type=file&path=index.html&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
type
: File type 【file, task, template】, default templatepath
: File pathorderField
: Sort type 【fileName, fileSize, modifiedDate, createDate】, default fileNameReturn Result
list
: File listUsage Example
<@tools.fileBackupList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileBackupList>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/fileBackupList?path=/&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
type
: File type 【file, task, template】, default templatepath
: File pathReturn Result
object
: File content textUsage Example
<@tools.fileContent path='index.html'>${object}</@tools.fileContent>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/fileContent?path=index.html&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
type
: File type 【file, task, template】, default templatepath
: File pathReturn Result
object
: Boolean indicating file existenceUsage Example
<@tools.fileExists type='file' path='/'><#list list as a>${a}<#sep>,</#list></@tools.fileExists>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/fileExists?type=file&path=/&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
type
: File type 【file, task, template】, default templatepath
: File pathReturn Result
object
: File content textUsage Example
<@tools.fileHistoryContent type='file' path='index.html/2020-01-01_01-01-000000'>${object}</@tools.fileHistoryContent>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/fileHistoryContent?type=file&path=index.html/2020-01-01_01-01-000000&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
type
: File type 【file, task, template】, default templatepath
: File pathorderField
: Sort type 【fileName, fileSize, modifiedDate, createDate】, default fileNameReturn Result
list
: File listUsage Example
<@tools.fileHistoryList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileHistoryList>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/fileHistoryList?path=/&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
type
: File type 【file, task, template】, default templatepath
: File pathorderField
: Sort type 【fileName, fileSize, modifiedDate, createDate】, default fileNameReturn Result
list
: File listUsage Example
<@tools.fileList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileList>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/fileList?path=/&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
id
: Layout IDPrint inclusion result
Usage Example
<@tools.includeLayout id='00000000-0000-0000-0000-000000000000'>${index},</@tools.includeLayout>
Parameter List
path
: PathPrint inclusion result
Usage Example
<@tools.includePlace path='00000000-0000-0000-0000-000000000000'/>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/includePlace?path=00000000-0000-0000-0000-000000000000.html&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
id
: Layout IDPrint inclusion result
Usage Example
<@tools.includeRegion id='00000000-0000-0000-0000-000000000000' categoryId=1/>
Parameter List
licenseData
: License file dataReturn Result
result
: Verification result, 【true: Verification successful, false: Verification failed】Usage Example
<@tools.licenseVerify licenseData='content'>${url}</@tools.licenseVerify>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/licenseVerify?licenseData=content', function(data){ console.log(data); }); </script>
Usage Example
<@tools.masterSite>this is a master site</@tools.masterSite>
Return Result
freeMemory
: Free memorytotalMemory
: Total memorymaxMemory
: Maximum memoryUsage Example
<@tools.memory>${totalMemory}</@tools.memory>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/memory?appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
path
: Template pathReturn Result
object
: Metadata
alias
: AliaspublishPath
: Static file pathuseDynamic
: Allow dynamic accessneedLogin
: Need loginneedBody
: Need body fieldacceptParameters
: Accept parameterscacheTime
: Cache timecontentType
: Content typeextendList
: Extend field listparameterTypeMap
: Parameter type mapUsage Example
<@tools.metadata path='index.html'>${object.alias}</@tools.metadata>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/metadata?path=index.html&appToken=Access Token', function(data){ console.log(data.alias); }); </script>
Parameter List
path
: Template pathReturn Result
object
: Metadata
alias
: Aliassize
: Data sizeadminIds
: Front administrator IDsallowContribute
: Allow contributeallowAnonymous
: Allow anonymous contributecoverWidth
: Cover widthcoverHeight
: Cover heightworkflowId
: WorkflowacceptItemTypes
: Accept item typesfieldList
: System field listrequiredFieldList
: Required field listfieldTextMap
: Field text mapextendList
: Extend field listmetadataExtendList
: Metadata extend field listUsage Example
<@tools.placeMetadata path='00000000-0000-0000-0000-000000000000'>${object.alias}</@tools.placeMetadata>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/placeMetadata?path=00000000-0000-0000-0000-000000000000.html&appToken=Access Token', function(data){ console.log(data.alias); }); </script>
Parameter List
email
: Multiple email addressescc
: Multiple CC addressesbcc
: Multiple BCC addressestitle
: TitletemplatePath
: Content template pathcontent
: Email content, valid when templatePath is emptyfileNames
: Multiple attachment namesfilePaths
: Multiple file pathsparameters
: Parameter mapReturn Result
result
: Whether sending is allowed, 【true, false】Usage Example
<@tools.sendEmail email='master@puliccms.com' title='title' content='content' parameters={"parameter1":"value1"}/>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/sendEmail?email=master@puliccms.com&title=title&content=content¶meters.parameter1=value1&appToken=Access Token', function(data){ console.log(data.alias); }); </script>
Return Result
java.version
: Java version numberjava.vendor
: Java vendor specific stringjava.vendor.url
: Java vendor URLjava.home
: Java installation directoryjava.class.version
: Java class version numberjava.class.path
: Java classpathos.name
: Operating System Nameos.arch
: Operating System Architectureos.version
: Operating System Versionfile.separator
: File separator (SEPARATOR on Unix)path.separator
: Path separator (":" on Unix)line.separator
: Line separator ("\n" on Unix)user.name
: User account nameuser.home
: User home directoryuser.dir
: User's current working directoryUsage Example
<@tools.systemProperties>${.vars['java.version']}</@tools.systemProperties>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/systemProperties?appToken=Access Token', function(data){ console.log(data['java.version']); }); </script>
Parameter List
path
: File pathReturn Result
list
: File path listUsage Example
<@tools.templatePlaceList path='index.html'><#list list as a>${a}<#sep>,</#list></@tools.templatePlaceList>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/templatePlaceList?path=index.html&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
path
: File pathReturn Result
list
: Visual region ID listUsage Example
<@tools.templateRegionList path='index.html'><#list list as a>${a}<#sep>,</#list></@tools.templateRegionList>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/templateRegionList?path=index.html&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
parameters
: Parameter maptemplateContent
: Template contentUsage Example
<@tools.templateResult templateContent='${name}' parameters={'name':'value'}/>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/templateResult?path=$%7Bname%7D¶meters.name=value&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
path
: File pathword
: Search termReturn Result
list
: File listUsage Example
<@tools.templateSearchList path='/' word='script'><#list list as a>${a.path}<#sep>,</#list></@tools.templateSearchList>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/templateSearchList?path=/&word=script&appToken=Access Token', function(data){ console.log(data); }); </script>
Parameter List
path
: File pathwidth
: Widthheight
: HeightPrint result file path
Usage Example
<@tools.thumb path='images/logo.jpg' width=100 height=100/>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/thumb?path=images/logo.jpg&width=100&height=100&appToken=Access Token', function(data){ console.log(data.deviceType); }); </script>
Parameter List
userAgent
: User agent, if empty, takes the current request's user agentReturn Result
object.ip
: Client IPobject.browser
: Browserobject.browserType
: Browser typeobject.browserVersion
: Browser versionobject.operatingSystem
: Operating systemobject.operatingSystemVersion
: Operating system versionobject.deviceType
: Device typeobject.userAgent
: User agentUsage Example
<@tools.userAgent>${a.deviceType}</@tools.userAgent>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/userAgent', function(data){ console.log(data.deviceType); }); </script>
Return Result
cms
: CMS versionrevision
: RevisionauthorizationEdition
: Usage authorizationauthorizationStartDate
: Authorization start dateauthorizationEndDate
: Authorization end dateauthorizationOrganization
: Authorized organizationcluster
: Node IDmaster
: Whether management node 【true: Management node, false: Ordinary node】Usage Example
<@tools.version path='/'>${a.fileName}</@tools.version>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/version', function(data){ console.log(data.cms); }); </script>
Parameter List
id
Account ID, returns object
id
: IDamount
: AmountupdateDate
: Update dateids
Multiple account IDs, comma or space separated, takes effect when id is empty, returns map
(id,object
)<@trade.account id=1>${object.amount}</@trade.account>
<@trade.account ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.account>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/account?id=1&appToken=Access Token', function(data){ console.log(data.amount); }); </script>
Parameter List
id
Account history ID, returns object
id
: idserialNumber
: serial numberaccountId
: account iduserId
: operate user idamountChange
: amount changeamount
: amountbalance
: balancestatus
: status(0:pend,1:pay,2:charge,3:refund)description
: descriptioncreateDate
: create dateids
Multiple account history IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id,object
)<@trade.accountHistory id=1>${object.balance}</@trade.accountHistory>
<@trade.accountHistory ids=1,2,3><#list map as k,v>${k}:${v.balance}<#sep>,</#list></@trade.accountHistory>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/accountHistory?id=1&appToken=API access authorization Token', function(data){ console.log(data.balance); }); </script>
Parameter List
accountId
Account IDuserId
Operating user IDstatus
Status,【0:pre-recharge,1:consumption,2:recharge,3:refund】startCreateDate
Start creation date,【2020-01-01 23:59:59】,【2020-01-01】endCreateDate
End creation date,【2020-01-01 23:59:59】,【2020-01-01】orderType
Sort type,【asc:ascending,desc:descending】,default is creation date descendingpageIndex
Page numberpageSize
Items per pageReturn Result
page
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: total countpageSize
: page sizefirstResult
: first result offsetpageIndex
: current page indextotalPage
: total pageslist
: result listpage.list
List type query result entity list
id
: idserialNumber
: serial numberaccountId
: account iduserId
: operate user idamountChange
: amount changeamount
: amountbalance
: balancestatus
: status(0:pend,1:pay,2:charge,3:refund)description
: descriptioncreateDate
: create date<@trade.accountHistoryList pageSize=10><#list page.list as a>${a.amountChange}<#sep>,</#list></@trade.accountHistoryList>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/accountHistoryList?authToken=User login Token&authUserId=User id', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
orderField
Sort field,【amount:amount,updateDate:update date】,default sorts by id according to orderTypeorderType
Sort type,【asc:ascending,desc:descending】,default is descendingpageIndex
Page numberpageSize
Items per pageReturn Result
page
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: total countpageSize
: page sizefirstResult
: first result offsetpageIndex
: current page indextotalPage
: total pageslist
: result listpage.list
List type query result entity list
id
: idamount
: amountupdateDate
: update date<@trade.accountList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.accountList>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/accountList?pageSize=10&appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List Return Result
list
Payment channel name list<@oauth.list><#list list as a>${a}<#sep>,</#list></@oauth.list>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/gatewayList', function(data){ console.log(data); }); </script>
Parameter List
id
Order ID, returns object
id
: iduserId
: user idtitle
: titleamount
: amountpaymentId
: payment idaddress
: addressaddressee
: addresseetelephone
: telephoneip
: ipremark
: remarkstatus
: status(0:pending,1:invalid,2:paid,3:refunded,4:close)confirmed
: confirmedprocessed
: processedprocessUserId
: process user idprocessInfo
: process infoupdateDate
: update datecreateDate
: create dateprocessDate
: process datepaymentDate
: payment dateids
Multiple order IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id,object
)<@trade.order id=1>${object.title}</@trade.order>
<@trade.order ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@trade.order>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/order?id=1&appToken=API access authorization Token', function(data){ console.log(data.title); }); </script>
Parameter List
id
Order history ID, returns object
id
: idorderId
: order idcreateDate
: create dateoperate
: operatecontent
: contentids
Multiple order history IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id,object
)<@trade.orderHistory id=1>${object.amount}</@trade.orderHistory>
<@trade.orderHistory ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.orderHistory>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/orderHistory?id=1&appToken=API access authorization Token', function(data){ console.log(data.amount); }); </script>
Parameter List
orderId
Order IDstartCreateDate
Start creation date,【2020-01-01 23:59:59】,【2020-01-01】endCreateDate
End creation date,【2020-01-01 23:59:59】,【2020-01-01】orderType
Sort type,【asc:ascending,desc:descending】,default is creation date descendingpageIndex
Page numberpageSize
Items per pageReturn Result
page
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: total countpageSize
: page sizefirstResult
: first result offsetpageIndex
: current page indextotalPage
: total pageslist
: result listpage.list
List type query result entity list
id
: idorderId
: order idcreateDate
: create dateoperate
: operatecontent
: content<@trade.orderHistoryList orderId=1 pageSize=10><#list page.list as a>${a.content}<#sep>,</#list></@trade.orderHistoryList>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/orderHistoryList?orderId=1&pageSize=10&appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
User IDpaymentId
Payment IDstatus
Status,【0:pending,1:invalid order,2:paid,3:refunded,4:closed】processed
Processed,【true,false】startCreateDate
Start creation date,【2020-01-01 23:59:59】,【2020-01-01】endCreateDate
End creation date,【2020-01-01 23:59:59】,【2020-01-01】orderType
Sort type,【asc:ascending,desc:descending】,default is publish date descendingpageIndex
Page numberpageSize
Items per pageReturn Result
page
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: total countpageSize
: page sizefirstResult
: first result offsetpageIndex
: current page indextotalPage
: total pageslist
: result listpage.list
List type query result entity list
id
: iduserId
: user idtitle
: titleamount
: amountpaymentId
: payment idaddress
: addressaddressee
: addresseetelephone
: telephoneip
: ipremark
: remarkstatus
: status(0:pending,1:invalid,2:paid,3:refunded,4:close)confirmed
: confirmedprocessed
: processedprocessUserId
: process user idprocessInfo
: process infoupdateDate
: update datecreateDate
: create dateprocessDate
: process datepaymentDate
: payment date<@trade.orderList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.orderList>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/orderList?pageSize=10&authToken=User login Token&authUserId=User id', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
Order product ID, returns object
id
: idorderId
: order idcontentId
: content idproductId
: product idprice
: pricequantity
: quantityamount
: amountremark
: remarkids
Multiple order product IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id,object
)<@trade.orderProduct id=1>${object.quantity}</@trade.orderProduct>
<@trade.orderProduct ids=1,2,3><#list map as k,v>${k}:${v.quantity}<#sep>,</#list></@trade.orderProduct>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/orderProduct?id=1&appToken=API access authorization Token', function(data){ console.log(data.quantity); }); </script>
Parameter List
orderId
Order IDpageIndex
Page numberpageSize
Items per pageReturn Result
page
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: total countpageSize
: page sizefirstResult
: first result offsetpageIndex
: current page indextotalPage
: total pageslist
: result listpage.list
List type query result entity list
id
: idorderId
: order idcontentId
: content idproductId
: product idprice
: pricequantity
: quantityamount
: amountremark
: remark<@trade.orderProductList orderId=1 pageSize=10><#list page.list as a>${a.productId}<#sep>,</#list></@trade.orderProductList>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/orderProductList?orderId=1&pageSize=10&appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
Payment order ID, returns object
id
: iduserId
: user idamount
: amountdescription
: descriptiontradeType
: trade type(recharge,product)serialNumber
: serial numberaccountType
: account type(account,alipay,wechat)accountSerialNumber
: account serial numberip
: ipstatus
: status(0:pending pay,1:paid,2:pending refund,3:refunded,4:closed)processed
: processedprocessUserId
: process user idupdateDate
: update datecreateDate
: create dateprocessDate
: process datepaymentDate
: payment dateids
Multiple payment order IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id,object
)<@trade.payment id=1>${object.amount}</@trade.payment>
<@trade.payment ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.payment>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/payment?id=1&appToken=API access authorization Token', function(data){ console.log(data.amount); }); </script>
Parameter List
id
Payment order history ID, returns object
id
: idpaymentId
: payment idcreateDate
: create dateoperate
: operatecontent
: contentids
Multiple payment order history IDs, separated by commas or spaces, takes effect when id is empty, returns map
(id,object
)<@trade.paymentHistory id=1>${object.content}</@trade.paymentHistory>
<@trade.paymentHistory ids=1,2,3><#list map as k,v>${k}:${v.content}<#sep>,</#list></@trade.paymentHistory>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/paymentHistory?id=1&appToken=API access authorization Token', function(data){ console.log(data.content); }); </script>
Parameter List
paymentId
Payment IDstartCreateDate
Start creation date,【2020-01-01 23:59:59】,【2020-01-01】endCreateDate
End creation date,【2020-01-01 23:59:59】,【2020-01-01】orderType
Sort type,【asc:ascending,desc:descending】,default is creation date descendingpageIndex
Page numberpageSize
Items per pageReturn Result
page
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: total countpageSize
: page sizefirstResult
: first result offsetpageIndex
: current page indextotalPage
: total pageslist
: result listpage.list
List type query result entity list
id
: idpaymentId
: payment idcreateDate
: create dateoperate
: operatecontent
: content<@trade.paymentHistory paymentId=1 pageSize=10><#list page.list as a>${a.content}<#sep>,</#list></@trade.paymentHistory>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/paymentHistory?paymentId=1&pageSize=10&appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
userId
User IDtradeType
Payment type, 【recharge: recharge, product: product】serialNumber
Transaction numberaccountType
Account type, 【account: account, alipay: Alipay, wechat: WeChat】accountSerialNumber
Account transaction numberstatus
Status, 【0: pending payment, 1: paid, 2: pending refund, 3: refunded, 4: closed】startCreateDate
Start creation date, 【2020-01-01 23:59:59】, 【2020-01-01】endCreateDate
End creation date, 【2020-01-01 23:59:59】, 【2020-01-01】orderType
Sort type, 【asc: ascending, desc: descending】, default is publish date descendingpageIndex
Page numberpageSize
Items per pageReturn Result
page
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
List type query result entity list
id
: IDuserId
: User IDamount
: Amountdescription
: DescriptiontradeType
: Trade type (recharge, product)serialNumber
: Serial numberaccountType
: Account type (account, alipay, wechat)accountSerialNumber
: Account serial numberip
: IPstatus
: Status (0: pending pay, 1: paid, 2: pending refund, 3: refunded, 4: closed)processed
: ProcessedprocessUserId
: Process user IDupdateDate
: Update datecreateDate
: Create dateprocessDate
: Process datepaymentDate
: Payment date<@trade.paymentList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.paymentList>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/paymentList?pageSize=10&authToken=User login Token&authUserId=User ID', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
Refund ID, returns object
id
: IDuserId
: User IDpaymentId
: Payment IDamount
: Apply amountreason
: ReasonupdateDate
: Update daterefundUserId
: Refund user IDrefundAmount
: Refund amountstatus
: Status (0: pending, 1: refunded, 2: cancelled, 3: refuse, 4: fail)reply
: ReplycreateDate
: Create dateprocessingDate
: Process dateids
Multiple refund IDs, comma or space separated, takes effect when id is empty, returns map
(id, object
)<@trade.refund id=1>${object.amount}</@trade.refund>
<@trade.refund ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.refund>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/refund?id=1&appToken=API access authorization Token', function(data){ console.log(data.amount); }); </script>
Parameter List
userId
User IDpaymentId
Payment IDrefundUserId
Refund operation user IDstatus
Status, 【0: pending, 1: refunded, 2: cancelled, 3: refused, 4: failed】startCreateDate
Start creation date, 【2020-01-01 23:59:59】, 【2020-01-01】endCreateDate
End creation date, 【2020-01-01 23:59:59】, 【2020-01-01】orderType
Sort type, 【asc: ascending, desc: descending】, default is creation date descendingpageIndex
Page numberpageSize
Items per pageReturn Result
page
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
List type query result entity list
id
: IDuserId
: User IDpaymentId
: Payment IDamount
: Apply amountreason
: ReasonupdateDate
: Update daterefundUserId
: Refund user IDrefundAmount
: Refund amountstatus
: Status (0: pending, 1: refunded, 2: cancelled, 3: refuse, 4: fail)reply
: ReplycreateDate
: Create dateprocessingDate
: Process date<@trade.refundList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.refundList>
<script> $.getJSON('${site.dynamicPath}api/directive/trade/refundList?pageSize=10&authToken=User login Token&authUserId=User ID', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
visitDate
: Visit date, 【2020-01-01】visitHour
: Visit hour, 【-1-23】, -1 means full day data, returns object
when both parameters are not empty
id
: IDpv
: Page viewsuv
: User viewsipviews
: IP viewsUsage Example
<@visit.day visitDate='2020-01-01' visitHour=9>${object.pv}</@visit.day>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/day?visitDate=2020-01-01&visitHour=9&appToken=API access authorization Token', function(data){ console.log(data.pv); }); </script>
Parameter List
startVisitDate
: Start visit date, 【2020-01-01 23:59:59】, 【2020-01-01】endVisitDate
: End visit date, 【2020-01-01 23:59:59】, 【2020-01-01】hourAnalytics
: Hourly statistics, 【true, false】, default falsepageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: IDpv
: Page viewsuv
: User viewsipviews
: IP viewsUsage Example
<@visit.dayList hourAnalytics=false><#list page.list as a>${a.pv}<#sep>,</#list></@visit.dayList>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/dayList?hourAnalytics=false&appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
id
: Record ID, returns object
sessionId
: Session IDvisitDate
: Visit datevisitHour
: Visit houruserId
: Visit userip
: IPuserAgent
: User agent browser identifierurl
: TitlescreenWidth
: Screen widthscreenHeight
: Screen heightrefererUrl
: Referer URLitemType
: Item typeitemId
: Item IDcreateDate
: Creation dateids
: Multiple record IDs, comma or space separated, takes effect when id is empty, returns map
(id, object
)<@visit.history id=1>${object.title}</@visit.history>
<@visit.history ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@visit.history>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/history?id=1&appToken=API access authorization Token', function(data){ console.log(data.title); }); </script>
Parameter List
sessionId
: Session IDip
: IPurl
: URLstartCreateDate
: Start creation date, 【2020-01-01 23:59:59】, 【2020-01-01】endCreateDate
: End creation date, 【2020-01-01 23:59:59】, 【2020-01-01】orderType
: Sort type, 【asc: ascending, desc: descending】, default is creation date descendingpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
sessionId
: Session IDvisitDate
: Visit datevisitHour
: Visit houruserId
: Visit userip
: IPuserAgent
: User agent browser identifierurl
: TitlescreenWidth
: Screen widthscreenHeight
: Screen heightrefererUrl
: Referer URLitemType
: Item typeitemId
: Item IDcreateDate
: Creation dateUsage Example
<@visit.historyList hourAnalytics=false><#list page.list as a>${a.url}<#sep>,</#list></@visit.historyList>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/historyList?hourAnalytics=false&appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
visitDate
: Visit date, 【2020-01-01】itemType
: Visit item type, 【category, content, user, etc. from page statistics itemType】itemId
: Visit item ID, returns object
when all three parameters are not empty
id
: IDpv
: Page viewsuv
: User viewsipviews
: IP viewsUsage Example
<@visit.item visitDate='2020-01-01' visitHour=9>${object.pv}</@visit.item>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/item?visitDate=2020-01-01&itemType=content&itemId=1&appToken=API access authorization Token', function(data){ console.log(data.pv); }); </script>
Parameter List
startVisitDate
: Start visit date, 【2020-01-01 23:59:59】, 【2020-01-01】endVisitDate
: End visit date, 【2020-01-01 23:59:59】, 【2020-01-01】dayAnalytics
: Daily statistics, 【true, false】, default trueitemType
: Item type, 【category, content, user, etc. from page statistics itemType】itemId
: Item IDpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: IDpv
: Page viewsuv
: User viewsipviews
: IP viewsUsage Example
<@visit.itemList itemType='content'><#list page.list as a>${a.pv}<#sep>,</#list></@visit.itemList>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/itemList?itemType=content&appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
visitDate
: Visit date, 【2020-01-01】sessionId
: Session ID, returns object
when both parameters are not empty
id
: IDlastVisitDate
: Last visit datefirstVisitDate
: First visit dateip
: IPpv
: Page viewsUsage Example
<@visit.session visitDate='2020-01-01' sessionId='xxxx-xxxx-xxxx'>${object.pv}</@visit.session>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/session?visitDate=2020-01-01&sessionId=xxxx-xxxx-xxxx&appToken=API access authorization Token', function(data){ console.log(data.pv); }); </script>
Parameter List
sessionId
: Session IDip
: IPstartVisitDate
: Start visit date, 【2020-01-01 23:59:59】, 【2020-01-01】endVisitDate
: End visit date, 【2020-01-01 23:59:59】, 【2020-01-01】orderType
: Sort type, 【asc: ascending, desc: descending】, default is creation date descendingpageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: IDlastVisitDate
: Last visit datefirstVisitDate
: First visit dateip
: IPpv
: Page viewsUsage Example
<@visit.sessionList><#list page.list as a>${a.pv}<#sep>,</#list></@visit.sessionList>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/sessionList?appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
visitDate
: Visit date, 【2020-01-01】urlMd5
: URL MD5urlSha
: URL SHA, returns object
when all three parameters are not empty
id
: IDurl
: URLpv
: Page viewsuv
: User viewsipviews
: IP viewsUsage Example
<@visit.url visitDate='2020-01-01' urlMd5='md5' urlSha='sha'>${object.pv}</@visit.url>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/url?visitDate=2020-01-01&urlMd5=MD5&urlSha=sha&appToken=API access authorization Token', function(data){ console.log(data.pv); }); </script>
Parameter List
url
: URLstartVisitDate
: Start visit date, 【2020-01-01 23:59:59】, 【2020-01-01】endVisitDate
: End visit date, 【2020-01-01 23:59:59】, 【2020-01-01】pageIndex
: Page numberpageSize
: Items per pageReturn Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listpage.list
: List type query result entity list
id
: IDurl
: URLpv
: Page viewsuv
: User viewsipviews
: IP viewsUsage Example
<@visit.urlList><#list page.list as a>${a.pv}<#sep>,</#list></@visit.urlList>
<script> $.getJSON('${site.dynamicPath}api/directive/visit/urlList?appToken=API access authorization Token', function(data){ console.log(data.page.totalCount); }); </script>
Parameter List
Return Result
ConfuseResult
: map{text: encrypted text, font: encrypted font}<#assign result=confuse('Tianjin Heihe Technology Co., Ltd',11)/> <style> @font-face {font-family:confuse;src:url(${result.font});} #content{font-family:confuse !important;} </style> <div id="content">${(result.text)!}</div>
<script> $.getJSON('${site.dynamicPath}api/method/confuse?parameters=aaa&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
Return Result
ConfuseResult
: map{text: encrypted text, font: encrypted font}<#assign result=confuseHtml('<a href="http://www.publiccms.com">publiccms</a>',11)/> <style> @font-face {font-family:confuse;src:url(${result.font});} #content{font-family:confuse !important;} </style> <div id="content">${(result.text?no_esc)!}</div> <script> var elements = document.querySelectorAll('#content > *'); elements.forEach(function(element) { if(element.style.fontFamily){ element.style.fontFamily='confuse,'+element.style.fontFamily; } }); </script>
<script> $.getJSON('${site.dynamicPath}api/method/confuseHtml?parameters=aaa&appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
Return Result
attribute
: Category extended data (field code, value
)Usage Example
<#assign attribute=getCategoryAttribute(1)/<
${attribute.title!}
<script> $.getJSON('${site.dynamicPath}api/method/getCategoryAttribute?parameters=1', function(data){ console.log(data.title); }); </script>
Parameter List
Return Result
map
(id, attribute
: category extended data (field code, value
))Usage Example
<#assign attributeMap=getCategoryAttributes('1,2,3,4')/<
${attributeMap['1'].title!}
<script> $.getJSON('${site.dynamicPath}api/method/getCategoryAttributes?parameters=1,2,3,4', function(data){ console.log(data); }); </script>
Parameter List
Return Result
attribute
: Content extended data (field code, value
)Usage Example
<#assign attribute=getContentAttribute(1)/<
${(attribute.text?no_esc)!}
<script> $.getJSON('${site.dynamicPath}api/method/getContentAttribute?appToken=API access authorization Token¶meters=1', function(data){ console.log(data.text); }); </script>
Parameter List
Return Result
map
(id, attribute
: content extended data (field code, value
))Usage Example
<#assign attributeMap=getContentAttributes('1,2,3,4')/<
${attributeMap['1'].text?no_esc!}
<script> $.getJSON('${site.dynamicPath}api/method/getContentAttributes?appToken=API access authorization Token¶meters=1,2,3,4', function(data){ console.log(data); }); </script>
Parameter List
Return Result
page
:
DEFAULT_PAGE_SIZE
: Default items per pageMAX_PAGE_SIZE
: Maximum items per pagetotalCount
: Total countpageSize
: Items per pagefirstResult
: Current starting position offsetpageIndex
: Current page numbertotalPage
: Total pageslist
: Result listtext
: Article contentUsage Example
<#assign textPage=getContentPage(attribute.text,2)/<
${textPage.text?no_esc!} current page :${textPage.page.pageIndex}
<script> $.getJSON('${site.dynamicPath}api/method/getContentAttributes?parameters=Content¶meters=2', function(data){ console.log(data.text); }); </script>
Parameter List
Return Result
date
: Date${getDate('thisSunday','2020-01-01')}
<script> $.getJSON('${site.dynamicPath}api/method/getDate?parameters=thisSunday¶meters=2020-01-01', function(data){ console.log(data); }); </script>
Return Result
string
Custom word segmentation dictionary${getDict()}
<script> $.getJSON('${site.dynamicPath}api/method/getDict?appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Return Result
boolean
Whether dictionary is enabled${getDictEnable()}
<script> $.getJSON('${site.dynamicPath}api/method/getDictEnable', function(data){ console.log(data); }); </script>
Parameter List
Return Result
url
: File upload prefixUsage Example
${getFileUploadPrefix()}
<script> $.getJSON('${site.dynamicPath}api/method/getFileUploadPrefix', function(data){ console.log(data); }); </script>
Return Result
font list
: Font name listUsage Example
<#list getFontList() as font>${font}</#list>
<script> $.getJSON('${site.dynamicPath}api/method/getFontList?appToken=API access authorization Token', function(data){ console.log(data); }); </script>
Parameter List
Return Result
string
: Hash valueUsage Example
${getHash('aaa')}
<script> $.getJSON('${site.dynamicPath}api/method/getHash?parameters=aaa', function(data){ console.log(data); }); </script>
Parameter List
url
:map
type or string
type, empty for GET request, non-empty for POST requestmap
typeReturn Result
html
: Page textUsage Example
${getHtml('https://www.publiccms.com/')}
${getHtml('https://www.publiccms.com/',"body")}
${getHtml('https://www.publiccms.com/',{"parameters1":"value1","parameters2":"value2"},{"headers1":"value1","headers2":"value2"})}
<script> $.getJSON('${site.dynamicPath}api/method/getHtml?appToken=API access authorization Token¶meters=https://www.publiccms.com/', function(data){ console.log(data); }); </script>
Return Result
string
IP${getIpRegion('127.0.0.1')}
<script> $.getJSON('${site.dynamicPath}api/method/getIpRegion?parameters=127.0.0.1', function(data){ console.log(data); }); </script>
Parameter List
Return Result
number
: Numeric valueUsage Example
${getIpv4Number('127.0.0.1')}
<script> $.getJSON('${site.dynamicPath}api/method/getIpv4Number?parameters=127.0.0.1', function(data){ console.log(data); }); </script>
Parameter List
Return Result
number string
: String format numberUsage Example
${getIpv6Number('FF01:0:0:0:0:0:0:1101')}
<script> $.getJSON('${site.dynamicPath}api/method/getIpv4Number?parameters=FF01:0:0:0:0:0:0:1101', function(data){ console.log(data); }); </script>
Parameter List
Return Result
list
(string
): Word segmentation result setUsage Example
<#list getKeywords('This is a sentence') as a>${a}<#sep>,</#list><
<script> $.getJSON('${site.dynamicPath}api/method/getKeywords?parameters=This is a sentence', function(data){ console.log(data); }); </script>
Parameter List
Return Result
style
: Replaced stylesheetUsage Example
${getLayoutStyle('/* selecter */','.diy-layout')}
<script> $.getJSON('${site.dynamicPath}api/method/getLayoutStyle?appToken=API access authorization Token¶meters=/* selecter */¶meters=.diy-layout', function(data){ console.log(data); }); </script>
Return Result
license
: License data
Usage Example
${getLicense().domain}
<script> $.getJSON('${site.dynamicPath}api/method/getLicense?appToken=API access authorization Token, function(data){ console.log(data); }); </script>
Return Result
string
: Base64 encoded license dataUsage Example
${getLicenseData()}
<script> $.getJSON('${site.dynamicPath}api/method/getLicenseData, function(data){ console.log(data); }); </script>
Parameter List
Return Result
string
: MD5 valueUsage Example
${getMd5('aaa')}
<script> $.getJSON('${site.dynamicPath}api/method/getMd5?parameters=aaa', function(data){ console.log(data); }); </script>
Parameter List
url
pageIndex
: Page numberstring
: Pagination parameter, dynamic URL pagination parameter name, empty returns static URL pagination resultReturn Result
url
: URL with paginationUsage Example
${getPage('https://www.publiccms.com/introduction/index_3.html',2)}
${getPage('https://search.publiccms.com/?word=cms',2,'pageIndex')}
<script> $.getJSON('${site.dynamicPath}api/method/getHash?parameters=https://www.publiccms.com/introduction/index_3.html¶meters=2', function(data){ console.log(data); }); </script>
Return result
list
: Parameter type namesUsage example
<#list getParameterTypeList() as a>${a}<#sep>,</#list>
<script> $.getJSON('${site.dynamicPath}api/method/getParameterTypeList?appToken=API access token', function(data){ console.log(data); }); </script>
Parameter list
Return result
attribute
: Recommended content extended data (field code, value
)Usage example
<#assign attribute=getContentAttribute(1)/<
${(attribute.description)!}
<script> $.getJSON('${site.dynamicPath}api/method/getContentAttribute?appToken=API access token¶meters=1', function(data){ console.log(data.description); }); </script>
Parameter list
Return result
map
(id, attribute
: Recommended content extended data (field code, value
))Usage example
<#assign attributeMap=getPlaceAttributes('1,2,3,4')/<
${attributeMap['1'].description!}
<script> $.getJSON('${site.dynamicPath}api/method/getPlaceAttributes?parameters=1,2,3,4', function(data){ console.log(data); }); </script>
Parameter list
url
, file URLexpiryMinutes
, expiration minutes, optionalstring
, file name, optionalReturn result
url
: Absolute path URLUsage example
${getPrivateUrl('index.html')}
<script> $.getJSON('${site.dynamicPath}api/method/getPrivateUrl?appToken=API access token¶meters=index.html', function(data){ console.log(data); }); </script>
Return result
list
: Parameter type namesUsage example
<#list getProcessTypeList() as a>${a}<#sep>,</#list>
<script> $.getJSON('${site.dynamicPath}api/method/getProcessTypeList?appToken=API access token', function(data){ console.log(data); }); </script>
Parameter list
number
: Maximum number, optionalReturn result
number
: Random numberUsage example
${getRandom()}
${getRandom(100)}
<script> $.getJSON('${site.dynamicPath}api/method/getRandom?parameters=100', function(data){ console.log(data); }); </script>
Parameter list
Return result
string
: SHA1 valueUsage example
${getSha1('aaa')}
<script> $.getJSON('${site.dynamicPath}api/method/getSha1?parameters=aaa', function(data){ console.log(data); }); </script>
Parameter list
Return result
string
: SHA256 valueUsage example
${getSha256('aaa')}
<script> $.getJSON('${site.dynamicPath}api/method/getSha256?parameters=aaa', function(data){ console.log(data); }); </script>
Parameter list
Return result
string
: SHA512 valueUsage example
${getSha512('aaa')}
<script> $.getJSON('${site.dynamicPath}api/method/getSha512?parameters=aaa', function(data){ console.log(data); }); </script>
Parameter list
Return result
sitefile
:
Usage example
${(getSitefile('aaa-site.zip').name)!}
<script> $.getJSON('${site.dynamicPath}api/method/getSitefile?appToken=API access token¶meters=aaa-site.zip', function(data){ console.log(data); }); </script>
Return result
string
: Dictionary ignored words${getSkipWord()}
<script> $.getJSON('${site.dynamicPath}api/method/getRandom?appToken=API access token', function(data){ console.log(data); }); </script>
Parameter list
number
: Sleep time 0-60 secondsReturn result
boolean
: Whether sleptUsage example
${getSleep(5)}
Parameter list
Return result
string
: Parsing resultUsage example
${getTemplateResult('${.now}')}
<script> $.getJSON('${site.dynamicPath}api/method/getDate?appToken=API access token¶meters=${.now}', function(data){ console.log(data); }); </script>
Parameter list
Return result
string
: Text resultUsage example
${getTextFromHtml('<a href="http://www.publiccms.com/">publiccms</a>')}
<script> $.getJSON('${site.dynamicPath}api/method/getTextFromHtml?parameters=<a href="http://www.publiccms.com/">publiccms</a>', function(data){ console.log(data); }); </script>
Return result
string
: Random UUIDUsage example
${getUUID()}
<script> $.getJSON('${site.dynamicPath}api/method/getUUID', function(data){ console.log(data); }); </script>
Parameter list
url
, when the second is empty, treat the first parameter as URLReturn result
url
: Absolute path URLUsage example
${getUrl(site.sitePath,'index.html')} ${getUrl('index.html')}
<script> $.getJSON('${site.dynamicPath}api/method/getUrl?parameters=index.html', function(data){ console.log(data); }); </script>
Parameter list
string
: XML textReturn result
xml
: XML modelUsage example
${getXml('<xml><data>value</data></xml>').xml.data}