Creating an API Template
In Test Author, you can use two types of API templates to create a test step: a Conga-provided API template or a customized API template of your own.
When you create the API template, you can select a service and a feature. Conga products and services are available by default within Test Author.
- On the Test Author home page, do one of the following:
- Click API Templates in the right pane. Click Create Template.
- Go to Design > API Templates in the left pane. Click Create Templates.
- In the Create Template panel, enter the following details.
Field
Required action
Template Name
Enter a name for the template. The naming convention is to capitalize the first letter of all words. For example "Delete Product By Id"
Request Type
Select the request type from the drop-down:- GET
- POST
- PUT
- PATCH
- DELETE
Resource URL
Enter the resource URL.
Is Non Conga API
Toggle to switch on or off based on the type of API.
Base URL to use
Select one from the drop-down for a Conga API:- Application Base URL
- CCI Base URL
- CoreApps Base URL
- XAuthor Base URL
Environment Variable having Base URL
Enter the environment variable name, containing the base URL. This is applicable when you select a non-Conga API.
Service
Select the appropriate Conga service from the drop-down.
Feature
Select the feature associated with the selected Conga service from the drop-down.
Description
Add a user-friendly description.
MetaData
The default selection for the first row is Header.
Other options are Query Param and Path Param.
Click + to add another row and select the metadata.
Key
The default selection for the first row is authorization.
Click + to add another row and enter the key based on the corresponding metadata.
Value
Enter the authorization token for the first row.
For subsequent rows enter the value based on the corresponding metadata and key.
Request Body
Request Body Type
Select one from the drop-down:- None
- Form-data
- Raw
- x-www-form-urlencoded
Response Response Type Select one from the drop-down: - FILE
- JSON
Request Payload
Based on the request body type, additional information such as key, type, value, and JSON files must be added. For form-data type, you can browse to your local folder and upload a file or select a file that is already uploaded to File Store. You can upload one or more files. For more information, see Using File Store.
Click Save.