# Syncupdates

Syncupdates (opens new window) enables updates to the RIPE Database synchronously, meaning, the result is returned immediately to the user. It is intended for use by applications that need to update the RIPE Database and are able to process the result afterwards. An interface can easily be created in any language that supports the HTTP protocol. Syncupdates supports HTTP GET and POST methods (both multipart and URL-encoded formats). It can also be used directly via a web form.

Syncupdates accepts the following parameters (query params for GET, form params for POST):

  • DATA
    This variable should contain the actual update message.
  • NEW
    This variable can be either yes or no. If it contains yes, the update will fail if it contains changes to existing objects.
  • HELP
    This variable can be either yes or no. If it contains yes, the help message of the whois server will be given as the output.

Multiple objects are accepted in the body, and any required passwords must also be supplied in the body using the "password:" attribute.

After composing the input and sending it as a POST or a GET request, the server will return the usual http response headers and the body if an acknowledgement exists.

The first line of the response will give the result of the transaction, in the form of:

HTTP/1.1 (code) (message)

where (code) is a three-digit number which is a code for the message. The first digit of the code denotes the type of the message. The rest of the digits are unique for all messages:

  • 2XX denotes a successful transaction
  • 4XX denotes that the request could not be understood by the server due to malformed syntax,

If the code begins with 2, there will be an acknowledgement in the body of the response, in the form of text/plain.

These are the actual codes returned by Syncupdates:

  • 200 OK (successful)
  • 400 Bad Request (invalid HTTP request, URL or parameters)

Syncupdates can be accessed using the following URLs:

Examples of GET requests:

curl -4 -v -d "HELP=yes" https://syncupdates-test.db.ripe.net
curl -4 -v https://syncupdates-test.db.ripe.net/?HELP=yes

Example of a POST request:

curl -v -4 -X POST -H "Content-Type: multipart/form-data; boundary=--------------------------466af99a9520" --data-binary @form.txt https://syncupdates-test.db.ripe.net
----------------------------466af99a9520
Content-Disposition: form-data; name="DATA"
organisation:   ORG-TS1-TEST
org-name:       RIPE NCC Training Services
org-type:       LIR
address:        Singel 258, 1016 AB Amsterdam
phone:          +31205354444
fax-no:         +31205354444
e-mail:         training@example.org
admin-c:        TS1-TEST
tech-c:         TS1-TEST
abuse-c:        AA2-TEST
ref-nfy:        auto@example.net
notify:         xnotify@example.org
mnt-ref:        TEST-DBM-MNT
mnt-by:         TEST-DBM-MNT
source:         TEST
password:       some clear text 
----------------------------466af99a9520--

The aim of this service is to provide updates around the clock, except for maintenance operations. In cases where it's not possible to update the database, Syncupdates will return with the following message:

"Updates are unavailable at the moment. Please try again later."

Behind Syncupdates, the software has a separate handler to the one used for both the RESTful API and Webupdates. This handler is the same for both scripted access to Syncupdates or the web form access. This handler will accept multiple objects in the same update. This allows for a different type of usage to the RESTful API. A single response is returned to the user with the results of processing all the objects in the update message. The same timing issue applies across the whole update as referred to in the Webupdates description above. If an update has a very long list of objects and the http connection times out during the update, the processing of the update will still run to completion. No response message will be returned to the user after an http timeout. Notification emails will always be sent on completion.