Search/List RingCentral SCIM 2.0 中的用户过滤器表达式语法 API
Search/List Users Filter Expression Syntax in RingCentral SCIM 2.0 API
在 RingCentral API 参考中有一个 Search/List Users function 需要过滤器表达式。这个过滤器表达式的语法是什么?过滤器参数的描述很简单"only support 'userName' or 'email' filter expressions for now".
Search/List Users API 是 SCIM 2.0 API,因此它遵循 IETF RFC-7644 定义的 SCIM 2.0 约定。
这是关于过滤的部分:
https://www.rfc-editor.org/rfc/rfc7644#section-3.4.2.2
3.4.2.2. Filtering
Filtering is an OPTIONAL parameter for SCIM service providers. Clients MAY discover service provider filter capabilities by looking at the filter
attribute of the ServiceProviderConfig
endpoint (see Section 4). Clients MAY request a subset of resources by specifying the filter
query parameter containing a filter expression. When specified, only those resources matching the filter expression SHALL be returned. The expression language that is used with the filter parameter supports references to attributes and literals.
Attribute names and attribute operators used in filters are case insensitive. For example, the following two expressions will evaluate to the same logical value:
filter=userName Eq "john"
filter=Username eq "john"
对于 RingCentral,您可以使用以下示例:
https://platform.ringcentral.com/scim/v2/Users?filter=userName eq "john@example.com"
https://platform.ringcentral.com/scim/v2/Users?filter=email eq "john@example.com"
在 SCIM API 中,一个用户只能有一个用户名,但可以有多个电子邮件地址。对于 RingCentral,它们是相同的,因为 RingCentral 仅支持单个电子邮件地址。
在 RingCentral API 参考中有一个 Search/List Users function 需要过滤器表达式。这个过滤器表达式的语法是什么?过滤器参数的描述很简单"only support 'userName' or 'email' filter expressions for now".
Search/List Users API 是 SCIM 2.0 API,因此它遵循 IETF RFC-7644 定义的 SCIM 2.0 约定。
这是关于过滤的部分:
https://www.rfc-editor.org/rfc/rfc7644#section-3.4.2.2
3.4.2.2. Filtering
Filtering is an OPTIONAL parameter for SCIM service providers. Clients MAY discover service provider filter capabilities by looking at the
filter
attribute of theServiceProviderConfig
endpoint (see Section 4). Clients MAY request a subset of resources by specifying thefilter
query parameter containing a filter expression. When specified, only those resources matching the filter expression SHALL be returned. The expression language that is used with the filter parameter supports references to attributes and literals.Attribute names and attribute operators used in filters are case insensitive. For example, the following two expressions will evaluate to the same logical value:
filter=userName Eq "john"
filter=Username eq "john"
对于 RingCentral,您可以使用以下示例:
https://platform.ringcentral.com/scim/v2/Users?filter=userName eq "john@example.com"
https://platform.ringcentral.com/scim/v2/Users?filter=email eq "john@example.com"
在 SCIM API 中,一个用户只能有一个用户名,但可以有多个电子邮件地址。对于 RingCentral,它们是相同的,因为 RingCentral 仅支持单个电子邮件地址。