REST API End Points - Documentation topics on: apis,end point,java api,jersey,rest,.

REST API End Points

This document lists all of the publicly exposed end points in the dotCMS code base.

Important Notes:

  • Although some of these methods (e.g. HTTP GET methods) may be accessed via a URL, the ideal way of accessing them is through the dotCMS back-end, since some of them depend on values associated with a form, or HTML request or session values.
    • Accessing some of these end-points via a URL will cause an error, unless an appropriate tool (e.g. curl) is used to supply the appropriate data to the request or session object.
  • End-points which are intended to be accessible from a URL (e.g. end-points using HTTP GET methods) include a demo Link next to the method Description and Example.
    • These demo links run against the dotCMS Demo Site to demonstrate use of the end point.
  • Many of these end-points require appropriate Permissions on the dotCMS site to work.
    • These end-points - and any demo Links in the tables below - will fail if you do not first login to the site.
    • To enable the demo Links below, you can login to the dotCMS Demo Site with the user name admin and password admin.
  • Even for end-points that cannot be accessed via a URL, the URL is provided so that developers can easily look for the Javascript code that is making the Ajax call to the exposed back-end services.
    • If it’s not possible to get to any end-point through the dotCMS UI, you can use the Postman Chrome extension to access the end-points directly, when possible.

For more information on how to call each of the APIs, please see Calling the API below, and refer to the example provided for the specific API call.

Calling the API

There are two sections of the dotCMS REST API: The Standard API and Rules Engine API. The format used to call the API varies for each section of the API and each call, as outlined for each class below.

Standard API

Calls to the Standard API are made in the following form:

http://host.domain/api/api_name/api_call/arguments

Rules API

Calls to the Rules API are made in similar form, except:

  • The Rules API requires specification of the API version (current version is /v1).
  • The Rules API calls often allow more specific identification of the system objects being referenced, in a standard form that follows the path of the class being referenced:
http://host.domain/api**/v1**/api_path/api_name/api_call/arguments

Documentation Conventions

Please note the following for each of the API paths and examples below:

  • The api_path, api_name, and api_call values vary for each API call, and are shown in red in each of the specific examples below.
  • Values displayed in green italics in the below examples should be replaced with specific values for your desired call.

Standard REST API

The following classes use the traditional calling conventions of the Standard REST API. Most of these methods are supported in earlier version of dotCMS (dotCMS release 3.3 and below). For the specific methods available, see the documentation for each specific class.

com/dotcms/rest/AuditPublishingResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
getGETUsed by the sending server to request a status update from the receiver.
/api/auditPublishing/get/[BUNDLE ID]
Yes

com/dotcms/rest/BaseRestPortlet.java

End PointHTTP
Method
Description and ExampleLogin
Required
getLayoutGET
/api/layout/getLayout
Yes

com/dotcms/rest/BundlePublisherResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
publishPOSTCreate a bundle and publish it. Waits for the process to start before returning.
/api/bundlePublisher/publish
Yes

com/dotcms/rest/BundleResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
getUnsendBundlesGETDisplay a list of bundles that have not yet been sent.
/api/bundle/getunsendbundles/userid/[USER ID]
YesLink
updateBundleGETChange the name of a bundle.
/api/bundle/updatebundle/bundleid/[BUNDLE ID]?bundleName=newname
Yes
deletePushHistoryGETDelete the Push History for a piece of Content.
/api/bundle/deletepushhistory/assetid/[ASSET ID]
YesLink
deleteEnvironmentPushHistoryGETDelete the Push History for an entire Publishing environment
/api/bundle/deleteenvironmentpushhistory/environmentid/[ENVIRONMENT ID]
Yes

