Implementing an operation in a REST API by using the REST API Editor for Swagger 2 documents
Use the REST API Editor in the Application Development view to implement operations in a REST API.
Before you begin
- Create a REST API based on a Swagger 2.0 specification document in the IBM® App Connect Enterprise Toolkit, as described in Creating a REST API.
- If you created the REST API from scratch by defining resources, models, and operations (as described in Creating a REST API from scratch with Swagger specifications by using the IBM App Connect Enterprise Toolkit, you must also define the operations in the REST API Editor. For more information, see Defining resources, models, and operations in a REST API by using the REST API Editor.
About this task
If you do not implement an operation, you can still deploy the REST API to an integration server. However, when an HTTP client attempts to call an operation that is not implemented, an HTTP 501 Not Implemented status code is returned to the client.
Procedure
To implement an operation in a REST API, complete the following steps:
Results
What to do next
You can also complete the following
optional tasks:
- Implement error handling for the REST API as a set of subflows. For more information, see Implementing an error handler in a REST API.
- Secure your REST API by using HTTPS for encrypting communications between client and server. For more information, see Securing a REST API by using HTTPS.
- Secure your REST API by authenticating users with HTTP Basic Authentication. For more information, see Securing a REST API by using HTTP Basic Authentication.
- If your REST API is going to be used by client-side code that is running in a web browser, you might have to configure Cross-Origin Resource Sharing, as described in Permitting web browsers to access a REST API by using Cross-Origin Resource Sharing.
- You can enable JSON Validation for your REST API by using the "Message Validation" settings in the ACE REST API Editor. For more information about JSON Validation, see JSON validation.
- REST APIs are configured by default to handle JSON data. If you want to handle non-JSON data, see Handling non-JSON data in a REST API.