|
||
This topic contains a list of querystring parameters supported by the REST service. These parameters can be appended to data retrieval request URLs in order to further specify the data to be retrieved. In the brackets, you can find the expected data type of the parameter along with its default value (in bold font).
This parameter can be used with all REST data retrieval requests in Kentico CMS.
•Format (json/atom10/rss20/xml)
Format of the request, if this is specified for PUT/POST requests, this parameter has higher priority than the Content-Type parameter in the request header. If you want to use e.g. the JSON format, append ?format=json to the URL.
These parameters can be used with object retrieval requests:
•ObjectData (true/false)
Indicates whether object data should also be retrieved (set it to false if you want only metadata of the object). If you want the data to be retrieved, append ?objectdata=true to the URL.
•MetaData (true/false)
Indicates whether metadata of the object (type, list of properties / columns) should be attached to the retrieved result. If you want the metadata to be attached, append ?metadata=true to the URL.
•Binary (true/false)
Indicates whether to include binary data in the result. Binary data is retrieved in Base64 format. If you want the binary data to be included, append ?binary=true to the URL.
•Children (true/false)
Indicates whether to include child objects in the result. If you want child objects to be included, append ?children=true to the URL.
•MaxRelativeLevel (int, -1 = all levels)
If the Children parameter is true, this parameters indicates the deepness of the exported object tree structure. If you want to get children from two levels, append ?children=true&maxrelativelevel=2 to the URL.
•Bindings (true/false)
Indicates whether to include bound objects in the result. If you want the bound objects to be included, append ?bindings=true to the URL.
•OtherBindings (true/false)
Indicates whether to include other bound objects in the result. If you want other bound objects to be retrieved, append ?otherbindings=true to the URL.
•Metafiles (true/false)
Indicates whether to include metafiles attached to exported object in the result. If you want the metafiles to be included, append ?metafiles=true to the URL.
•Relationships (true/false)
Indicates whether to include object relationships in the result. If you want the relationships to be included, append ?relationships=true to the URL.
•Categories (true/false)
Indicates whether to include the object's category structure in the result if the object is categorized. If you want the structure to be included, append ?categories=true to the URL.
•Translations (true/false)
Indicates whether to include a translation table of foreign keys in the result. If you want it to be included, append ?translations=true to the URL.
•Hierarchy (true/false)
If true, the result is exported in a hierarchical structure (if false, the children – bindings – parent structure is flat). If you want data to be exported in the hierarchical structure, append ?hierarchy=true to the URL.
Multiple object retrieval parameters
These parameters can be applied when a whole data set of objects should be retrieved. The dataset can be filtered and ordered using standard parameters in Kentico CMS.
•Where (string, empty by default)
WHERE condition to filter the dataset. If you want to filter retrieved data using a WHERE condition, append ?where=<text of the condition> to the URL.
•OrderBy (string, empty by default)
ORDER BY clause to order the data. You can use ?orderby=##default## for ordering according to object display name.
•Columns (string, all columns by default)
Columns of the object to retrieve. If you want e.g. to have the UserName and UserID columns retrieved when retrieving users, append ?columns=UserName,UserID to the URL. If this parameter is used, the Binary parameter is not reflected (you can choose whether to include binary columns in the result by enumerating the respective columns).
•TopN (int, all records by default)
TOP N clause to filter the data. If you want top 10 records to be retrieved, append ?topn=10 to the URL.
•Offset (int, first record by default)
Parameter used for paging of the data. Enter the number of the record which should be the first. If you want data to be retrieved from the third result, append ?offset=2 to the URL.
•MaxRecords (int, all record by default)
Maximal number of records to retrieve (used for paging in combination with the Offset parameter). If you want e.g. 10 records to be retrieved, append ?maxrecords=10 to the URL.
Here is the list of supported parameters for all document retrieval methods (except for these you can also use standard filtering and ordering parameters from previous section).
•ClassNames (string, all classnames)
List of classNames to select separated by semicolon. If you want to retrieve only cms.article documents, append ?classnames=cms.article to the URL.
•CombineWithDefaultCulture (true/false)
Specifies if return the default culture document when specified culture not found. If you want documents to be retrieved from the default culture when not found in the specified one, append ?combinewithdefaultculture=true to the URL.
•SelectOnlyPublished (true/false)
Select only published nodes. If you want unpublished nodes to be retrieved as well, append ?selectonlypublished=false to the URL.
•Version (published/last)
Determines which version of the document should be retrieved. Published (version you can see on live site) or last version (version which is being edited). If you want the last document version to be retrieved, append ?version=last to the URL.
•CoupledData (true/false)
If false, coupled data is not included in the result. If you don't want coupled data to be included in the result, append ?coupleddata=false to the URL.
•DeleteAllCultures (true/false)
Indicates if all cultural versions of the specified document should also be deleted by the request. If you want all cultural versions to be deleted, append ?deleteallcultures=true to the URL.
•DestroyHistory (true/false)
Indicates if document version history should also be deleted by the request. If you want version history to be deleted together with a document, append ?destroyhistory=true to the URL.
•DeleteProduct (true/false)
Indicates if bound E-commerce product should be deleted together with the specified product document. If you want E-commerce product to be deleted together with a document, append ?deleteproduct=true to the URL.