com/dotcms/rest/CMSConfigResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
saveCompanyBasicInfoPOSTSave the company Basic Information.
/api/config/saveCompanyBasicInfo
Yes
saveCompanyLocaleInfoPOSTSave the company Locale info.
/api/config/saveCompanyLocaleInfo
Yes
saveCompanyAuthTypeInfoPOSTSave the company authorization info.
/api/config/saveCompanyAuthTypeInfo
Yes
saveCompanyLogoPOSTUpload a new company logo image.
/api/config/saveCompanyLogo
Yes
deleteEnvironmentPOSTDelete a publishing environment.
/api/config/deleteEnvironment
Yes
deleteEndpointPOSTDelete an endpoint from a publishing environment.
/api/config/deleteEndpoint
Yes

com/dotcms/rest/ContentResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
indexSearchGETPerform an ElasticSearch query and return the results.
/api/content/indexsearch/+structurename:webpagecontent/sortby/modDate/limit/20/offset/0
NoLink
indexCountGETCount the number of results returned in an ElasticSearch query.
/api/content/indexcount/+structurename:webpagecontent
NoLink
lockContentPUTLock a piece of content, specified by inode.
/api/content/lock/inode/[CONTENT INODE]
Yes
canLockPUTReturns whether the content can be locked (by the logged in user).
/api/content/canlock/inode/[CONTENT INODE]
Yes
unlockContentPUTUnlock a piece of content, specified by inode.
/api/content/unlock/inode/[CONTENT INODE]
Yes
getContentGETRetrieve content using an ElasticSearch query.
/api/content/render/false/query/+contentType:webPageContent%20+(conhost:48190c8c-42c4-46af-8d1a-0cd5db894797%20conhost:SYSTEM_HOST)%20+languageId:1%20+deleted:false%20+working:true/orderby/modDate%20desc
NoLink
multipartPUTPUTCreate new content on your dotCMS site.
For an example of using a multipartPOST, please see the Content API - JSON & Binary Submit documentation, and replace "POST" with "PUT".
Yes
multipartPOSTPOSTCreate new content on your dotCMS site.
For an example of using a multipartPUT, please see the Content API - JSON & Binary Submit documentation.
Yes
singlePUTPUTCreate new content on your dotCMS site.
For an example of using a singlePUT, please see the Save Content Using REST API documentation.
Yes
singlePOSTPOSTCreates new content on your dotCMS site.
For an example of using a singlePOST, please see the Save Content Using REST API documentation, and replace -XPUT with -XPOST.
Yes

com/dotcms/rest/EnvironmentResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
loadEnvironmentsGETReturn a JSON representation of the environments (with servers) that the Role with the given roleid can push to.
/api/environment/loadenvironments/roleId/[ROLE ID]/
Yes

com/dotcms/rest/JSPPortlet.java

End PointHTTP
Method
Description and ExampleLogin
Required
layoutGetGET
/api/portlet//
Yes
layoutPostPOST
/api/portlet//
Yes

com/dotcms/rest/LicenseResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
getAllGETRetrieve the license info (the contents of the License Manager screen).
/api/license/all/
Yes
putZipFilePOSTUpload a license pack.
/api/license/upload/
Yes
deleteDELETEDelete one of the available licenses in a license pack.
/api/license/delete/id/[LICENSE ID]
Yes
pickLicensePOSTSelect one of the available licenses from a (already uploaded) license pack.
/api/license/pick/serial/[LICENSE ID]
Yes
freeLicensePOSTUnlock an already picked license from a license pack.
/api/license/free/serial/[LICENSE ID]/serverid/[SERVER ID]/
Yes
requestLicensePOSTRequest a trial license.
/api/license/requestCode/
Yes
applyLicensePOSTApply a license key received from dotCMS or downloaded from the dotCMS support portal.
/api/license/applyLicense/serial/[LICENSE ID]
Yes
resetLicensePOSTReset License Identity.
/api/license/resetLicense/
Yes

com/dotcms/rest/NotificationResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
getNotificationsGETRetrieve the notifications available.
/api/notification/getNotifications/allusers/[TRUE or FALSE]/
YesLink
getNewNotificationsCountGETRetrieve the count of new Notifications Note: This is refreshed (and cleared) every 5 seconds.
/api/notification/getNewNotificationsCount/allusers/[TRUE or FALSE]/
YesLink

