2010-08-31

Sample of Questetra BPMS API

Questetra BPM Suite is scheduled for another major version update pretty soon.
The highlight of the next update will be the first batch of the Questetra BPMS API.

We decided to slightly change course and release APIs related to user management first. The purpose of this change is to make account registration and syncing with external accounts easier. It will be for managers. I’ll introduce one here.

This URL is for adding users:

${contextRoot}/API/UGA/Quser/add


The following parameters can be requested via the URL:

  • name: name of user to be added
  • email: email address of user to be added
  • password: password of user to be added


When a user is added, you will receive an HTTP 200 response and the user information in JSON format, like this:

{"quser":
{"email":"SouthPole@questetra.com",
"id":0,
"name":"SouthPole"}
}


If the process is unsuccessful, you will get a response code other than 200.

Not everyone can use the API for adding users; it must be performed by users with the appropriate authorization. So in Questetra BPM Suite we've made HTTP Basic Authentication available for the API.
Therefore, you can test the API by GNU wget command. Here is a sample. (The option may differ depending on the wget version.)


wget --http-user=SouthPole@questetra.com --http-password=ssssssss --auth-no-challenge
https://s.questetra.net/00000000/API/UGA/Quser/add?name=test&email=test@questetra.com&password=testtest


The Questetra BPMS API will be expanded in following minor version updates.

---Hatanaka, Akihiro (CTO)




Questetra BPM Suite はもうすぐメジャーバージョンアップ予定です。
次のメジャーバージョンアップの中心は、"Questetra BPMS API" としてAPIを整備していくことです。

提供するAPI ですが、少し予定を変更して、ユーザ管理に関するものをまずリリースします。他システムとのアカウント同期や、アカウント設定を楽にすることを考えてのことです。管理者向けですね。APIを少し紹介します。

ユーザの追加は以下のURLになります。

${contextRoot}/API/UGA/Quser/add


このURLに対して、以下のパラメータを指定して呼び出します。

  • name : 追加するユーザの名前
  • email : 追加するユーザのメールアドレス
  • password : 追加するユーザのパスワード


追加できた場合は、HTTP 200 応答と以下のような JSON形式のテキストを受け取れます。

{"quser":
{"email":"SouthPole@questetra.com",
"id":0,
"name":"サウスポール"}
}


失敗した場合は、200 以外のHTTPコードが返るようになっています。

ユーザ追加のAPIは誰でも実行できる訳ではなく、適当な権限を持つユーザによって実行される必要があります。そこで Questetra BPM Suite は、API向けに Http Basic 認証でもアクセスできるようにしました。

したがって、GNU の wget コマンドでも API の呼び出しを試すことができます。たとえば以下のようなコマンドになります。wget のバージョンによってオプションは変わります。


wget --http-user=SouthPole@questetra.com --http-password=ssssssss --auth-no-challenge
https://s.questetra.net/00000000/API/UGA/Quser/add?name=test&email=test@questetra.com&password=testtest


メジャーバージョンアップに続くマイナーバージョンアップでも、"Questetra BPMS API"を拡充させていく予定です。よろしくお願いします!


---畠中晃弘 (CTO)

0 コメント: