Testing Rest Services

After installation is complete, you can use a web browser to test your Rest Services. Rest Services use the HTTP protocol, so you can call them by entering properly structured URLs.

To connect to the Rest Services, you must first use the authentication service to log in. To call the authentication service, enter the URL of your Rest Services site followed by /api/auth. Then enter a valid Infor Operations and Regulations user name and password in the query string, as shown in this example:

http://server/rest services/api/auth?UserName=admin&Password=password

This example shows a Get request in a web browser. For security reasons, this should only be used to test Rest Services behind your agency's firewall. The password will be exposed if you send a Get request over the Internet, so in a production environment you should only use Post requests to authenticate.

Note: For browsers other than Chrome, you may need to convert the format of the response to XML for it to be displayed correctly. The default format is JSON, which not all browsers can handle. To change the format, add format=xml to the query string.

http://server/rest services/api/auth?UserName=admin&Password=password&format=xml

When you log in successfully the service shows the response, including a session ID and your user name, in the browser. To see documentation of the available services you can enter this URL:

http://server/restservices/api

Note: This URL will only work in an on-premises environment. It will return an error in a multi-tenant environment, but in that case you can access the API documentation through Infor API Gateway.

After the initial login, you can use this URL to confirm that you are still connected to the Rest Services:

http://server/rest services/api/auth/session

Again, you may need to convert the response to XML if your browser does not support JSON:

http://server/rest services/api/auth/session?format=xml

Note that web browsers can only be used for Get requests. To test other types of requests, you can use an HTTP client such as Postman.