更新时间:2024-04-29 GMT+08:00
分享

列出用户

功能介绍

对现有用户列表执行筛选查询,最多只能返回50个结果。

URI

GET /{tenant_id}/scim/v2/Users

表1 路径参数

参数

是否必选

参数类型

描述

tenant_id

String

租户的全局唯一标识符(ID)。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

Authorization

String

承载令牌。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

totalResults

Integer

总结果数。

itemsPerPage

String

每页的元素个数。

startIndex

String

起始索引。

schemas

Array of strings

概要。

Resources

Array of objects

包含用户信息的列表。

表4 Resources

参数

参数类型

描述

id

String

用户的全局唯一标识符(ID)。

externalId

String

外部标识符。

meta

Object

元数据。

schemas

Array of strings

概要。

userName

String

用户名,用于标识用户的唯一字符串。

name

Object

包含用户姓名信息的对象。

displayName

String

包含用户显示名称的字符串。

active

Boolean

表示用户是否启用。

emails

Array of objects

包含用户的电子邮箱信息的对象列表。

userType

String

指示用户类型的字符串。

nickName

String

用户昵称。

最小长度:1

最大长度:1024

title

String

用户头衔。

最小长度:1

最大长度:1024

preferredLanguage

String

用户语言首选项。

最小长度:1

最大长度:1024

locale

String

用户的地理区域或位置信息。

最小长度:1

最大长度:1024

timezone

String

用户时区。

最小长度:1

最大长度:1024

addresses

Array of objects

用户的地址信息列表。

数组长度:1-1

phoneNumbers

Array of objects

用户的电话号码信息列表。

数组长度:1-1

urn:ietf:params:scim:schemas:extension:enterprise:2.0:User

Object

包含用户工作相关信息的对象。

表5 Resources.meta

参数

参数类型

描述

resourceType

String

资源类型。

created

String

资源创建时间。

lastModified

String

资源最后更新时间。

表6 Resources.name

参数

参数类型

描述

formatted

String

包含要显示的名称的格式化版本的字符串。

familyName

String

用户的姓氏。

givenName

String

用户的名字。

middleName

String

用户的中间名。

honorificPrefix

String

用户的尊称前缀。

honorificSuffix

String

用户的尊称后缀。

表7 Resources.emails

参数

参数类型

描述

value

String

包含电子邮箱地址的字符串。

type

String

表示电子邮箱类型的字符串。

primary

Boolean

一个布尔值,表示这是否为用户的主电子邮箱。

表8 users.addresses

参数

参数类型

描述

formatted

String

包含要显示的地址的格式化版本的字符串。

最小长度:1

最大长度:1024

streetAddress

String

街道。

最小长度:1

最大长度:1024

locality

String

地址位置。

最小长度:1

最大长度:1024

region

String

区域。

最小长度:1

最大长度:1024

postalCode

String

邮政编码。

最小长度:1

最大长度:1024

country

String

国家/地区。

最小长度:1

最大长度:1024

type

String

表示地址类型的字符串。

最小长度:1

最大长度:1024

primary

Boolean

一个布尔值,表示这是否为用户的主地址。

表9 users.phoneNumbers

参数

参数类型

描述

value

String

包含电话号码的字符串。

最小长度:1

最大长度:1024

type

String

表示电话号码类型的字符串。

最小长度:1

最大长度:1024

primary

Boolean

一个布尔值,表示这是否为用户的主电话号码。

表10 urn:ietf:params:scim:schemas:extension:enterprise:2.0:User

参数

参数类型

描述

costCenter

String

成本中心。

最小长度:1

最大长度:1024

department

String

部门。

最小长度:1

最大长度:1024

division

String

分部。

最小长度:1

最大长度:1024

employeeNumber

String

员工编号。

最小长度:1

最大长度:1024

manager

Object

经理。

organization

String

组织。

最小长度:1

最大长度:1024

表11 manager

参数

参数类型

描述

value

String

经理。

最小长度:1

最大长度:1024

状态码: 400

表12 响应Body参数

参数

参数类型

描述

schema

String

概要。

schemas

Array of strings

概要列表。

detail

String

异常详情。

status

Integer

状态码。

timeStamp

String

时间戳。

状态码: 403

表13 响应Body参数

参数

参数类型

描述

schema

String

概要。

schemas

Array of strings

概要列表。

detail

String

异常详情。

status

Integer

状态码。

timeStamp

String

时间戳。

状态码: 404

表14 响应Body参数

参数

参数类型

描述

schema

String

概要。

schemas

Array of strings

概要列表。

detail

String

异常详情。

status

Integer

状态码。

timeStamp

String

时间戳。

状态码: 409

表15 响应Body参数

参数

参数类型

描述

schema

String

概要。

schemas

Array of strings

概要列表。

detail

String

异常详情。

status

Integer

状态码。

timeStamp

String

时间戳。

状态码: 500

表16 响应Body参数

参数

参数类型

描述

schema

String

概要。

schemas

Array of strings

概要列表。

detail

String

异常详情。

status

Integer

状态码。

timeStamp

String

时间戳。

请求示例

列出用户。

GET https://{hostname}/{tenant_id}/scim/v2/Users

响应示例

状态码: 200

Successful

{
  "totalResults" : 1,
  "itemsPerPage" : 10,
  "startIndex" : "649040aaaaaaaaaaaa3e3050",
  "schemas" : [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ],
  "Resources" : [ {
    "id" : "ac6aa714-daa7-1aaa-aaa2-6715aaaa4dd9",
    "externalId" : "123456",
    "meta" : {
      "resourceType" : "User",
      "created" : "2023-04-08T14:53:43Z",
      "lastModified" : "2023-04-08T14:53:43Z"
    },
    "schemas" : [ "urn:ietf:params:scim:schemas:core:2.0:User" ],
    "userName" : "xxx",
    "name" : {
      "formatted" : "xxx",
      "familyName" : "xxx",
      "givenName" : "xxx",
      "middleName" : "xxx",
      "honorificPrefix" : "xxx",
      "honorificSuffix" : "xxx"
    },
    "displayName" : "xxx",
    "active" : true,
    "emails" : [ {
      "value" : "xxx",
      "type" : "work",
      "primary" : true
    } ],
    "userType" : "xxx"
  } ]
}

状态码

请参见状态码

错误码

请参见错误码

分享:

    相关文档

    相关产品