You can use the Admin API to manage the people who use your archive: list, create, and update users, reset their password, and send their invitation again. It also lists the roles that you can give to users and the archive profiles that you need when you build an ingest request.
User accounts live in your identity provider, not in the archive. A user that you create with an enabled account gets an invitation email before they can sign in.
Every call needs the headers in Common headers and an access token, as described in Authentication.
To manage users, you need the user-management role and user management rights in your identity provider. To search users and groups, you need archive-content-manager or archive-records-manager instead.
List users
Returns one page of users, with the total number of users so that you can page through them.
GET /v2/user
Required role: user-management
Query parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
integer |
No |
The page to return, starting at 0. Default: 0. |
|
|
integer |
No |
The number of users per page. Must be 1 or more. Default: 100. |
|
|
string |
No |
The field to sort on: |
|
|
string |
No |
|
Headers:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
No |
Set to |
Response: 200 OK with a UserList.
{
"items": [
{
"user": {
"id": "5c1e8a40-2b7d-4f0e-9a51-3d2c7e6b9f10",
"username": "jdoe",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"userRoles": ["Application manager"],
"enabled": true,
"emailVerified": true
}
}
],
"page": 0,
"pageSize": 100,
"total": 1
}
Errors that you can get:
-
400with reasonOUT_OF_RANGE:pageis below 0, orpageSizeis below 1. -
400with reasonUNSUPPORTED_VALUE:sortByisn't one of the four allowed fields.
Create a user
Creates a user account. You can also create a package for the user in the same call.
POST /v2/user
Required role: user-management
Query parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
boolean |
No |
Set to |
|
|
string |
No |
The client ID of your application in the identity provider. The links in the invitation email then belong to that application. |
Headers:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
No |
Enrichers for the |
Body fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
Yes |
The new user, without |
|
|
|
Only with |
The package to create for the user. |
{
"user": {
"username": "jdoe",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"userRoles": ["Application manager"],
"enabled": true
}
}
What to know about the new account:
-
The invitation email only goes out if
enabledistrue. It asks the user to verify their email address, choose a password, and set up two-step verification (TOTP). -
The user's package, with
ingestPackage=true, gets its package ID stored on the user asuserPackageId. If the archive can't create the package, it deletes the new user again.
Response: 200 OK with the created user (a User) and a sip. Without ingestPackage, sip is null:
{
"user": {
"id": "5c1e8a40-2b7d-4f0e-9a51-3d2c7e6b9f10",
"username": "jdoe",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"userRoles": ["Application manager"],
"enabled": true,
"emailVerified": false
},
"sip": null
}
With ingestPackage=true, sip describes the submission for the user's package, as in the Ingest API.
Note: The package ingest is asynchronous. A 200 means that the archive accepted the package, not that the ingest succeeded. To follow it up, go to Ingest API.
Errors that you can get:
-
400with reasonREQUIRED_FIELD:ingestPackageistrue, butpackage,package.profile, orpackage.metadatasis missing. -
400with reasonINVALID_PACKAGE_ID:package.packageIdcontains characters that a package ID can't have. -
404with reasonROLE_NOT_FOUND: a role inuserRolesisn't one that you can assign. -
409with reasonUSER_ALREADY_EXISTS: the identity provider already has a user like this one, for example with the same username.
With ingestPackage=true, the package goes through the same checks as any ingest, such as the metadata validation, and you need permission to add content to the archive. For those errors, go to Ingest API.
Update a user
Replaces a user's details and roles. You can also update the metadata of the user's package in the same call.
PUT /v2/user/{userId}
Required role: user-management
Path parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
Yes |
The user's |
Query parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
boolean |
No |
Set to |
Headers:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
No |
Enrichers for the |
Body fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
Yes |
The user as it must be after the update. The |
|
|
|
Only with |
The metadata for the user's package. Set |
The update replaces the user, so send every field, not only the ones that change:
-
userRolesbecomes the user's full list of roles. To keep a role, include it. -
usernamecan't change. Send the user's current username.
To get the current values, list the users first.
The archive updates the user first, and the package after that. If the package update fails, you get an error, but the change to the user stays.
Response: 200 OK with the updated user (a User) and a sip, in the same shape as for Create a user.
Errors that you can get:
-
400with reasonINVALID_VALUE: the username in the body isn't the user's current username. -
400with reasonREQUIRED_FIELD:ingestPackageistrue, butpackage,package.profile, orpackage.metadatasis missing. -
404with reasonUSER_NOT_FOUND: there's no user with this ID. -
404with reasonROLE_NOT_FOUND: a role inuserRolesisn't one that you can assign. -
404with reasonRESOURCE_NOT_FOUND: withingestPackage=true, there's no package withpackage.packageIdthat you can access.
Reset a user's password
Sends the user an email with a link to choose a new password. You can also make them set up two-step verification again.
PUT /v2/user/{userId}/reset
Required role: user-management
Path parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
Yes |
The user's |
Query parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
boolean |
No |
Set to |
|
|
string |
No |
The client ID of your application in the identity provider. The links in the email then belong to that application. |
Response: 200 OK.
{
"emailSent": true
}
Errors that you can get:
-
404with reasonUSER_NOT_FOUND: there's no user with this ID.
Send the invitation again
Sends the user a new invitation email.
POST /v2/user/{userId}/resend-invite
Required role: user-management
Path parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
Yes |
The user's |
Query parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
No |
The client ID of your application in the identity provider. The links in the email then belong to that application. |
Response: 200 OK with {"emailSent": true}, as for Reset a user's password.
Errors that you can get:
-
404with reasonUSER_NOT_FOUND: there's no user with this ID.
Search users and groups
Finds the users and groups in your identity provider that match a search term.
GET /v2/user/search
Required role: archive-content-manager or archive-records-manager
Query parameters:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
Yes |
The search term, at least 2 characters long after spaces are trimmed. |
|
|
string |
No |
|
|
|
integer |
No |
The maximum number of users, and the maximum number of groups, to return. Values below 1 count as 1, and values above 50 count as 50. Default: 20. |
Response: 200 OK with a list of Principal objects: first the users, then the groups.
[
{
"id": "5c1e8a40-2b7d-4f0e-9a51-3d2c7e6b9f10",
"name": "jdoe",
"displayName": "Jane Doe",
"type": "USER"
},
{
"id": "a8f3c2d1-6e4b-4c7a-8d9e-1f2a3b4c5d6e",
"name": "records-team",
"displayName": "/records-team",
"type": "GROUP"
}
]
Errors that you can get:
-
400with reasonOUT_OF_RANGE:searchis missing or shorter than 2 characters.
List the roles that you can assign
Returns the roles that you can put in a user's userRoles.
GET /v2/role
Required role: rights to read the roles in your identity provider. The call uses your own access token there.
Response: 200 OK with a list of Role objects.
[
{
"name": "Application manager"
}
]
The list holds the Application manager role and the roles whose name starts with Vault.
List archive profiles
Returns the archive profiles that are enabled in your archive. When you send content to the archive, you pick one of these profiles for the package: put its urn in the profile field of the ingest request. To build the request, go to Ingest API.
GET /v2/profile
Required role: any valid access token.
Response: 200 OK with a list of ArchiveProfile objects.
[
{
"urn": "urn:example:profiles:hr-records-1.0",
"name": "HR records"
}
]
The ingest request also needs the namespaces of your metadata schemas, for the schema of each item in its metadatas. Docbyte provides them.
Tip: To list the tenants that you can reach, for example to pick the target of a package transfer, go to Archive API.
Schemas
User
The user in requests and responses. In a create request, leave out id and userPackageId.
|
Field |
Type |
Description |
|---|---|---|
|
|
string |
The user's ID in the identity provider. Returned by the archive. In an update, send the same value as in the path. |
|
|
string |
The name the user signs in with. Required. Can't change after you create the user. |
|
|
string |
The user's first name. |
|
|
string |
The user's last name. |
|
|
string |
The user's email address. The invitation and reset emails go here. Required. |
|
|
string |
A phone number, stored with the user. |
|
|
array of strings |
The names of the user's roles. Only the roles from List the roles that you can assign show here, and only those are accepted. |
|
|
string |
An expiration date, stored with the user. |
|
|
boolean |
Whether the account is active. When you create a user with |
|
|
boolean |
Whether the user verified their email address, which they do when they accept the invitation. Returned by the archive. |
|
|
string |
The package ID of the user's package, if you created one with |
UserPackage
The package to create or update for a user, with ingestPackage=true. The fields work like the ones in a document ingest request in the Ingest API.
|
Field |
Type |
Description |
|---|---|---|
|
|
string |
The |
|
|
string |
For a new user: the package ID to use. If you leave it out, the archive creates one. For an update: the ID of the user's package, required. |
|
|
Content |
One file for the package. |
|
|
array of Content |
Several files for the package. If you send both, |
|
|
array of MetadataObject |
The metadata, per schema. Required with |
UserList
|
Field |
Type |
Description |
|---|---|---|
|
|
array of UserInfo |
The users on this page. Each |
|
|
integer |
The page number, starting at 0. |
|
|
integer |
The page size that you asked for. |
|
|
integer |
The total number of users, on all pages. |
Principal
|
Field |
Type |
Description |
|---|---|---|
|
|
string |
The ID of the user or group in the identity provider. |
|
|
string |
The username, or the group name. |
|
|
string |
For a user: the first and last name, or the username if both are empty. For a group: its path, such as |
|
|
string |
|
Role
|
Field |
Type |
Description |
|---|---|---|
|
|
string |
The role name, as you put it in |
ArchiveProfile
|
Field |
Type |
Description |
|---|---|---|
|
|
string |
The profile's ID. Use it as the |
|
|
string |
The profile's display name. |