Testing REST APIs
HCL Commerce supports the OpenAPI 3.0 specification from Version 9.1.6.0 onwards. You can use the Swagger specification to test any RESTful APIs that are documented in OAS files.
Before you begin
To view the Rest APIs with the Swagger interface, use the Swagger Editor. You can set up a local copy of the editor and user interface; for more information see Setting up a local Swagger instance.
About this task
Procedure
- Start the servers.
- Access the Swagger specification by downloading the specification files. For more information, see HCL Commerce REST API.
- Open the Swagger specification using the Swagger Editor.
-
Update the hostname and port for the applications. The following ports are
assigned by default:
- Transaction server:
5443
- Tooling:
8000
- xC:
9443
- Query:
30900
- Ingest:
30800
- Approval:
6643
- Transaction server:
-
Log in to your starter store as a Site Administrator or pass in the credentials
directly in the OAS specification.
Note: Logging in to the store sets up the security tokens so that you can make REST calls from Swagger. Although you can still view the REST resources in Swagger, failing to log in or pass in credentials with the appropriate permissions prevents you from running any REST calls from Swagger.
- Test your endpoints.