Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.
gedorinku edited this page Mar 9, 2018 · 3 revisions

目次

🔒取得(自分)

GET /user

レスポンス

200 OK
Content-Type: application/json
{
  "id": 1,
  "name": "hoge",
  "displayName": "ほげ",
  "email": "[email protected]",
  "authority": 0
}

authority0のとき一般ユーザー、1のときはadmin

指定したユーザーを取得

GET /users/(name)

レスポンス

200 OK
Content-Type: application/json
{
  "id": 1,
  "name": "hoge",
  "displayName": "ほげ",
  "authority": 0
}

すべてのユーザーを取得

GET /users

レスポンス

200 OK
Content-Type: application/json
[
  {
    "id": 1,
    "name": "hoge",
    "displayName": "ほげ",
    "authority": 0
  },
  {
    "id": 2,
    "name": "fuga",
    "displayName": "ふが",
    "authority": 0
  }
]

パスワードリセットメールを送信する

指定されたメールアドレスにパスワードリセット用のリンクが送られる。 https://example.com/#/password_reset/:token みたいな感じ。
例) https://example.com/#/password_reset/2NtCy566TteESCFzyNlSpPYgxlu2q5vgWYXOdeoiJZTuxhqP

リクエスト

POST /password_reset
Content-Type: application/json
{
  "email": "[email protected]"
}

レスポンス

204 No Content

パスワードリセットトークンを検証する

トークンが有効か検証する。

リクエスト

GET /password_reset/:token

レスポンス

204 No Content

パスワードをリセットする

リクエスト

POST /password_reset/:token
Content-Type: application/json
{
  "password": "new_password"
}

レスポンス

204 No Content
Clone this wiki locally