Child pages
  • Chapter 2 - Discovery - Testing access to the web service with the browser

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Discovery - Testing access to the web service with the browser

To test if you have properly configured your access to the web service, access your online shop with the following URL: http://[email protected]/api/, where mypasskey is replaced with the key you created, and myprestashop with your shop's URL. Mozilla Firefox is the preferred browser to test access, but any browser able to display XML should do just fine.

Note

Another method is to go directly to the following page of your shop: http://myprestashop.com/api/

The shop should prompt you for a username and a password to enter. The ID is the authentication key and there is no password.

It will give you access to the list of resources that you configured in your back-office, with all the permissions you chose to grant.

Using XLink, you'll be able to access your various resources. XLink associates an XML file to another XML file via a link.

Navigating your data

In the Customers tag, you should get these attributes:

Code Block
<customers xlink:href="http://myprestashop.com/api/customers" get="true" put="true" post="true" delete="true" head="true">

The get, put, post, and delete attributes have the value true, meaning that you have correctly configured the customers resource and that it is accessible.

You can now use the XLink link that shows up on the URL http://myprestashop.com/api/customers and go to it.

Then, from the client list which is displayed via http://myprestashop.com/store/api/customers, you can access the XLink corresponding to each customer.

Example

The XML file found at http://myprestashop.com/api/customers/1, whose link is found in the list of clients (see above), gives you the properties of customers that have "1" as their ID.

Thus, by jumping from link to link, you can browse the web service to access all resources in XML.