Add an operation
In this topic, you learn how to add an operation to an API.
In each operation, you define a method to interact with the data of the API. You can define multiple operations with different methods and parameters for requests.
Prerequisites
-
You have configured an external API.
Procedure
-
In the Operations tab, select the button to add an operation.
-
In Path, enter a slash and the name of an end path for the external API, for example,
/planets
. -
In Method, select a method from the list, for example
GET
:- GET
-
Read and retrieve data from the resource.
- PUT
-
Update existing data in the resource.
- POST
-
Add new data to the resource.
- DELETE
-
Delete data from the resource.
- HEAD
-
Read and retrieve data without the response body. Unlike GET, HEAD retrieves the response header only.
- OPTIONS
-
Read and retrieve all operations and content types that are available without retrieving specific data.
- PATCH
-
Apply partial changes to an operation. Unlike PUT, PATCH changes only part of the data instead of replacing it entirely.
-
In Pre-Request Hook Script, you can select a script that will trigger each time the operation is called.
-
In Endpoint Override, you can define a new endpoint that overrides the system’s endpoint.
-
In Restrict Access, you can define which role or roles can access the API.
You can only restrict access if you have defined roles before with the Role service. -
Enter a short Summary and a longer Description to provide context information about the operation.
-
In Tags, enter keywords that describe the resource. In this way, you can categorize your operations by tags.
-
Activate any of the following:
- Trace Operations
-
Trace request you or others make to the API in API Trace.
- Save Request Body
-
When you trace operations, the request details are traced, too.
- Send Credentials (cookie)
-
Send cookie information with the API call.
- Use Example Data
-
Use example data to run an unfinished API in the App Designer. Example data is not traced in API Trace or API Client.
-
Select Save.