SCIM Query Parameters
SCIM protocol provides a language to search and filter resources.
Please browse the standard specifications in this link: https://tools.ietf.org/html/rfc7644#section-3.4.2.2
Example
To search all users having "John" as name:
http://<domain>/webservice/scim2/v1/User/?filter=userName eq "John"
Use
This feature can be used with the Search by filter operation.
After the URL resource. the filter parameter with the language expression to apply must be added: <URL>?filter=<expression>
Remember that in this case the HTTP method is GET.
The result always is a SCIM response list.
Syntax
Attribute operators
Operator |
Description |
---|---|
eq |
equal |
ne |
not equal |
co |
contains |
sw |
starts with |
ew |
ends with |
pr |
present (has value) |
gt |
greater than |
ge |
greater than or equal to |
lt |
less than |
le |
less than or equal to |
Logical operators
Operator |
Description |
---|---|
and |
Logical "and" |
or |
Logical "or" |
not |
"Not" function |
Grouping operators
Operator |
Description |
---|---|
( ) |
Precedence grouping |
[ ] |
Complex attribute filter group |
Data values
Data type |
Value |
---|---|
Numbers | Use the value without ", for example 1234 |
Text | Use the value within ", for example "John" |
Date |
Use the value within " with an ISO format, for example "2011-05-13T04:42:34Z" |
Boolean | Use [ true | false ] (without ") |
Null | Use [ null ] (without ") |
Filter examples
filter=userName eq "admin"
filter=userName ne "admin"
filter=userName co "ad"
filter=userName sw "a"
filter=userName ew "n"
filter=userName pr
filter=id gt 1
filter=id ge 60
filter=id lt 1000
filter=id le 1188
filter=consoleProperties.id eq 229
filter=createdDate gt "2011-05-13T04:42:34Z"
filter=id eq 60 and id eq 1188
filter=id eq 60 or id eq 1188
filter=firstName eq "Admin" and id eq 60
filter=firstName eq "Admin" or id eq 61
filter=primaryGroup eq "world" and (firstName co "John” or lastName co "Smith")
filter=userName co "i" and (userName co "a" or userName co "s")
filter=id eq 60 and (userName co "a" and consoleProperties.id eq 229)
Sorting
Short is optional .
Parameter |
Description |
---|---|
sortBy | Specifies the attribute whose value will be used to order ther returned responses. |
sortOrder |
Allowed values are "ascending" and "descending". If sortBy is provided, and sortOrder is nos provided, sortOrder will be "ascending" by default. |
Example:
http://<your-server>/webservice/scim2/v1/User?sortBy=lastName&sortOrder=descending
Pagination
Parameter |
Description |
---|---|
startIndex | Index of the first query result. Default 1 |
count | Maximun numer of query results per page |
Example:
http://<your-server>/webservice/scim2/v1/User?startIndex=1&count=10
{
"totalResults":100,
"itemsPerPage":10,
"startIndex":1,
"schemas":["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"Resources":[{
...
}]
}