Resource to get Users. The list of users returned will always be filtered by user permission: A user may only see users that are members of the same groups or subgroups of the groups, the user is member of
List users.
name | type | description | default | constraints |
---|---|---|---|---|
embed | query | Comma separated list of attributes that contain references to other objects, which shall be embedded into the returned objects. | ||
page | query | Returned page, if paging is used. Paging starts with 1 |
1 | int |
pageSize | query | Page size for paging. If this is set to -1 no paging is used (all matching items are returned).
Setting this to 0 will return no items. |
-1 | int |
perms | query | Flag to add permission information for the returned items. | false | boolean |
q | query | Query string for filtering | ||
sort | query | Comma separated list of sorted attributes.
Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order |
name |
code | condition |
---|---|
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | UserList (JSON) | user list |
GET /user
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"items" : [ { }, { } ],
"hasMoreItems" : true,
"numItems" : 12345,
"perms" : {
"property1" : [ "deleteitems", "create" ],
"property2" : [ "wastebin", "createfolder" ]
},
"stagingStatus" : {
"property1" : {
"packageName" : "...",
"included" : true
},
"property2" : {
"packageName" : "...",
"included" : true
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get a list of users, optionally filtered, sorted and paged
name | type | description | default | constraints | multivalued |
---|---|---|---|---|---|
query | email string(s) for filtering | yes | |||
firstname | query | firstname string(s) for filtering | yes | ||
group | query | group id(s) for filtering | int | yes | |
groups | query | true to add groups to the users, false (default) otherwise | false | boolean | no |
id | query | id(s) for filtering | int | yes | |
lastname | query | lastname string(s) for filtering | yes | ||
login | query | login string(s) for filtering | yes | ||
maxItems | query | maximum number of elements returned (paging) | -1 | int | no |
search | query | additionally search in users logins, firstNames, lastNames and emails | no | ||
skipCount | query | number of elements to be skipped (paging) | 0 | int | no |
sortby | query | name of an attribute to sort | "email" or "firstname" or "id" or "lastname" or "login" | no | |
sortorder | query | sort order | asc | "ASC" or "DESC" or "NONE" or "asc" or "desc" or "none" | no |
code | condition |
---|---|
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | UserListResponse (JSON) | list of users |
GET /user/list
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"users" : [ {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
}, {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
} ],
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get the current user (me) By default, the user's groups are not returned.
name | type | description | default | constraints |
---|---|---|---|---|
groups | query | Whether to list the user's groups | false | boolean |
code | condition |
---|---|
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | UserLoadResponse (JSON) | current user |
GET /user/me
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"user" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Deactivate the user with given ID
name | type | description |
---|---|---|
id | path | local user ID |
code | condition |
---|---|
204 | User {id} was deactivated. |
404 | User {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | object (JSON) | empty response |
DELETE /user/{id}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
...
Load user with given ID
name | type | description |
---|---|---|
id | path | local user ID |
embed | query | Comma separated list of attributes that contain references to other objects, which shall be embedded into the returned objects. |
code | condition |
---|---|
200 | User {id} exists. |
404 | User {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | UserLoadResponse (JSON) | user response |
GET /user/{id}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"user" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Update user with given ID
name | type | description |
---|---|---|
id | path | local user ID |
media type | data type | description |
---|---|---|
application/json | User (JSON) | new user data |
code | condition |
---|---|
200 | User {id} was updated. |
404 | User {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | UserLoadResponse (JSON) | updated user |
PUT /user/{id}
Content-Type: application/json
Accept: application/json
{
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"user" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get complete user data
code | condition |
---|---|
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | UserDataResponse (JSON) | Response containing the complete user data |
GET /user/me/data
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"data" : { },
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Saves the user into GCN.
name | type | description | constraints |
---|---|---|---|
id | path | Id of the user to save. | int |
media type | data type | description |
---|---|---|
application/json | UserSaveRequest (JSON) | user save request |
code | condition |
---|---|
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | GenericResponse (JSON) | GenericResponse |
POST /user/save/{id}
Content-Type: application/json
Accept: application/json
{
"user" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
}
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
List groups of given user
name | type | description | default | constraints |
---|---|---|---|---|
id | path | local user ID | ||
page | query | Returned page, if paging is used. Paging starts with 1 |
1 | int |
pageSize | query | Page size for paging. If this is set to -1 no paging is used (all matching items are returned).
Setting this to 0 will return no items. |
-1 | int |
perms | query | Flag to add permission information for the returned items. | false | boolean |
q | query | Query string for filtering | ||
sort | query | Comma separated list of sorted attributes.
Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order |
name |
code | condition |
---|---|
200 | User {id} exists. |
404 | User {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | GroupList (JSON) | list of groups |
GET /user/{id}/groups
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"items" : [ { }, { } ],
"hasMoreItems" : true,
"numItems" : 12345,
"perms" : {
"property1" : [ "linktemplates", "translatepages" ],
"property2" : [ "updateitems", "updateinheritance" ]
},
"stagingStatus" : {
"property1" : {
"packageName" : "...",
"included" : true
},
"property2" : {
"packageName" : "...",
"included" : true
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Delete the user data for the given key
name | type | description |
---|---|---|
key | path | key of the user data |
code | condition |
---|---|
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | GenericResponse (JSON) | Generic response |
DELETE /user/me/data/{key}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
{
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get user data for the given key
name | type | description |
---|---|---|
key | path | key of the user data |
code | condition |
---|---|
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | UserDataResponse (JSON) | Response containing the value |
GET /user/me/data/{key}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"data" : { },
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Save user data for the given key
name | type | description |
---|---|---|
key | path | key of the user data to save |
media type | data type | description |
---|---|---|
application/json | object (JSON) | user data in JSON format |
code | condition |
---|---|
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | GenericResponse (JSON) | Generic response |
POST /user/me/data/{key}
Content-Type: application/json
Accept: application/json
...
HTTP/1.1 201 Created
Content-Type: application/json
{
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Remove user from the group
name | type | description |
---|---|---|
groupId | path | local group ID |
id | path | local user ID |
code | condition |
---|---|
204 | User was removed. |
404 | User {id} or group {groupId} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | object (JSON) | empty response |
DELETE /user/{id}/groups/{groupId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
...
Add user to the group
name | type | description |
---|---|---|
groupId | path | local group ID |
id | path | local user ID |
code | condition |
---|---|
200 | User was added. |
404 | User {id} or group {groupId} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | GroupLoadResponse (JSON) | group |
PUT /user/{id}/groups/{groupId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"group" : {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get node restrictions for the assignment of the user to the group
name | type | description |
---|---|---|
groupId | path | group ID |
id | path | user ID |
code | condition |
---|---|
200 | Node restriction is returned. |
404 | User {id} or group {groupId} does not exist, or the user is not assigned to the group. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | NodeRestrictionResponse (JSON) | response containing the node restrictions |
GET /user/{id}/groups/{groupId}/nodes
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"nodeIds" : [ 12345, 12345 ],
"hidden" : 12345,
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Remove node restriction from the assignment of the user to the group
name | type | description |
---|---|---|
groupId | path | group ID |
id | path | user ID |
nodeId | path | node ID |
code | condition |
---|---|
200 | Node restriction was removed. |
404 | User {id} or group {groupId} or node {nodeId} does not exist, or the user is not assigned to the group. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | NodeRestrictionResponse (JSON) | response containing the (possible updated) node restrictions |
DELETE /user/{id}/groups/{groupId}/nodes/{nodeId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"nodeIds" : [ 12345, 12345 ],
"hidden" : 12345,
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Add node restriction to the assignment of the user to the group
name | type | description |
---|---|---|
groupId | path | group ID |
id | path | user ID |
nodeId | path | node ID |
code | condition |
---|---|
200 | Node restriction was added. |
404 | User {id} or group {groupId} or node {nodeId} does not exist, or the user is not assigned to the group. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | NodeRestrictionResponse (JSON) | response containing the (possibly updated) node restrictions |
PUT /user/{id}/groups/{groupId}/nodes/{nodeId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"nodeIds" : [ 12345, 12345 ],
"hidden" : 12345,
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}