...
Code Block | ||
---|---|---|
| ||
POST /services/ActionCommand.svc/APIExecute HTTP/1.1 Host: NorthScope.example.com NSLogin: TestAPIUser@NorthScope.example.com NSAPISession: 00000000-0000-0000-0000-000000000000 <NSRequest> <RequestName>ListCompanies</RequestName> </NSRequest> |
Testing via Postman
Testing web service request code can be tricky.
It’s recommended you use a tool like Postman to get started sending web service requests.
In this document, header
How to test your first command
Please refer to the screenshot of Postman below. There’s nothing special about Postman, except that it’s a handy tool. But please ensure all the information listed below is
Part 1. Obtain a token
Referencing the two screenshots below, set the following information
1. Set the URL of the web service request
2. Set the request type to POST
3. Set the message format to Text
4. Enter the login request XML into the bottom left pane.
...
5. Verify in the headers tab that no other other headers have been set, other than those shown in the screenshot below
...
6. Click the send button to issue the request. The pane in the bottom right should show <Success>true</Success> and have a valid session token you can use for step 2.
Part 2. Send a request for data
1. Modify the bottom left pane to use the ListCompanies request XML.
...
2. In the headers tab, add a header for NSLogin. Set this to equal the email address used in part 1
3. Add another header for NSAPISession. Set this to equal the token retrieved from part 1.
...
Click the send button to issue the ListCompanies request. If the system is working properly, you will see a response in the lower right pane with a list of companies from the instance of NorthScope.
Now you’re able to test any of the web service requests listed below.
Available Requests
The NorthScope Web Services API exposes the following requests to perform automated functionality within the NorthScope system.
...