...
- In the Management Console, click the Main tab. Then click APIs to open the Deployed APIs page.
- Click Add API to open the Add API page.
Enter values for the following parameters in the header of the page as required.
Parameter Name Description Data Type Required/Optional Best Practices API Name A unique name for the API. String Required Context This parameter specifies a URL context to which the requests processed by the REST API should be limited. See Specifying the Context for further information. String Required Version your APIs as early as possible in the development cycle. At present, the ESB identifies each API by its unique context name. If you introduce a version in the API context (e.g., /Service 1.0.0), you can update it when you upgrade the same API (e.g., /Service 1.0.1) Host Name The host at which the API is anchored. String Optional Port The port of the REST API. Integer Optional Add Resource Click this link to add one or more At least one resource is required. Create at most only one default resource (a resource with neither a uri-template nor a url-mapping) for each API.
The parameters that can be configured for each resource is described in detail in the next section.
Click Add Resource to expand the page and display the Resource section.
Configure the following parameters for the resource.Parameter Name Description Data Type Required/Optional Methods Select the required check boxes to indicate the HTTP method to be used to invoke the REST API. See Best practices for designing REST APIs for more information. boolean Required URL Style Select a value for his parameter to indicate whether you are specifying a URL mapping or a URI template. A new data field named URL-Mapping or URI-Template will appear based on the selection. Enter the required pattern in this data field. string Required In Sequence This specifies the mediation flow for incoming messages. Possible values are as follows.
- None: Select this to omit the sequence.
- Define Inline: Select this if you want to define a new sequence and then define the sequence as described in Adding a Mediation Sequence.
- Pick From Registry: Select this to use an existing sequence saved in the Registry.
- Use Existing Sequence: Select this to use an existing sequence that already exists in the Synapse Configuration.
One of the four options should be selected. Out Sequence This specifies the mediation flow for outgoing messages. Possible values are as follows.
- None: Select this to omit the sequence.
- Define Inline: Select this if you want to define a new sequence and then define the sequence as described in Adding a Mediation Sequence.
- Pick From Registry: Select this to use an existing sequence saved in the Registry.
- Use Existing Sequence: Select this to use an existing sequence that already exists in the Synapse Configuration.
One of the four options should be selected. Fault Sequence This specifies the mediation flow for messages with errors. Possible values are as follows.
- None: Select this to omit the sequence.
- Define Inline: Select this if you want to define a new sequence and then define the sequence as described in Adding a Mediation Sequence.
- Pick From Registry: Select this to use an existing sequence saved in the Registry.
- Use Existing Sequence: Select this to use an existing sequence that already exists in the Synapse Configuration.
One of the four options should be selected. Click Update to update the resource to the configuration. Repeat this step to enter as many resources as required.
- Click Save to save the API. The API would now appear in the list of deployed APIs.
Deleting
...
APIs in the Management Console
The following procedure is used to delete an API.
...