---
title: Default REST context
description: By default, IDM objects are accessible over REST at the context path /openidm/*, where * indicates the remainder of the context path; for example, /openidm/managed/user. You can change the default REST context (/openidm) by setting the openidm.servlet.alias property in your project's resolver/boot.properties file.
component: pingidm
version: 8
page_id: pingidm:setup-guide:changing-rest-context
canonical_url: https://docs.pingidentity.com/pingidm/8/setup-guide/changing-rest-context.html
keywords: ["Setup &amp;amp; Configuration", "REST"]
---

# Default REST context

By default, IDM objects are accessible over REST at the context path `/openidm/*`, where `*` indicates the remainder of the context path; for example, `/openidm/managed/user`. You can change the default REST context (`/openidm`) by setting the `openidm.servlet.alias` property in your project's `resolver/boot.properties` file.

The following change to the `boot.properties` file sets the REST context to `/example`:

```properties
openidm.servlet.alias=/example
```

After this change, objects are accessible at the `/example` context path, for example:

```none
curl \
--header "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--header "Accept-API-Version: resource=1.0" \
--request GET \
"http://localhost:8080/example/managed/user?_queryFilter=true&_fields=_id"
{
  "result": [
    {
      "_id": "bjensen",
      "_rev": "0000000042b1dcd2"
    },
    {
      "_id": "scarter",
      "_rev": "000000009b54de8a"
    }
  ],
  ...
}
```

To use the admin UI, you must also change the following files, so that the UI is accessible at the new context path:

* In the `/path/to/openidm/ui/admin/default/index.html` file, change the `context`. For example, if your new REST context is `example`, adjust that file as follows:

  ```html
  ...
  <script>
      const context = "/example";
  ...
  </script>
  ...
  ```

* In the `/path/to/openidm/ui/admin/default/org/forgerock/openidm/ui/common/util/Constants.js` file, change the value of the `commonConstants.context` property. For example:

  ```javascript
  commonConstants.context = window.context || "/example";
  ```

Note that changing the REST context impacts the [API Explorer](../rest-api-reference/api-explorer.html). To use the API Explorer with the new REST context, change the `baseUrl` property in the `/path/to/openidm/ui/api/default/index.html` file.

Based on the change to the REST context earlier in this section, you'd set the following:

```javascript
//base URL for accessing the OpenAPI JSON endpoint
var baseURL = '/example/';
```
