IBM Support

Tools to work with WebSphere Commerce REST services

Technote (FAQ)


How can I test a request to a WebSphere Commerce REST Service?


There are different tools that can be used for testing a REST request. As an example, this technote presents two third-party tool from a variety that are available.

Firefox/Chrome Browser-based GUI add-on: Poster

1. Download Poster from the Add-on store in Firefox or Chrome.

    Contact Firefox if you need additional information on using Poster.
2. Open Poster and configure a login request by using the LoginIdentityHandler
    a. URL: https://localhost/wcs/resources/store/10001/loginidentity
    b. Leave both fields for User Auth empty
    c. Timeout(s): 30
    d. In 'Actions', select POST
    e. In the 'Content to Send' tab:
    i. Content Type: application/json
    ii. Fill the content area with the parameters {"logonId":"wcsadmin","logonPassword":"password"}

Curl command line based tool (UNIX):

curl -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"logonId":"wcsadmin","logonPassword":"wcsadmin"}' https://localhost/wcs/resources/store/10001/loginidentity

HTTP/1.1 201 Created
Date: Fri, 19 Oct 2012 01:08:49 GMT
Server: IBM_HTTP_Server
Vary: Accept,Accept-Encoding,User-Agent
Content-Length: 343
Cache-Control: max-age=3600
Expires: Fri, 19 Oct 2012 02:08:49 GMT
Content-Type: application/json
Content-Language: en-US

"WCToken": "xzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"WCTrustedToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"personalizationID": "xxxxxxxxx-xxx",
"userId": "100000000001"

For more information view: WebSphere Commerce REST API.

Document information

More support for: WebSphere Commerce Enterprise

Software version: 7.0

Operating system(s): AIX, IBM i, Linux, Solaris, Windows

Software edition: Edition Independent

Reference #: 1620609

Modified date: 18 February 2015

Translate this page: