15.14.1. Get a single user
GET identity/users/{userId}
Table 236. Get a single user - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to get. |
Success response body:
{
"id":"testuser",
"firstName":"Fred",
"lastName":"McDonald",
"url":"http://localhost:8182/identity/users/testuser",
"email":"no-reply@flowable.org"
}
Table 237. Get a single user - Response codesResponse code | Description |
---|
200 | Indicates the user exists and is returned. |
404 | Indicates the requested user does not exist. |
15.14.2. Get a list of users
GET identity/users
Table 238. Get a list of users - URL query parametersParameter | Description | Type |
---|
id | Only return user with the given id | String |
firstName | Only return users with the given firstname | String |
lastName | Only return users with the given lastname | String |
email | Only return users with the given email | String |
firstNameLike | Only return users with a firstname like the given value. Use % as wildcard-character. | String |
lastNameLike | Only return users with a lastname like the given value. Use % as wildcard-character. | String |
emailLike | Only return users with an email like the given value. Use % as wildcard-character. | String |
memberOfGroup | Only return users which are a member of the given group. | String |
potentialStarter | Only return users which are potential starters for a process-definition with the given id. | String |
sort | Field to sort results on, should be one of id , firstName , lastname or email . | String |
Success response body:
{
"data":[
{
"id":"anotherUser",
"firstName":"Tijs",
"lastName":"Barrez",
"url":"http://localhost:8182/identity/users/anotherUser",
"email":"no-reply@flowable.org"
},
{
"id":"kermit",
"firstName":"Kermit",
"lastName":"the Frog",
"url":"http://localhost:8182/identity/users/kermit",
"email":null
},
{
"id":"testuser",
"firstName":"Fred",
"lastName":"McDonald",
"url":"http://localhost:8182/identity/users/testuser",
"email":"no-reply@flowable.org"
}
],
"total":3,
"start":0,
"sort":"id",
"order":"asc",
"size":3
}
Table 239. Get a list of users - Response codesResponse code | Description |
---|
200 | Indicates the requested users were returned. |
15.14.3. Update a user
PUT identity/users/{userId}
Body JSON:
{
"firstName":"Tijs",
"lastName":"Barrez",
"email":"no-reply@flowable.org",
"password":"pass123"
}
All request values are optional. For example, you can only include the firstName attribute in the request body JSON-object, only updating the firstName of the user, leaving all other fields unaffected. When an attribute is explicitly included and is set to null, the user-value will be updated to null. Example: {"firstName" : null}
will clear the firstName of the user).
Table 240. Update a user - Response codesResponse code | Description |
---|
200 | Indicates the user was updated. |
404 | Indicates the requested user was not found. |
409 | Indicates the requested user was updated simultaneously. |
Success response body: see response for identity/users/{userId}
.
15.14.4. Create a user
POST identity/users
Body JSON:
{
"id":"tijs",
"firstName":"Tijs",
"lastName":"Barrez",
"email":"no-reply@flowable.org",
"password":"pass123"
}
Table 241. Create a user - Response codesResponse code | Description |
---|
201 | Indicates the user was created. |
400 | Indicates the id of the user was missing. |
Success response body: see response for identity/users/{userId}
.
15.14.5. Delete a user
DELETE identity/users/{userId}
Table 242. Delete a user - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to delete. |
Table 243. Delete a user - Response codesResponse code | Description |
---|
204 | Indicates the user was found and has been deleted. Response-body is intentionally empty. |
404 | Indicates the requested user was not found. |
15.14.6. Get a user’s picture
GET identity/users/{userId}/picture
Table 244. Get a user’s picture - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to get the picture for. |
Response Body:
The response body contains the raw picture data, representing the user’s picture. The Content-type of the response corresponds to the mimeType that was set when creating the picture.
Table 245. Get a user’s picture - Response codesResponse code | Description |
---|
200 | Indicates the user was found and has a picture, which is returned in the body. |
404 | Indicates the requested user was not found or the user does not have a profile picture. Status-description contains additional information about the error. |
15.14.7. Updating a user’s picture
GET identity/users/{userId}/picture
Table 246. Updating a user’s picture - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to get the picture for. |
Request body:
The request should be of type multipart/form-data
. There should be a single file-part included with the binary value of the picture. On top of that, the following additional form-fields can be present:
Table 247. Updating a user’s picture - Response codesResponse code | Description |
---|
200 | Indicates the user was found and the picture has been updated. The response-body is left empty intentionally. |
404 | Indicates the requested user was not found. |
15.14.8. List a user’s info
PUT identity/users/{userId}/info
Table 248. List a user’s info - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to get the info for. |
Response Body:
[
{
"key":"key1",
"url":"http://localhost:8182/identity/users/testuser/info/key1"
},
{
"key":"key2",
"url":"http://localhost:8182/identity/users/testuser/info/key2"
}
]
Table 249. List a user’s info - Response codesResponse code | Description |
---|
200 | Indicates the user was found and list of info (key and url) is returned. |
404 | Indicates the requested user was not found. |
15.14.9. Get a user’s info
GET identity/users/{userId}/info/{key}
Table 250. Get a user’s info - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to get the info for. |
key | Yes | String | The key of the user info to get. |
Response Body:
{
"key":"key1",
"value":"Value 1",
"url":"http://localhost:8182/identity/users/testuser/info/key1"
}
Table 251. Get a user’s info - Response codesResponse code | Description |
---|
200 | Indicates the user was found and the user has info for the given key.. |
404 | Indicates the requested user was not found or the user doesn’t have info for the given key. Status description contains additional information about the error. |
15.14.10. Update a user’s info
PUT identity/users/{userId}/info/{key}
Table 252. Update a user’s info - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to update the info for. |
key | Yes | String | The key of the user info to update. |
Request Body:
{
"value":"The updated value"
}
Response Body:
{
"key":"key1",
"value":"The updated value",
"url":"http://localhost:8182/identity/users/testuser/info/key1"
}
Table 253. Update a user’s info - Response codesResponse code | Description |
---|
200 | Indicates the user was found and the info has been updated. |
400 | Indicates the value was missing from the request body. |
404 | Indicates the requested user was not found or the user doesn’t have info for the given key. Status description contains additional information about the error. |
15.14.11. Create a new user’s info entry
POST identity/users/{userId}/info
Table 254. Create a new user’s info entry - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to create the info for. |
Request Body:
{
"key":"key1",
"value":"The value"
}
Response Body:
{
"key":"key1",
"value":"The value",
"url":"http://localhost:8182/identity/users/testuser/info/key1"
}
Table 255. Create a new user’s info entry - Response codesResponse code | Description |
---|
201 | Indicates the user was found and the info has been created. |
400 | Indicates the key or value was missing from the request body. Status description contains additional information about the error. |
404 | Indicates the requested user was not found. |
409 | Indicates there is already an info-entry with the given key for the user, update the resource instance (PUT ). |
15.14.12. Delete a user’s info
DELETE identity/users/{userId}/info/{key}
Table 256. Delete a user’s info - URL parametersParameter | Required | Value | Description |
---|
userId | Yes | String | The id of the user to delete the info for. |
key | Yes | String | The key of the user info to delete. |
Table 257. Delete a user’s info - Response codesResponse code | Description |
---|
204 | Indicates the user was found and the info for the given key has been deleted. Response body is left empty intentionally. |
404 | Indicates the requested user was not found or the user doesn’t have info for the given key. Status description contains additional information about the error. |
发布评论