webMethods and Intelligent Business Operations 10.2 | API Gateway User's Guide | APIs | Creating an API from Scratch | Creating a REST API
 
Creating a REST API
You must have the API Gateway's manage APIs or activate/deactivate APIs functional privilege assigned to perform this task.
You can create a REST API from scratch by providing the basic information, technical information, and defining the resources and methods as required.
* To create a REST API from scratch
1. Click APIs in the title navigation bar.
A list of all existing APIs appears.
2. Click Create API.
3. Select Create from scratch.
4. Select REST
5. Click Create.
6. Provide the following information in the Basic information section:
Field
Description
Name
Name of the API.
Version
Version of the API being created.
Maturity state
Maturity state of the API.
Available values are: Beta, Deprecated, Experimental, Production, Test.
The available values depend on the Maturity states configured in the apiMaturityStatePossibleValues property under Administration > Extended settings section.
API grouping
Group under which the API would be categorised.
Available values are: Finance Banking and Insurance, Sales and Ordering, Search, and Transportation and Warehousing.
The available values depend on the groups configured in the apiGroupingPossibleValues property under Administration > Extended settings section.
Description
Description of the API.
7. Click Continue to provide technical information for this API >.
Alternatively, you can click Technical information to go to the Technical information section.
Click Save to save the API at this stage and provide the technical information for the API at a later time.
8. Provide the following information in the Technical information section:
a. Select the protocol HTTP or HTTPS to specify the protocol to be used.
b. Provide the host details in the form of hostname:port#
c. Provide the Base URL in the Base path field.
d. Click + Add Parameter and provide the following information to add the required API level parameters:
Field
Description
Name
Name of the parameter.
Description
Description of the parameter.
Type
Specifies the parameter type.
Available values - Query-string, Header
Data type
Specifies the data type.
Available values - String, Date, Date time, Integer, Double, Boolean.
Required
Specifies the parameter is required if selected.
Array
Specifies the array is required if selected.
Value
Specifies the possible values.
e. Click + Add Schema and provide the following information.
Field
Description
Name
Name of the schema.
Schema type
Specifies the schema type.
Available types - Inline schema, External schema
Value
Specifies the value for the schema type selected.
For Inline schema - Type the request and response values.
For External schema - Click Browse to upload the request and response values.
The schema specified here can be used and referred in the resource and method specification section across multiple methods and resources.
9. Click Continue to provide Resource and methods for this API>.
Alternatively, you can click Resources and methods to go to the Resources and methods section.
Click Save to save the API at this stage and provide the resources and methods for the API at a later time.
10. Provide the following information in the Resources and methods section:
a. Click Add Resources and provide the following information.
Field
Description
Resource name
Name of the resource.
This is the display name of the resource and resource path is used for execution.
Resource path
Specifies the path of the resource.
The resource path should start with /
Description
Description of the resource.
Supported methods
Specifies the supported methods.
Available values - GET, POST, PUT, DELETE, PATCH
b. Click Add.
The resource is added. You can add as many resources you require.
c. Provide the following information in the Supported methods section for each of the supported methods selected:
Field
Description
Description
Brief description of the supported method.
Add method parameters
Specifies the method parameters.
Provide the following information:
*Name - Name of the parameter.
*Description - Brief description of the parameter.
*Type - Specifies the parameter type.
*Data type - Specifies the data type.
*Required - Specifies the parameter is required if selected.
*Array - Specifies the array.
*Values - Specifies the possible values for the parameter.
d. Click Add Request and add a Content type, provide a schema or select a schema and a sample.
e. Click Add Response and provide the status code and a description.
11. Click Save.

Copyright © 2015- 2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release