REST API Endpoint Group Worksheet
Introduction
The following sections are provided in this worksheet:
- Basic Settings
- Function Points
- Input Parameters
- Function Point Response Operations
- Related Worksheets
Basic Settings
Define the basic information for a REST API Endpoint Group.
Item | Description |
---|---|
Endpoint group | Define the name of the REST API Endpoint Group if required |
Endpoint group path | Define the path of this REST API Endpoint Group |
Tags | The OpenAPI specification is grouping the operations by tags. You can specify the tag name for the endpoints defined in the current worksheet. Currently, it only supports the single value and will support multiple values in the future. |
Description | The description of the endpoint group. It will appear in the OpenAPI specification to describe the tag. |
Function Points
Define the function list and output properties for this REST API Endpoint Group.
Item | Description | Remark |
---|---|---|
Function Point | The name of the Function Point. | The Function Point list will be shown in AlchemyJ > Run Function Point. |
Path | The URI of this Function Point. The actual path of the concatenation of Endpoint Group Path and Path. | For example: if Endpoint Group Path is "Customers" and Path is "/all", the URL for this endpoint is <domain>/Customers/all |
Operation | HTTP method for this endpoint. | It can be: POST - Use POST to create new subordinate resources. E.g. a file is a subordinate to a directory containing it or a row is subordinate to a database table. GET - Use GET requests to retrieve resource representation/information only |
Response Data Address | The cell address that AlchemyJ should refer to for the output of this function. | It should be the address of a Data Relationship Schema. |
DB Operation Type | Define whether the DB connection is required and the DB Operation Type. | It can be: Blank - This method does involve any database operation. Non Transactional – DB connection is required, but Transaction management is not needed. The database update operation is not allowed by using this option. Transactional - DB connection is required, and Transaction is required. If any error generated when multiple database operations executed, the transaction should be rolled back. |
Mark Deprecated | Specify if the Function Point will be marked as deprecated. | Yes - The function point is marked as deprecated. Blank - Do not mark. |
Description | Description of the API Function point. | |
Notes | The notes of the API Function point. | Mainly for generating the OpenAPI specification. |
Input Parameters
Input parameters for defined endpoints if any.
Item | Description | Remark |
---|---|---|
Function Point | The Function Point that this input parameter refers to. | The value must exist in the Function Point table's Function Point column. |
Style | Style refers to the parameter style. | The valid inputs are: All request headers - all attributes in HTTP Header in JSON format All request parameters - all request parameters in JSON format Cookie item - data retrieved from browser cookie HTTP header - data retrieved from HTTP Header Request body - the whole request body. Request parameter - data retrieved from query parameters, form data, and parts in multi-part requests Session variable - data retrieved from the session variable URI path segment - data retrieved from the URI path, such as https://localhost/001/getCustomerInfoById. |
Name | The Name of this parameter. | It must begin with an alphabet and contain no space and dot. |
Data Type | The value could be held for this parameter | The valid inputs are: Boolean: TRUE or FALSE Double: A whole number between 4.9406564584124654 x 10^-324. to 1.7976931348623157 x 10^308 File: Reserve for future use. Integer: A whole number between -2,147,483,648 and 2,147,483,647. Object: Object. String: Text value |
Data Address | The cell address that this parameter value should be written to. | It should include the sheet name. For example, Sheet1!A2. If Data Type is Object, this should be the address of a Data Relationship Schema |
Required | The parameter is required or not. | Valid inputs: Yes, No. |
Default Value | The default value of the parameter. | When the parameter is not provided, the default value will be used for the parameter. |
Example Value | The example value of the parameter. | It will appear in the OpenAPI specification to guide the user to input the parameter and will be used in Testing Tool as default value. |
Description | The description of the parameter | It will appear in the OpenAPI specification as the description of this input parameter. |
Function Point Response Operations
Item | Description | Remark |
---|---|---|
Function Point | The Function Point that this input parameter refers to. | The value must exist in the Function Points table Function Point column. |
Style | Indicates which type of Function Point Response Operation this refers to. | The valid inputs are: Clean up files - Reserved for future use. Set Cookie - Set a value in a browser cookie.Set Response Header - Set a value into the HTTP Header of the response message. Set Session - Set a value into the Session object in Java. Please note that some special characters such as " " (space) is invalid in an HTTP header and cookie value. Check the Internet Engineering Task Force (IETF) for the allowable characters in the HTTP header field values. |
Name | The Name of the parameter to be set | |
Data Address | The cell address that contains the value of this parameter. It should include the sheet name. | For example, Sheet1!A2. |
Related Worksheets
The section defines the worksheet and the area this endpoint group uses. When ‘’Enable automatic sheet detection' is enabled in the AlchemyJ Properties and no value is inputted in this section, the AlchemyJ compiler will detect the used sheet range automatically.
Otherwise, it needs to define used worksheet range in this section. There is no need to include system worksheets and definition worksheets such as %%AppConfig, %%SysRuntime, ##JavaApiPackage and so on. However, the worksheets of the component and snippet such as the Data Relationship Schema should be included.
Item | Description | Remark |
---|---|---|
Worksheet Effective Range | The address of the range you used and the worksheet name should be included. | For better performance, only include the cell ranges that are related to this class. |