LoginSignup
0
0

More than 5 years have passed since last update.

【メモ】Collabnet Subversion がいつのまにか Rest API に対応していたから curl でユーザ登録ができるすごい

Last updated at Posted at 2015-10-16

curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -u admin:adminpass -d '{"username":"Example01", "password":"Example01", "fullName":"Example01", "emailAddress":"example1@collab.net"}' http://serverfqdn:3343/csvn/api/1/user

この状態だとロールが登録されていないので、ユーザは自分のパスワードすら変える事ができない
レスポンスからユーザIDを取得して以下のリクエストを投げる。

curl -v -H "Accept: application/json" -H "Content-type: application/json" -X PUT -u admin:adminpass -d '{"userId":3,"action":"add"}' http://serverfqdn:3343/csvn/api/1/role/2?format=json

リクエスト投げまくれば大量のユーザ登録なんで屁でもないぜうひょー
(°ω°≡°ω°)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0