Click or drag to resize
BaseRESTService Class
Base REST service to provide basic access and management of CMS data
Inheritance Hierarchy

Namespace: CMS.WebServices
Assembly: CMS.WebServices (in CMS.WebServices.dll) Version: 11.0.0
Syntax
C#
public class BaseRESTService

The BaseRESTService type exposes the following members.

Constructors
  NameDescription
Public methodBaseRESTService
Top
Properties
  NameDescription
Public propertyAllowedObjectTypes
Gets the list of allowed object types separated by semicolon. Empty string means all object types are allowed.
Public propertyAllowedSensitiveColumns
If true, global administrators will be able to work with sensitive columns (such as UserPassword) via REST service. Other users than global administrators cannot work with these columns regardless this setting value.
Protected propertyStatic memberCurrentBaseUri
Gets current base URI of the REST service
Protected propertyCurrentSite
Gets current site object received from the domain.
Protected propertyCurrentSiteName
Gets current site name (retrieved from domain accessed).
Protected propertyCurrentUser
Gets current user object received from auth cookie.
Protected propertyCurrentUserName
Gets current user name received from auth cookie.
Public propertyDefaultEncoding
Returns default Encoding from settings.
Top
Methods
  NameDescription
Protected methodCheckQueryStringParameters
Checks WHERE, ORDER BY and COLUMNS query string parameters so non-admin users cannot use malicious code (= SQL injection protection).
Protected methodDeleteObjectInternal
Deletes given objects and returns it as a result.
Protected methodEnsureCorrectFormat(DataSet, String)
Ensures correct serialization format of given DataSet.
Protected methodEnsureCorrectFormat(DataTable, String)
Ensures correct serialization format of given DataTable.
Protected methodEnsureSensitiveColumns
Clears sensitive column values if needed.
Public methodStatic memberGetCurrentSite
Returns current site info according to domain in query string.
Public methodStatic memberGetCurrentSiteName
Returns current site name.
Public methodStatic memberGetCurrentUser
Returns current user.
Public methodStatic memberGetCurrentUserName
Returns current user.
Public methodStatic memberGetDefaultEncoding
Returns default encoding according to settings in Site Manager.
Protected methodGetExportSettings
Creates ExportObjectSettings object from query string parameters.
Protected methodStatic memberGetItemUri
Returns Item Uri according to pattern.
Protected methodGetObjectByIDInternal(String, String)
Returns object of given type with specified ID.
Protected methodGetObjectByIDInternal(String, String, Boolean)
Returns object of given type with specified ID.
Protected methodGetObjectByNameInternal(String, String, String)
Returns object of given type with specified name from specified site.
Protected methodGetObjectByNameInternal(String, String, String, Boolean)
Returns object of given type with specified name from specified site.
Protected methodGetObjectDataSetFeed
Returns SyndicationFeed of object dataset.
Protected methodGetObjects
Returns list of objects of given type.
Protected methodStatic memberGetObjectUri(String, TraverseObjectSettings)
Returns Uri of given object type.
Protected methodStatic memberGetObjectUri(GeneralizedInfo, TraverseObjectSettings)
Returns Uri of given object type.
Protected methodStatic memberGetQueryParam
Returns query string parameter.
Public methodStatic memberGetRequestedEncoding
Returns requested encoding or default encoding if none was specified.
Protected methodGetResponse
Returns response for modifying methods - ID and GUID of the modified object.
Protected methodGetStream
Returns proper stream from given object.
Protected methodGetTotalRecordsTable
Returns table containing one column and one row with total records number.
Protected methodIsAuthorizedForObject(String, String, PermissionsEnum)
Returns true if current user is granted with specified permission to process operation on the given objecttype.
Protected methodIsAuthorizedForObject(BaseInfo, PermissionsEnum, String)
Returns true if current user is granted with specified permission to process operation on the given objecttype.
Protected methodIsObjectTypeAllowed
Returns true if given object type is allowed to be accessible by the service.
Protected methodReturnForbiddenStatus
Sets the response status to Forbidden.
Protected methodReturnNotFoundStatus
Sets the response status to Not found.
Protected methodReturnSiteNotFoundStatus
Sets the response status to Not found with a comment that the site does not exist.
Public methodStatic memberRewriteRESTUrl
Handles the rewriting for REST service.
Protected methodStatic memberSetFormat
Sets the format according to content-type and querystring parameter (higher priority).
Protected methodSetObjectInternal
Deletes given objects and returns it as a result.
Protected methodStatic memberToODATA
Serializes given DataSet to ODATA.
Protected methodStatic memberWrapJSONP
Wraps JSON result to a JSONP callback method if specified.
Top
See Also