機械翻訳について

ユーザーの作成

post

/api/v2/users/

次のユーザー・フィールドを指定してこのリソースに対してPOSTリクエストを行って、新しいユーザーを作成します。

  • username: 必須。150文字以下。 文字、数字および@/./+/-/_のみ。(文字列、必須)
  • first_name: (文字列、デフォルト="")
  • last_name: (文字列、デフォルト="")
  • email: (文字列、デフォルト="")
  • is_superuser: 明示的に割り当てることなく、このユーザーがすべての権限を持つことを示します。(ブール、デフォルト=False)
  • is_system_auditor: (ブール、デフォルト=False)
  • password: パスワードの変更に使用される書込み専用のフィールド。(文字列、デフォルト="")

リクエスト

サポートされているメディア・タイプ
本文()
ルート・スキーマ : schema
例:
{
    "email":"a@a.com",
    "first_name":"a",
    "is_superuser":false,
    "last_name":"a",
    "password":"r$TyKiOCb#ED",
    "username":"affable"
}
先頭に戻る

レスポンス

サポートされているメディア・タイプ

201レスポンス

本文
レスポンスの例(application/json)
{
    "auth":[
    ],
    "created":"2018-02-01T08:00:00.000000Z",
    "email":"a@a.com",
    "external_account":null,
    "first_name":"a",
    "id":3,
    "is_superuser":false,
    "is_system_auditor":false,
    "last_login":null,
    "last_name":"a",
    "ldap_dn":"",
    "related":{
        "access_list":"/api/v2/users/3/access_list/",
        "activity_stream":"/api/v2/users/3/activity_stream/",
        "admin_of_organizations":"/api/v2/users/3/admin_of_organizations/",
        "authorized_tokens":"/api/v2/users/3/authorized_tokens/",
        "credentials":"/api/v2/users/3/credentials/",
        "organizations":"/api/v2/users/3/organizations/",
        "personal_tokens":"/api/v2/users/3/personal_tokens/",
        "projects":"/api/v2/users/3/projects/",
        "roles":"/api/v2/users/3/roles/",
        "teams":"/api/v2/users/3/teams/",
        "tokens":"/api/v2/users/3/tokens/"
    },
    "summary_fields":{
        "user_capabilities":{
            "delete":true,
            "edit":true
        }
    },
    "type":"user",
    "url":"/api/v2/users/3/",
    "username":"affable"
}

400レスポンス

本文
レスポンスの例(application/json)
{
    "username":[
        "A user with that username already exists."
    ]
}
先頭に戻る