Font Size Body Font Header Font Export  
TXT HTML PDF Print

Ebiwrite REST API

Overview

The Ebiwrite API is XML over HTTP. Simply set the following headers to inform Ebiwrite you want to use XML:


Accept: application/xml
Content-Type: application/xml

The examples in this document use curl, a command line utility. You could achieve similar results with wget.

API responses

The API will either respond with appropriate XML for the type of object, or a boolean saved status:


<pre>
<saved>true</saved>
</pre>

Authentication

Basic HTTP authentication is required to access the API. Ensure that you use the URL for your account (Ebiwrite accounts have their own subdomain.)

Methods

Translations

Translation title list (/translations/titles)


<pre style="overflow: scroll; background-color: #ffc">
curl -X GET -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://alex.ebiwrite.com/translations/titles -u alex@example.com:test
</pre>

All translations (/translations)


<pre style="overflow: scroll; background-color: #ffc">
curl -X GET -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://alex.ebiwrite.com/translations -u alex@example.com:test
</pre>

Get translation (/translations/1/get)

Where 1 is the ID of a translation:


<pre style="overflow: scroll; background-color: #ffc">
curl -X GET -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://alex.ebiwrite.com/translations/1/get -u alex@example.com:test
</pre>

Create translation (/translations/create)


<pre style="overflow: scroll; background-color: #ffc">
curl -X POST -d '<translation><title>Translation title</title><tags>tag1 tag2 tag3</tags><source>Source text</source><translation>Translation text</translation></translation>' -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://alex.ebiwrite.com/translations/create -u alex@example.com:test
</pre>

Update translation (/translations/1/update)

Where 1 is the ID of a translation:


<pre style="overflow: scroll; background-color: #ffc">
curl -X PUT -d '<translation><title>Translation title</title></translation>' -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://alex.ebiwrite.com/translations/1/update -u alex@example.com:test
</pre>

Tags

List content by tag (/tags/test)

This returns a list of files and translations for a given tag:


<pre style="overflow: scroll; background-color: #ffc">
curl -X GET -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://alex.ebiwrite.com/tags/test -u alex@example.com:test
</pre>

Dictionary list (/dictionaries)


<pre style="overflow: scroll; background-color: #ffc">
curl -X GET -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://alex.ebiwrite.com/dictionaries -u alex@example.com:test
</pre>

Word list (/dictionaries/1)

Where 1 is the ID of a dictionary:


<pre style="overflow: scroll; background-color: #ffc">
curl -X GET -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://alex.ebiwrite.com/dictionaries/1 -u alex@example.com:test
</pre>