Metodi di ripristino API per la gestione degli utenti, inclusi creazione, aggiornamento, elenco, eliminazione e restituzione di oggetti utente.
Un metodo POST
per creare un nuovo utente.
POST /api/v1/users/
{
"username" : <string>,
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email" : <string>,
"title" : <string_may_be_null>,
"phoneNumber" : <string_may_be_null>,
"groups" : [<group_1_id>, ...],
"isAdmin" : true | false
}
{
"pid" : <integer>,
"userId": <integer>,
"username" : <string>,
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email" : <string>,
"title" : <string_may_be_null>,
"phoneNumber" : <string_may_be_null>,
"groups" : [<group_1_id>, ...],
"isAdmin" : <"true"|"false">
}
Se isAdmin
è impostato su true, l'utente viene creato come amministratore partner. Questa proprietà ti consente anche di sapere se un utente è un amministratore partner.
Restituisce 409 Conflict
se il nome utente è già utilizzato.
Un metodo PUT
per aggiornare un utente.
PUT /api/v1/users/
<userId>
{
"username" : <string>,
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email" : <string>,
"title" : <string_may_be_null>,
"phoneNumber" : <string_may_be_null>,
"groups" : [<group_1_id>, ...]
}
{
"pid" : <integer>,
"userId": <integer>,
"username" : <string>,
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email" : <string>,
"groups" : [<group_1_id>, ...]
}
Restituisce 409 Conflict
se il nome utente è già utilizzato.
Un metodo PUT
per aggiornare l'utente attualmente connesso.
Mentre la maggior parte dei metodi API sono richiamabili solo dagli amministratori partner, questo metodo è richiamabile dagli utenti non amministratori.
PUT /self/update
{
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email" : <string>,
"title" : <string_may_be_null>,
"phoneNumber" : <string_may_be_null>
}
{
"userId": <integer>,,
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email" : <string>
"title" : <string_may_be_null>,
"phoneNumber" : <string_may_be_null>
}
Restituisce 409 Conflict
se il nome utente è già utilizzato.
Un metodo PUT
per aggiornare l'utente attualmente connesso.
Mentre la maggior parte dei metodi API sono richiamabili solo dagli amministratori partner, questo metodo è richiamabile dagli utenti non amministratori.
POST /users/self/update-password
{ "oldPassword" : "old password", "newPassword" : "new password" }
Restituisce 200 OK
in caso di esito positivo. Restituisce 400 Bad Request
se si verifica un errore in una delle due password.
Un metodo PUT
per reimpostare l'utente attualmente connesso. Audience Management invia all'utente una password generata dal sistema.
Mentre la maggior parte dei metodi API sono richiamabili solo dagli amministratori partner, questo metodo è richiamabile dagli utenti non amministratori.
POST /self/reset-password
Restituisce 200 OK
in caso di esito positivo.
Un metodo Get
per restituire l'oggetto utente per un ID utente.
GET /api/v1/users/
<userId>
{
"pid" : <integer>,
"userId": <integer>,
"username" : <string>,
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email" : <string>,
"title" : <string_may_be_null>,
"phoneNumber" : <string_may_be_null>,
"groups" : [<groupd_id_1>, ...]
}
Un metodo Get
per restituire l'oggetto utente per l'utente attualmente connesso.
Mentre la maggior parte dei metodi API sono richiamabili solo dagli amministratori partner, questo metodo è richiamabile dagli utenti non amministratori.
GET /api/v1/users/self
{
"pid" : <integer>,
"userId": <integer>,
"username" : <string>,
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email" : <string>,
"title" : <string_may_be_null>,
"phoneNumber" : <string_may_be_null>,
"groups" : [<groupd_id_1>, ...]
}
Un metodo GET
per elencare gli utenti.
GET /api/v1/users/
Puoi specificare più ID gruppo nei parametri di query:
GET /api/v1/users/?groupId=343&groupdId=12
Questa query restituisce un elenco di tutti gli utenti dei gruppi specificati.
{
"pid" : <integer>,
"userId": <integer>,
"username" : <string>,
"status" : <"ACTIVE"|"INACTIVE"|"LOCKED">
"firstName" : <string>,
"lastName" : <string>,
"email : <string>,
"title" : <string_may_be_null>,
"phoneNumber" : <string_may_be_null>,
"groups" : [<group_1_id>, ...]
}
Un metodo DELETE
per eliminare un utente.
DELETE /api/v1/users/
<user_id>
Restituisce 204 No Content
in caso di esito positivo. In caso di conflitto restituisce 409 Conflict
.
Un metodo POST
per eliminare più utenti in blocco.
POST /api/v1/users/bulk-delete
{[<user_id_1>, <user_id_2>, ...]}