REST API

Authentification

Authentication is done with a token linked to the user. It is provided to you on request and displayed in your administration interface.

Example

Replace [TOKEN] with the value of the supplied token.

List of machines

curl -H "X-AUTH-TOKEN:[TOKEN]" "https://admin.sante.kiwi-backup.com/api/machines.json"
curl -H "X-AUTH-TOKEN:[TOKEN]" "https://admin.sante.kiwi-backup.com/api/machines.csv"

List of contracts

curl -H "X-AUTH-TOKEN:[TOKEN]" "https://admin.sante.kiwi-backup.com/api/contrats.csv"
curl -H "X-AUTH-TOKEN:[TOKEN]" "https://admin.sante.kiwi-backup.com/api/contrats.json"

List machines in alerts

curl -H "X-AUTH-TOKEN:[TOKEN]" "https://admin.sante.kiwi-backup.com/api/machines_alerte.csv"
curl -H "X-AUTH-TOKEN:[TOKEN]" "https://admin.sante.kiwi-backup.com/api/machines_alerte.json"

Creation of a contract with a .json file from the current folder of this file.

curl -H "X-AUTH-TOKEN:[TOKEN]" -d @file.json "https://admin.sante.kiwi-backup.com/api/add/contrat.json"

Contract creation with the following fields.

curl -H "X-AUTH-TOKEN:[TOKEN]" -d '{"eid":"000000000000000000000001", "libelle":"MonContrat", "volume_disponible":10000, "nb_machines":99, "historique": 90, "email_alerte": "monemail@free.fr"}' "https://admin.sante.kiwi-backup.com/api/add/contrat.json"

See a specific contract ([CONTRACT_ID] = id of the desired contract).

curl -H "X-AUTH-TOKEN:[TOKEN]" "https://admin.sante.kiwi-backup.com/api/contrat/[CONTRACT_ID]"

Update a contract

It is possible to update following informations: ‘email_alerte’, ‘nb_machines’, ‘volume_disponible’, ‘libelle’, ‘historique’.

curl -H "X-AUTH-TOKEN:[TOKEN]" -d @file.json "https://admin.sante.kiwi-backup.com/api/edit/contrat.json/[CONTRACT_ID]"