ユーザー

ユーザー

ユーザー検索

GET /api/v1/users HTTP/1.1

Request

パラメータ 内容 必須 デフォルト値 最大値
page ページ 1
per_page ページ毎の取得数 20 100

パラメータ値例

{
  "page": 1,
  "per_page": 20
}

cURLでのリクエスト例

curl 'https://{チームドメイン}.notepm.jp/api/v1/users?page=1&per_page=20' \
-H 'Authorization: Bearer {アクセストークン}'

Response

HTTP/1.1 200 OK
{
  "users": [
    {
      "user_code": "0000000001",
      "name": "Aさん",
      "auth_class": "owner", /* owner, admin, user, guest, read_only */
      "email": "xxx@gmail.com",
      "two_step_verification_flag": true,
      "last_login_date": "2020-08-01T10:10:10+09:00",
      "created_at": "2020-08-01T10:10:10+09:00"
    },
    {
      "user_code": "0000000002",
      "name": "Bさん",
      "auth_class": "admin", /* owner, admin, user, guest, read_only */
      "email": "xxx@gmail.com",
      "two_step_verification_flag": false,
      "last_login_date": null,
      "created_at": "2020-08-01T10:10:10+09:00"
    }
  ],
  "meta": {
    "previous_page": null,
    "next_page": "https://projectmode.notepm.jp/api/v1/users?page=2&per_page=20",
    "page": 1,
    "per_page": 20,
    "total": 100
  }
}

ユーザー詳細取得

GET /api/v1/users/:user_code HTTP/1.1

Request

パラメータなし

cURLでのリクエスト例

curl 'https://{チームドメイン}.notepm.jp/api/v1/users/{ユーザーコード}' \
-H 'Authorization: Bearer {アクセストークン}'

Response

HTTP/1.1 200 OK
{
  "user": [
    {
      "user_code": "0000000001",
      "name": "Aさん",
      "auth_class": "owner", /* owner, admin, user, guest, read_only */
      "email": "xxx@gmail.com",
      "two_step_verification_flag": true,
      "last_login_date": "2020-08-01T10:10:10+09:00",
      "created_at": "2020-08-01T10:10:10+09:00"
    }
  ],
  "meta": {
  }
}

自分のユーザー詳細取得

GET /api/v1/user/account HTTP/1.1

Request

パラメータなし

cURLでのリクエスト例

curl 'https://{チームドメイン}.notepm.jp/api/v1/user/account' \
-H 'Authorization: Bearer {アクセストークン}'

Response

HTTP/1.1 200 OK
{
  "user": [
    {
      "user_code": "0000000001",
      "name": "Aさん",
      "auth_class": "owner", /* owner, admin, user, guest, read_only */
      "email": "xxx@gmail.com",
      "two_step_verification_flag": true,
      "last_login_date": "2020-08-01T10:10:10+09:00",
      "created_at": "2020-08-01T10:10:10+09:00"
    }
  ],
  "token": [
    {
      "read_flag": true,
      "write_flag": true,
    }
  ],
  "meta": {
  }
}