Skip to content

Toro Cloud Dev Center

Publishing REST endpoints via service properties

There's a simpler way to publish your very own REST endpoints: using service properties. Creating REST endpoints this way is quicker, although it doesn't offer much flexibility compared to what Gloop REST APIs are capable of. Nevertheless, here are the steps you need to follow in order to create a REST endpoint directly from your Gloop service:

Exposing a REST `GET` endpoint via service properties

Exposing a REST `GET` endpoint via service properties

  1. Open the service you wish to expose as a REST web service by double clicking on its .gloop file in the Navigator view.
  2. Click the table icon in the service editor toolbar to show the properties of the service. The Properties view, by default, will show on the right side of your screen.
  3. Click on the REST tab inside the view.
  4. Select which HTTP methods your endpoint will support.
  5. If you select POST, PUT, or PATCH, you will be allowed to set the body of your requests. The body can be any of the service's inputs, and you can choose which one via the dropdown box for Body Parameter.
  6. Enter the path you want to use for accessing the service. You can set an input property (except Gloop models and objects) as a path parameter by enclosing it with {}.
  7. Save the changes by clicking on the save button in the toolbar or by pressing . Your REST endpoint should be exposed shortly after your instance has finished mapping your new REST endpoint's path. This typically only takes a few seconds.

After your instance has successfully published your new REST endpoint, you can click on the URL provided in the Properties view in order to invoke the exposed service.