---
title: PingGateway routes and common REST
description: When PingGateway is in production mode, you can't manage, list, or read routes through Common REST. For information about switching to development mode, refer to PingGateway operating modes.
component: pinggateway
version: 2025.9
page_id: pinggateway:configure:crest
canonical_url: https://docs.pingidentity.com/pinggateway/2026/configure/crest.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
superseded_by: https://docs.pingidentity.com/pinggateway/2026/configure/crest.html
---

# PingGateway routes and common REST

|   |                                                                                                                                                                                                                        |
| - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | When PingGateway is in production mode, you can't manage, list, or read routes through Common REST. For information about switching to development mode, refer to [PingGateway operating modes](operating-modes.html). |

Through Common REST, you can read, add, delete, and edit routes on PingGateway without manually accessing the file system. You can also list the routes in the order that they're loaded in the configuration, and set fields to filter the information about the routes.

The following examples show some ways to manage routes through Common REST. For more information, refer to [About Common REST](../reference/AboutCrest.html).

Manage routes through Common REST

Before you start, prepare PingGateway as described in the [Getting started with PingGateway](../getting-started/preface.html).

1. Add the following route to PingGateway:

   * Linux

     `$HOME/.openig/config/routes/00-crest.json`

   * Windows

     `%appdata%\OpenIG\config\routes\00-crest.json`

   ```json
   {
     "name": "crest",
     "handler": {
       "type": "StaticResponseHandler",
       "config": {
         "status": 200,
         "headers": {
           "Content-Type": [ "text/plain; charset=UTF-8" ]
         },
         "entity": "Hello world!"
       }
     },
     "condition": "${find(request.uri.path, '^/crest')}"
   }
   ```

   Source: [00-crest.json](../_attachments/config/routes/00-crest.json)

   To check that the route is working, access the route on: <http://ig.example.com:8080/crest>.

2. To read a route through Common REST:

   1. Enter the following command in a terminal window:

      ```console
      $ curl -v http://ig.example.com:8085/api/system/objects/_router/routes/00-crest\?_prettyPrint\=true
      ```

      The route is displayed. Note that the route `_id` is displayed in the JSON of the route.

3. To add a route through Common REST:

   1. Move `$HOME/.openig/config/routes/00-crest.json` to `/tmp/00-crest .json`.

   2. Check in `$HOME/.openig/logs/route-system.log` that the route has been removed from the configuration, where `$HOME/.openig` is the instance directory. To double check, go to <http://ig.example.com:8080/crest>. You should get an HTTP 404 error.

   3. Enter the following command in a terminal window:

      ```console
      $ curl -X PUT http://ig.example.com:8085/api/system/objects/_router/routes/00-crest \
             -d "@/tmp/00-crest.json" \
             --header "Content-Type: application/json"
      ```

      This command posts the file in `/tmp/00-crest.json` to the `routes` directory.

   4. Check in `$HOME/.openig/logs/route-system.log` that the route has been added to configuration, where `$HOME/.openig` is the instance directory. To double-check, go to <http://ig.example.com:8080/crest>. You should see the "Hello world!" message.

4. To edit a route through Common REST:

   1. Edit `/tmp/00-crest.json` to change the message displayed by the response handler in the route.

   2. Enter the following command in a terminal window:

      ```console
      $ curl -X PUT http://ig.example.com:8085/api/system/objects/_router/routes/00-crest \
             -d "@/tmp/00-crest.json" \
             --header "Content-Type: application/json" \
             --header "If-Match: *"
      ```

      This command deploys the route with the new configuration. Because the changes are persisted into the configuration, the existing `$HOME/.openig/config/routes/00-crest.json` is replaced with the edited version in `/tmp/00-crest.json`.

   3. Check in `$HOME/.openig/logs/route-system.log` that the route has been updated, where `$HOME/.openig` is the instance directory. To double-check, go to <http://ig.example.com:8080/crest> to confirm that the displayed message has changed.

5. To delete a route through Common REST:

   1. Enter the following command in a terminal window:

      ```console
      $ curl -X DELETE http://ig.example.com:8085/api/system/objects/_router/routes/00-crest
      ```

   2. Check in `$HOME/.openig/logs/route-system.log` that the route has been removed from the configuration, where `$HOME/.openig` is the instance directory. To double-check, go to <http://ig.example.com:8080/crest>. You should get an HTTP 404 error.

6. To list the routes deployed on the router, in the order that they are tried by the router:

   1. Enter the following command in a terminal window:

      ```console
      $ curl "http://ig.example.com:8085/api/system/objects/_router/routes?_queryFilter=true"
      ```

      The list of loaded routes is displayed.
