このリソースに GET リクエストを実行して、ユーザーリストを取得します。
GET /api/v1/users/
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, POST, HEAD, OPTIONS
X-API-Time: 0.049s
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1,
            "type": "user",
            "url": "/api/v1/users/1/",
            "related": {
                "admin_of_organizations": "/api/v1/users/1/admin_of_organizations/",
                "organizations": "/api/v1/users/1/organizations/",
                "credentials": "/api/v1/users/1/credentials/",
                "permissions": "/api/v1/users/1/permissions/",
                "activity_stream": "/api/v1/users/1/activity_stream/",
                "projects": "/api/v1/users/1/projects/",
                "teams": "/api/v1/users/1/teams/"
            },
            "created": "2015-08-25T01:00:07.127Z",
            "username": "admin",
            "first_name": "",
            "last_name": "",
            "email": "[email protected]",
            "is_superuser": true,
            "ldap_dn": ""
        }
    ]
}
返されるデータ構造には以下のものが含まれます。
{
    "count": 99,
    "next": null,
    "previous": null,
    "results": [
        ...
    ]
}
count フィールドはクエリーで見つかったユーザーの合計数を示します。next および previous フィールドは、単一ページに収まらない結果がある場合に、それらの結果へのリンクを提供します。results にはユーザーのレコードが一覧表示されますが、ゼロの場合もあります。
各ユーザーのデータ構造には以下のフィールドが含まれます。
id: ユーザーのデータベース ID (整数)type: ユーザーのデータタイプ (複数選択)user: ユーザーurl: ユーザーの URL (文字列)related: 関連リソースの URL のあるデータ構造 (オブジェクト)created: ユーザー作成時のタイムスタンプ (日時)username: 必須。30 文字以下で、英数字および @/./+/-/_ の文字が使用可能 (文字列)first_name: (文字列)last_name: (文字列)email: (email)is_superuser: 明示的にパーミッションを割り当てることなく、このユーザーに全パーミッションがあることを指定します (ブール値)password: パスワード変更用の書き込み専用フィールド (文字列)ldap_dn: (文字列)新規ユーザーを作成するには、以下のユーザーフィールドを使ってリソースに POST リクエストを実行します。
username: 必須。30 文字以下で、英数字および @/./+/-/_ の文字が使用可能 (文字列)first_name: (文字列。デフォルトは "")last_name: (文字列。デフォルトは "")email: (email。デフォルトは "")is_superuser: 明示的にパーミッションを割り当てることなく、このユーザーに全パーミッションがあることを指定します (ブール値。デフォルトは False)password: パスワード変更用の書き込み専用フィールド (文字列。デフォルトは "")オプションエンドポイント テーブルでは、このエンドポイントのオプションを確認できます。ブラウザー表示が可能な API でエンドポイントを表示している場合は、「オプション」ボタンをクリックすると以下の raw JSON が表示されます。
| name | User List | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | # List Users: Make a GET request to this resource to retrieve the list of users. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| renders | 
            
  | 
    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| parses | 
            
  | 
    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| added_in_version | 1.2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| actions | 
            
  | 
    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| types | 
            
  | 
    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| search_fields | 
            
  |