---
title: Getting data using REST
related:
  - https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/authenticating-rest-requests.md
  - https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/manipulating-data-using-rest.md
  - https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/sending-rest-requests-from-code.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

The REST service allows you to retrieve page and object data from Xperience instances.

Send requests using the **GET** [HTTP method](http://en.wikipedia.org/wiki/HTTP#Request_methods) to a URL in format: **/**

The base URL of the Xperience REST service is **/rest**. For example, if your administration runs at  _http://localhost/Xperience_, use  _http://localhost/Xperience/rest_  as the base URL of the service.

To learn about the available **resource paths** for pages and objects, see the tables in the sections below. The requests return data in either XML, JSON, RSS or Atom format (see [Examples of data retrieved via the REST service](https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/getting-data-using-rest/examples-of-data-retrieved-via-the-rest-service.md) for more information).

> **Info:** **REST base URL**
>
> Sending a GET request to the base URL of the REST service exposes the service document (for ODATA browsing). The document contains a list of all available primary object types (without child and binding object types) and the URLs under which the objects can be accessed. See also: [ODATA service documents](https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/getting-data-using-rest/odata-service-documents.md)

#### Character encoding

Data retrieval requests return the results in the server's default character encoding. To get the results in a different encoding type, set the encoding in the **Accept-Charset** field of the GET request's HTTP header. If the specified encoding is not available, the system uses the **Default encoding** configured in **Settings -> Integration -> Rest**.

```csharp title="Example"

GET http://localhost/Xperience/rest/cms.user/administrator HTTP/1.1
Authorization: Basic UmVzdENsaWVudDpNeVBhc3N3b3Jk
Accept-Charset: utf-8
Content-Type: text\xml

```

## Getting page data

To load the data of pages from Xperience websites, send GET requests to the appropriate URL – append the  _**resource paths**_  described below to the base URL of your REST service.

> **Tip:** You can further configure the data retrieval by adding [query string parameters](#data-loading-parameters) to the URL.

| Resource format and example                                                                                                                                                  | Description                                                                                                                                                                                                                                                                               |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Single page                                                                                                                                                                  |                                                                                                                                                                                                                                                                                           |
| **/content/currentsite//document/**<br>_/content/currentsite/en-us/document/company/careers_                                                                                 | A single page in the given culture from the site running on the domain in the base URL.<br>Identify the page using its [alias path](https://docs.kentico.com/13/developing-websites/implementing-routing/custom-routing-using-url-patterns/identifying-pages-based-on-url-parameters.md). |
| **/content/site///document/**<br>_/content/site/samplesite/en-us/document/company/careers_                                                                                   | A single page in the given culture on the specified site.                                                                                                                                                                                                                                 |
| Multiple pages                                                                                                                                                               |                                                                                                                                                                                                                                                                                           |
| **/content/currentsite//all/**  _/content/currentsite/en-us/all/news_<br>**/content/site///all/**<br>_/content/site/samplesite/en-us/all/news_                               | All pages starting with the specified [alias path](https://docs.kentico.com/13/developing-websites/implementing-routing/custom-routing-using-url-patterns/identifying-pages-based-on-url-parameters.md).                                                                                  |
| **/content/currentsite//childrenof/**<br>_/content/currentsite/en-us/childrenof/news_<br>**/content/site///childrenof/**<br>_/content/site/samplesite/en-us/childrenof/news_ | All child pages under the specified parent page. Does not include the parent page itself.                                                                                                                                                                                                 |

> **Info:** **Culture constants**
>
> You can use the following constants instead of culture codes in page REST calls:
>
> - **defaultculture** – the page version in the site's default culture
> - **allcultures** – page versions in all available cultures
>
> Example: _/content/currentsite/defaultculture/document/company/careers_

## Getting object data

To load the data of objects from Xperience, send GET requests to the appropriate URL – append the  _**resource paths**_  described below to the base URL of your REST service.

Most object resources start with an _**object type**_ value. To find the value for specific object types, open the **System** application in the Xperience administration interface and select the **Object types** tab.

> **Tip:** You can further configure the data retrieval by adding [query string parameters](#data-loading-parameters) to the URL.

| Resource format and example                                                                                                                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Multiple objects                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **/**<br>_/cms.country_                                                                                                                                         | All objects of the given type assigned to the site running on the domain in the base URL.<br>If the object type does not use site bindings, returns all objects of the given type.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **//site/**<br>_/cms.country/site/samplesite_                                                                                                                   | All objects of the given type assigned to the specified site.<br>If the object type does not use site bindings, returns all objects of the given type.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **//global**<br>_/cms.emailtemplate/global_                                                                                                                     | All global objects of the given type (objects not assigned to any site).<br>If the object type does not use site bindings, returns all objects of the given type.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **//all**<br>_/cms.emailtemplate/all_                                                                                                                           | All objects of the given type (site-related objects from all sites and global objects).<br>**Note**:<br>_/all_ object retrieval requests only work if the user account used for [authentication](https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/authenticating-rest-requests.md) has the _Global administrator_ [privilege level](https://docs.kentico.com/13/managing-users/user-management.md).<br>The REST service does not allow _/all_ object retrieval for requests that use the **hash** URL parameter for [authentication](https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/authenticating-rest-requests.md).<br>These are intentional security limitations that protect global data. |
| Single object                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **//**<br>_/cms.country/271_                                                                                                                                    | Object of the given type with the specified identifier (primary key ID).<br>Ignores site bindings – object IDs are unique across all sites in the system.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **//**<br>_/cms.country/usa_                                                                                                                                    | Object of the given type with the specified code name.<br>For object types with site bindings, always returns the object assigned to the site running on the domain in the base URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **//site//**<br>_/cms.emailtemplate/site/samplesite/Blog.NotificationToModerators_<br>_/cms.emailtemplate/site/samplesite/e431b7e6-9e6c-409d-a1d9-748cbf51b5d6_ | Object of the given type with the specified code name or GUID value, assigned to the specified site.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **//global/**<br>_/cms.emailtemplate/global/Blog.NotificationToModerators_<br>_/cms.emailtemplate/global/607ed253-7842-48be-98d7-63e0714a6ad1_                  | Global object of the given type with the specified code name or GUID value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Child objects                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **///children**<br>_/cms.country/271/children_                                                                                                                  | All **object types** that are supported as child types for the specified object. Only ID values can be used to identify the parent object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **///children/**<br>_/cms.country/271/children/cms.state_                                                                                                       | All objects of the given type that are children of the specified parent object. Only ID values can be used to identify the parent object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Binding objects                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **///bindings**<br>_/cms.user/53/bindings_                                                                                                                      | All **object types** that are used as binding types (represent relationships with other objects) for the specified object. Only ID values can be used to identify the object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **///bindings/**<br>_/cms.user/53/bindings/cms.usersite_                                                                                                        | All objects of the given binding type that exist for the specified object. Only ID values can be used to identify the object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Custom tables                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **/cms.customtable/**<br>_/cms.customtable/customtable.sampletable_                                                                                             | The class definition of the specified [custom table](https://docs.kentico.com/13/developing-websites/defining-website-content-structure/managing-custom-tables.md) (includes data such as the custom table's names, field definitions and search settings).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **/customtableitem.**<br>_/customtableitem.customtable.sampletable_                                                                                             | The data records stored in the specified custom table.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Forms                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **/cms.form/**<br>_/cms.form/contactus_                                                                                                                         | The class definition of the specified [form](https://docs.kentico.com/13/managing-website-content/forms.md) (includes data such as the form's names, basic settings and field definitions).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **/bizformitem.bizform.**<br>_/bizformitem.bizform.contactus_                                                                                                   | The data records stored for the specified form.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Other                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **//site**<br>_/cms.country/site_                                                                                                                               | Lists all sites on which the specified object type is available and provides the REST URLs under which the object data can be retrieved for individual sites (for ODATA browsing).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **/macro/**<br>_/macro/CurrentSite.SiteName_                                                                                                                    | Evaluates the given [macro expression](https://docs.kentico.com/13/macro-expressions.md) and serializes the result. Only works for macros that return a serializable result.<br>When creating the macro expression:<br>Do NOT add the encapsulating bracket characters<br>Use URL encoding for forbidden URL characters                                                                                                                                                                                                                                                                                                                                                                                                                                         |

## Data loading parameters

When loading data via REST, you can append the following query string parameters to the request URL:

| Parameter                 | Value (default bold)           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| General                   |                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| format                    | **xml**/json/atom10/rss20      | Sets the format of the retrieved data. For example, append _?format=json_ to the request URL to get data in JSON format.<br>See also: [Examples of data retrieved via the REST service](https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/getting-data-using-rest/examples-of-data-retrieved-via-the-rest-service.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| localize                  | culture code                   | If added, the system resolves all [localization expressions](https://docs.kentico.com/13/multilingual-websites/setting-up-a-multilingual-user-interface/working-with-resource-strings.md) inside the returned data. Without this parameter, requests always return localization expressions in unresolved format. Supported by both page and object retrieval requests.<br>Specify the target language by entering the corresponding _culture code_ into the parameter's value. You can find the available culture codes in the **Localization** application on the **Cultures** tab.<br>For example, append _?localize=fr-fr_ to the request URL to resolve all localization expressions into their French value (or the value in the default UI culture if the expression is not defined in French). |
| hash                      | hash string                    | Allows you to authenticate the request without requiring an authentication header.<br>See [Authenticating REST requests](https://docs.kentico.com/13/integrating-3rd-party-systems/xperience-rest-service/authenticating-rest-requests.md) to learn how to generate the hash value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Pages                     |                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| classnames                | page type code name (**all**)  | Limits which [page types](https://docs.kentico.com/13/developing-websites/defining-website-content-structure/managing-page-types.md) the request returns. Specified as a list of page type code names separated by semicolons.<br>For example, to retrieve only _cms.article_ pages, append _?classnames=cms.article_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| coupleddata               | true/false                     | Determines if the request retrieves data stored in the fields of specific page types (coupled data).<br>The default behavior depends on the type of the page request:<br>Requests for single pages contain coupled data by default<br>Requests for multiple pages that do not specify the page type _(classnames_ parameter) do NOT load coupled data by default<br>For example, to load pages with coupled data, append _?coupleddata=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                       |
| combinewithdefaultculture | **true**/false                 | Indicates if the request loads the default language versions of pages if they do not exist in the specified culture.<br>To load the default language versions of pages, append _?combinewithdefaultculture=true_ to the request URL.<br>**Note**: This parameter is ignored and set to false by default when called together with the _allcultures_ culture constant.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| selectonlypublished       | **true**/false                 | Determines if the request loads only pages that are published on the live site.<br>To also retrieve unpublished pages , append _?selectonlypublished=false_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| version                   | **published**/last             | Determines if the request returns the page versions that are published on the live site or the latest version that is being edited in the **Pages** application (when using [Workflow](https://docs.kentico.com/13/configuring-xperience/configuring-the-environment-for-content-editors/configuring-workflows.md)).<br>To load the latest page versions, append _?version=last_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                   |
| Multiple pages or objects |                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| where                     | SQL code (**empty**)           | SQL WHERE condition for filtering the loaded data. The parameter only allows the following types of SQL syntax:<br>column names, values and basic operators: =, !=, >, <<br>AND & OR operators, parentheses<br>_column_ BETWEEN _value_ AND _value_<br>_column_ LIKE _value_<br>_column_ IN _(values)_<br>_column_ IS NULL<br>NOT keyword for the above expressions (NOT BETWEEN, NOT LIKE, NOT IN, IS NOT NULL)<br>Other expressions and SQL functions are not supported.<br>Example: _\~/rest/cms.user?Where=UserPrivilegeLevel=1_<br>**Note**: To avoid ambiguity, ensure that _where_ parameter values are URL encoded. For example, occurrences of the % character in LIKE expressions should be replaced by the encoded equivalent – %25.                                                        |
| orderby                   | SQL code (**empty**)           | SQL ORDER BY clause for modifying the order of the items in the data. The parameter allows only the following values:<br>one or more column names (separated by commas)<br>the ASC and DESC keywords<br>Other SQL expressions and functions are not supported.<br>Append _?orderby=##default##_ to use alphabetical order based on the object display name.                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| columns                   | column names (**all columns**) | Limits which data columns of the object or page are loaded. The parameter value must be one or more column names (separated by commas).<br>For example, to load only the _UserName_ and _UserID_ columns when retrieving users, append _?columns=UserName,UserID_ to the request URL.<br>If you add the _columns_ parameter, the _binary_ parameter is ignored (you can choose whether to include binary columns by enumerating the corresponding columns).                                                                                                                                                                                                                                                                                                                                            |
| topn                      | integer (**all records**)      | SQL TOP N clause for filtering the loaded data.<br>For example, to load only the first 10 records, append _?topn=10_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Multiple objects**      |                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| offset                    | integer (**first record**)     | Sets the number of the first record that the request returns (according to the order of the data). Allows you to implement paging of the data.<br>For example, to load data starting from the third item in the dataset, append _?offset=2_ to the request URL.<br>**Note**: The _offset_ parameter only works when getting object data (not supported for pages).                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| maxrecords                | integer (**all records**)      | Limits the maximum number of retrieved records. You can use the _maxrecords_ parameter in combination with the _offset_ parameter to retrieve a specific range of records.<br>For example, to load items 11–20 from the data, append _?offset=10\&maxrecords=10_ to the request URL.<br>**Note**: The _maxrecords_ parameter only works when getting object data (not supported for pages).                                                                                                                                                                                                                                                                                                                                                                                                            |
| Objects                   |                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| objectdata                | **true**/false                 | Indicates whether the request retrieves the data fields of objects.<br>To load only the metadata of an object, append _?objectdata=false\&metadata=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| metadata                  | true/**false**                 | Determines if the request retrieves the metadata of objects (type, list of properties / columns).<br>To load the metadata, append _?metadata=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| binary                    | true/**false**                 | Indicates whether the request retrieves binary data (e.g. the data of files uploaded into form fields). Binary data is retrieved in _Base64_ format.<br>To include the binary data in the response, append _?binary=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| children                  | true/**false**                 | Indicates whether the result includes child objects.<br>To load child objects, append _?children=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| maxrelativelevel          | integer (**all levels**)       | If the _children_ parameter is true, this parameters sets the maximum depth of the exported object tree structure.<br>For example, to load all child objects down to the second level of the object tree, append _?children=true\&maxrelativelevel=2_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| bindings                  | true/**false**                 | Determines if the retrieved data includes bindings to child objects and sites. Requests only return bindings if the _objectdata_ parameter is true.<br>To load object data with its bindings, append _?bindings=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| otherbindings             | true/**false**                 | Determines if the retrieved data includes bindings to other objects (M:N relationships). Requests only return bindings if the _objectdata_ parameter is true.<br>To load object data with bindings to other objects, append _?otherbindings=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| metafiles                 | true/**false**                 | Determines if the retrieved data includes metafiles attached to the object<br>To load metafiles, append _?metafiles=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| relationships             | true/**false**                 | Determines if the retrieved data includes object relationships.<br>To load relationships, append _?relationships=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| categories                | true/**false**                 | Determines if the retrieved data includes the object's category structure (if the object is stored in a hierarchical category structure).<br>To load the category structure, append _?categories=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| translations              | true/**false**                 | Indicates whether the result includes a translation table of foreign keys.<br>To load the translation table, append _?translations=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| hierarchy                 | true/**false**                 | Only applies when loading a **single object**, with at least one of the following parameters enabled: _children_, _bindings_, _translations_<br>If true, the response data is exported in a hierarchical structure. If false, the children– bindings–parent structure is flat.<br>To export the data in a hierarchical structure, append _?hierarchy=true_ to the request URL.                                                                                                                                                                                                                                                                                                                                                                                                                         |
