Adding and configuring a service
The following instructions describe how to add and configure a service so you can map it within your application.
About this task
These instructions provide a general overview of adding and configuring services. They are used whenever you want to add a service to your application.
Procedure
- Click Add/Edit Service Configuration. The Service Configuration window opens.
-
Choose one of the following options:
- Select from Service Catalog -- Use this option to select a predefined service. For more details, see Service Oriented Architecture – Exposing a service to Domino Leap, Integrating your application with other Domino Leap applications, and Directory services.
- Select from Domino Database -- Use this option to build a service that accesses data in a Domino database. For more details, see Accessing data from Existing Domino Applications.
- Enter a URL -- Use this option to build a service that accesses JSON-formatted data through a REST API. To get started, enter the URL of the REST API. Then continue to step 3 below.
Note: Continue to step 3 only if you have selected Enter a URL. Step 3 does not apply to the other two options. -
To specify options for the URL, click the Properties icon located next to the
URL field.
Use the Service Details dialog to configure how Domino Leap should call the service.
- You can add details to the URL in the URL field.
- Specify the HTTP method for the service
- Make URL parameters and segments available for input mapping by
selecting Assignable. The display name specified is
used in the input mapping interface.
- URL parameters are query parameters within a URL. The first
parameter follows the question mark in the URL. Additional
parameters follow an ampersand. For example:
https://server.com?this=1&that=2, where
this is the first parameter, and
that is the second parameter.
When you make a parameter assignable, the parameter value is replaced at runtime. In the example https://server.com?this=1&that=2, if this is assignable, the value of this is replaced with the mapped input value from the form. For example:https://server.com?this=AAAAA&that=2, where AAAAA is the value from the form.
- URL segments are path elements within a URL. For example
https://server.com/resources/identifier,
where resources is the first segment, and
identifier is the second segment.
When you make a segment assignable, the segment is replaced at runtime. In the example https://server.com/resources/identifier, assigning identifier a value of 1234 results in a URL that reads: https://server.com/resources/1234.
Note: To add or remove URL parameters or segments, you must modify the URL and tab out of the URL field. - URL parameters are query parameters within a URL. The first
parameter follows the question mark in the URL. Additional
parameters follow an ampersand. For example:
https://server.com?this=1&that=2, where
this is the first parameter, and
that is the second parameter.
- Specify authentication options in the Authentication section.
- To add request headers, expand the Request header section and click Add a required request header. You can also make request headers assignable for input mapping.
- In the Sample Response JSON section, you can
Fetch a sample JSON response, or insert your own.
Elements in the provided JSON are automatically added as assignable outputs
in the Outputs mapping tab. When you click
Fetch, the Fetch a
response window opens. You can modify the URL as required to
connect to the service. Click Submit to fetch the
response.Note: For Post and Put HTTP methods, you can enter Sample Request JSON. Elements in the provided JSON are automatically added as assignable inputs in the Inputs mapping tab.
- To add response headers, expand the Response header section and click Add a required response header. Response headers are automatically assignable for output mapping.
- When you have finished making configuration changes click OK.
-
Click the Inputs tab.Note: If you need to make changes to the service, or configure service details, click the Properties icon located next to URL.
-
Click the Outputs tab.
- Select a source from the Select source: window.
- Select a target from the Select target: window.
- Click the connector icon located between the two windows to link the source and the target.
The connected source and target are displayed in the Assigned Outputs section of the page. - Click OK to exit the Service Configuration window.