Navigation

Create a Service Interface

On this page

Overview

You can create and configure interfaces for all external service from the Stitch UI or by importing a service configuration directory. Select the tab below that corresponds to the method you want to use.

Procedure

1

Create a New Service

  1. Click Services in the left-hand navigation.
  2. Click Add a Service.
2

Enter Configuration Values

  1. Select the type of service you wish to create from the list.

  2. Enter a Service Name that uniquely identifies the service.

  3. Enter additional configuration values specific to the type of service you are creating. Some Service configuration values are private and require you to create and reference a Secret that contains the configuration value.

    Refer to the individual service reference pages for details on the configuration parameters for each type of service.

  4. Click Add Service to save the service.

../../_images/service-configuration-stitch-ui.png
1

Export Your Stitch Application

To create new incoming webhook with stitch-cli, you need a previously created application configuration.

You can export your application configuration from the Export tab of the Settings page in the Stitch UI, or by running the following command from an authenticated instance of stitch-cli:

stitch-cli export --app-id=<App ID>
2

Create a Service Configuration Directory

Create a new subdirectory in the /services folder of the application directory that you exported. The name of the subdirectory should match the configured name of the service.

mkdir -p services/myService
3

Add a Service Configuration File

Add a file named config.json to the new service directory. The configuration file should have the following form:

{
  "type": <boolean>,
  "name": <string>,
  "config": <document>
}
Configuration Value Description

Service Type

type
Required. The type of the configured service.

Service Name

name

Required. The name of the configured service.

Note

Each service interface in your application must have a unique name.

Configuration

config
Required. A document that contains configuration values specific to the type of the service you are configuring. To find the configuration values for a specific service, refer to that service’s reference page.
4

Import the Service

Once you have added the appropriate configuration files to the service subdirectory, you can import the service into your application.

Navigate to the root of the application directory and run the following command:

stitch-cli import