API General Howto

From Openprovider API documentation

Jump to: navigation, search


API server

API commands should be sent over SSL to our API server on https://api.openprovider.eu. Our API accepts commands sent only via HTTP POST method. Each API command is an XML string that contains the data required for the respective command. Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.

The API will return an XML string to the sender, indicating the result of the command and optionally additional information.

Authentication and access restrictions

Each API call requires authentication, in the form of a username and a password (plain text or hashed). The password hash can be found in the respective contact's details page in the reseller control panel. More information in the ApiAuthentication section.

From this same contact details page, it is possible to restrict access to the API to a limited set of IP addresses. If any IP addresses are listed in the white list, only traffic from those IP addresses is accepted. IP addresses listed in the black list are denied access. Leaving both lists empty grants access to the API from any IP address.

In all lists, the use of wildcards is allowed. For example, white listing IP address 93.180.69.* allows any connection from IP addresses to IPv6 is supported as well.

PHP class for easy API inclusion

For easy integration in your existing system, Openprovider provides an example implementation in the PHP programming language. Other languages will follow in the future. The code provided consists of a wrapper class and an example implementation:

A more elaborated example is the following ZIP file, that contains a basic set of HTML forms that can be used to start your own online domain order form. Documentation is in the code, be sure to edit the config file before using the scripts. Note that the script will send registration requests realtime to your Openprovider account!

Other programming languages

In any other programming language, you can call the API by setting up a secured connection to https://api.openprovider.eu, and send the XML command over this connection. You will have to construct the XML command, and parse the XML response yourself. There are also several libraries / packages available on GitHub published by our customers in Python, Javascript and PHP.

Examples of the various API calls can be found in the description for each command. Note that the examples are nicely formatted, although you should send the XML without spaces and newlines to the Openprovider API!

Personal tools