com/dotcms/rest/OSGIResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
getNotificationsGETList Loaded OSGI Plugins.
/api/osgi/getInstalledBundles/ignoreSystemBundles/true/type/json
YesLink

com/dotcms/rest/RestExamplePortlet.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
loadJsonGETDisplay the REST API JSON example code (available from “Rest Example Portlet”).
/api/restexample/test/
NoLink

com/dotcms/rest/RoleResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
loadchildrenGETDisplay child Roles.
/api/role/loadchildren/
YesLink
loadbyidGETLoad a Role by the Role ID.
/api/role/loadbyid/id/[ROLE ID]/r/8026756389329
Yes
loadbynameGETLoad a Role by the Role name.
/api/role/loadbyname/name/[ROLE NAME]/
YesLink

com/dotcms/rest/RulesEnginePortlet.java

No methods available.

com/dotcms/rest/StructureResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
getStructuresWithWYSIWYGFieldsGETList structures that contain WYSIWYG fields.
/api/structure/
Yes

com/dotcms/rest/TagResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
listGETList tags added to the Visitor object.
/api/v1/tags
NoLink

com/dotcms/rest/UserResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
getloggedinuserGETDeprecated
Get the currently logged in user.
/api/user/getloggedinuser

Note: This returns the same information (in a different order) as the current method of the Rules REST API UserResource.java class.
YesLink

com/dotcms/rest/UtilResource.java

Please see UserResource, above.

com/dotcms/rest/WidgetResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
getWidgetGET
/api/widget/id/[WIDGET ID]
NoLink

Rules REST API

The following classes use the new calling conventions of the Rules REST API. For the specific methods available, see the documentation for each specific class.

com/dotcms/rest/api/v1/personas/PersonaResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
listGETList all Personas on a site.
Note: The site ID is read from the com.dotmarketing.session_host session key.
/api/v1/personas
YesLink

com/dotcms/rest/api/v1/sites/ruleengine/rules/actions/ActionResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
selfGETRetrieve information about an Action on a site.
/api/v1/sites/[SITE ID]/ruleengine/actions/[ACTION ID]
YesLink
addPOSTAdd an Action to a site.
/api/v1/sites/[SITE ID]/ruleengine/actions
Yes
updatePUTUpdate an Action on a site.
/api/v1/sites/[SITE ID]/ruleengine/actions/[ACTION ID]
Yes
removeDELETEDelete an Action from a site.
/api/v1/sites/[SITE ID]/ruleengine/actions/[ACTION ID]
Yes

For more information on these end points, please see the Actions REST API documentation.

com/dotcms/rest/api/v1/sites/ruleengine/rules/conditions/ConditionGroupResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
listGETList Conditions groups for a Rule.
/api/v1/sites/[SITE ID]/ruleengine/rules/[RULE ID]/conditionGroups
YesLink
selfGETRetrieve information about a Condition group.
/api/v1/sites/[SITE ID]/ruleengine/rules/[RULE ID]/conditionGroups/[CONDITION GROUP ID]
YesLink
addPOSTAdd a Condition group to a Rule.
/api/v1/sites/[SITE ID]/ruleengine/rules/[RULE ID]/conditionGroups
Yes
updatePUTUpdate a Condition Group in a Rule.
/api/v1/sites/[SITE ID]/ruleengine/rules/[RULE ID]/conditionGroups/[CONDITION GROUP ID]
Yes
removeDELETERemove a Condition group from a Rule.
/api/v1/sites/[SITE ID]/ruleengine/rules/[RULE ID]/conditionGroups/[CONDITION GROUP ID]
Yes

For more information on these end points, please see the Conditions REST API documentation.

