-
Notifications
You must be signed in to change notification settings - Fork 0
/
user-list.get.json.ftl
executable file
·49 lines (48 loc) · 1.56 KB
/
user-list.get.json.ftl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<#escape x as jsonUtils.encodeJSONString(x)>
<#if status.code = 200>
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"itemsPerPage":${result.itemsPerPage?c},
"totalResults":${result.totalResults?c},
"startIndex":${result.startIndex?c},
"Resources": [
<#list result.resources as user>
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id":"${user.id}",
"userName":"${user.userName!}",
"displayName": "${user.givenName!""} ${user.familyName!""}",
"active":${user.active?c},
"name": {
"givenName":"${user.givenName!"no value"}",
"familyName":"${user.familyName!"no value"}"
},
"emails": [{
"type":"work",
"primary":true,
"value":"${user.email!"no value"}"
}],
"phoneNumbers":[{
"value":"555-555-8377",
"type":"work"
}],
"groups": [],
"meta":{
"resourceType": "User",
"location": "https://docs.notarisid.nl/alfresco/service/scim/v2/Users/${user.id!}",
}
}<#if user_has_next>,</#if>
</#list>
]
}
<#else>
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"detail":"${status.message!}"
}
</#if>
</#escape>