End Users
End Users in a hub are organized under end user lists. In order to add users to the hub, you need to create an end user list first.
Lists
Add a new list
POST https://<host>/v1/hubs/32323/enduserlists HTTP/1.1
Accept: application/json
Content-type: application/json
Authorization: Bearer <access_token>
[
{
"name": "My List"
}
]
Get all lists linked to the hub
GET https://<host>/v1/hubs/32323/enduserlists HTTP/1.1
Accept: application/json
Authorization: Bearer <access_token>
{
"itemCount": 3,
"totalCount": 3,
"items": [
{"id":11, "name": "My List"},
{"id":211, "name": "Client List"},
{"id":32, "name": "Internal List"},
]
}
Update list-name
PUT https://<host>/v1/hubs/32323/enduserlists/11 HTTP/1.1
Accept: application/json
Authorization: Bearer <access_token>
{
"name": "My New List"
}
Response
{
"name": "My New List"
}
Delete a new list (only possible when list has no users)
DELETE https://<host>/v1/hubs/32323/enduserlists/11 HTTP/1.1
Accept: application/json
Authorization: Bearer <access_token>
Users
Create a new end user
POST https://<host>/v1/hubs/32323/enduserlists/11/users HTTP/1.1
Accept: application/json
Content-type: application/json
Authorization: Bearer <access_token>
{
"userName": "johns",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@dummy.com",
"language": 9, //English
"comment": "added by me"
}
Response
{
"id": 12312,
"userName": "johns",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@dummy.com",
"language": 9,
"comment": "added by me",
"isActive": "true"
}
Get a specific user
GET https://<host>/v1/hubs/32323/enduserlists/11/users/13212 HTTP/1.1
Accept: application/json
Authorization: Bearer <access_token>
Response
{
"id": 12312,
"userName": "johns",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@dummy.com",
"language": 9,
"comment": "added by me",
"isActive": "true"
}
Update a specific user
PUT https://<host>/v1/hubs/32323/enduserlists/11/users/12312 HTTP/1.1
Accept: application/json
Content-type: application/json
Authorization: Bearer <access_token>
{
"userName": "johns",
"firstName": "Johnny",
"lastName": "Smith",
"email": "john.smith@dummy.com",
"language": 9,
"comment": "updated by me"
}
Delete a specific user
DELETE https://<host>/v1/hubs/32323/enduserlists/11/users/12312 HTTP/1.1
Accept: application/json
Authorization: Bearer <access_token>
Get users from query
POST https://<host>/v1/hubs/32323/enduserlists/11/users/query HTTP/1.1
Accept: application/json
Content-type: application/json
Authorization: Bearer <access_token>
{
"top": 500,
"skip": 0,
"searchText": "Smith",
"sortBy": "email",
"isActive": "true"
}
Response
{
"itemCount": 1,
"totalCount": 1,
"items": [
{
"id": 12312,
"userName": "johns",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@dummy.com",
"language": 9,
"comment": "added by me",
"isActive": "true"
}
]
}