com/dotcms/rest/api/v1/sites/ruleengine/rules/conditions/ConditionResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
selfGETRetrieve information about a Condition on a site.
/api/v1/sites/[SITE ID]/ruleengine/conditions/[CONDITION ID]
YesLink
addPOSTAdd a Condition to a site.
/api/v1/sites/[SITE ID]/ruleengine/conditions
Yes
updatePUTUpdate a Condition on a site.
/api/v1/sites/[SITE ID]/ruleengine/conditions/[CONDITION ID]
Yes
removeDELETEDelete a Condition from a site.
/api/v1/sites/[SITE ID]/ruleengine/conditions/[CONDITION ID]
Yes

For more information on these end points, please see the Conditions REST API documentation.

com/dotcms/rest/api/v1/sites/ruleengine/rules/conditions/ConditionValueResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
listGETList values of a Condition.
/api/v1/sites/[SITE ID]/ruleengine/conditions/[CONDITION ID]/conditionValues
YesLink
selfGETRetrieve information about a specific Condition value.
/api/v1/sites/[SITE ID]/ruleengine/conditions/[CONDITION ID]/conditionValues/[CONDITION VALUES ID]
YesLink
addPOSTAdd a value to a Condition.
/api/v1/sites/[SITE ID]/ruleengine/conditions/[CONDITION ID]/conditionValues
Yes
updatePUTUpdate the a Condition value.
/api/v1/sites/[SITE ID]/ruleengine/conditions/[CONDITION ID]/conditionValues/[CONDITION VALUES ID]
Yes
removeDELETERemove a value from a Condition.
/api/v1/sites/[SITE ID]/ruleengine/conditions/[CONDITION ID]/conditionValues/[CONDITION VALUES ID]
Yes

com/dotcms/rest/api/v1/sites/ruleengine/rules/RuleResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
listGETList all Rules.
/api/v1/sites/[SITE ID]/ruleengine/rules
YesLink
selfGETRetrieve information about an individual Rule.
/api/v1/sites/[SITE ID]/ruleengine/rules/[RULE ID]
YesLink
addPOSTAdd a Rule.
/api/v1/sites/[SITE ID]/ruleengine/rules
Yes
updatePUTEnable or disable a Rule.
/api/v1/sites/[SITE ID]/ruleengine/rules/[RULE ID]
Yes
removeDELETERemove a Rule.
/api/v1/sites/[SITE ID]/ruleengine/rules/[RULE ID]
Yes

com/dotcms/rest/api/v1/system/i18n/I18NResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
listGETRetrieve the value of the specified language variable for the specified language or country.
/api/v1/system/i18n/[LANGUAGE OR COUNTRY CODE]/[LANGUAGE KEY]
No

com/dotcms/rest/api/v1/system/role/RoleResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
checkuserrolesGETList all Roles of the currently logged in user.
/api//v1/roles/checkuserroles/userid/[USER ID]/roleids/[ROLE ID]
Yes 

com/dotcms/rest/api/v1/system/ruleengine/actionlets/ActionletsResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
listGETList all available Actionlets.
/api/v1/system/ruleengine/actionlets
YesLink

com/dotcms/rest/api/v1/system/ruleengine/conditionlets/ConditionletsResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
listGETList all available Conditionlets.
/api/v1/system/ruleengine/conditionlets
YesLink

com/dotcms/rest/api/v1/users/UserResource.java

End PointHTTP
Method
Description and ExampleLogin
Required
Demo
currentGETGet the currently logged in user.
/api/v1/users/current
YesLink
currentPUTChanges field values for the currently logged in user.
/api/v1/users/current
Yes
filterGETReturns a list of dotCMS users based on the specified search criteria.
/api/users/filter/[Parameters]
YesLink
loginasPUTLogin as a specific user account.
/api/user/loginas/userid/[USER ID]
/api/user/loginas/userid/[USER ID]/pwd/[PASSWORD]
Yes
logoutasPUTEnd current “Login as” session (logout from specific user account).
/api/v1/users/logoutas
Yes