26.3.0 26.2.0 26.1.0 25.4.0 25.3.0
26.3.0 26.2.0 26.1.0 25.4.0 25.3.0

Admin API

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

page

integer

No

The page to return, starting at 0. Default: 0.

pageSize

integer

No

The number of users per page. Must be 1 or more. Default: 100.

sortBy

string

No

The field to sort on: username, email, firstName, or lastName. Sorting ignores case. If you leave it out, the users come in the order of the identity provider.

sortOrder

string

No

asc or desc. Default: asc. Only applies with sortBy.

Headers:

Name

Type

Required

Description

enrichers

string

No

Set to userPackage to add each user's package to the result, as aip, for users that have one.

Response: 200 OK with a UserList.

JSON
{
  "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:

  • 400 with reason OUT_OF_RANGE: page is below 0, or pageSize is below 1.

  • 400 with reason UNSUPPORTED_VALUE: sortBy isn'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

ingestPackage

boolean

No

Set to true to also create a package for the user, from the package part of the body. Default: false.

client_id

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

enrichers

string

No

Enrichers for the sip in the response. For the values, go to Ingest API.

Body fields:

Name

Type

Required

Description

user

User

Yes

The new user, without id and userPackageId. username and email are required.

package

UserPackage

Only with ingestPackage=true

The package to create for the user.

JSON
{
  "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 enabled is true. 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 as userPackageId. 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:

JSON
{
  "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:

  • 400 with reason REQUIRED_FIELD: ingestPackage is true, but package, package.profile, or package.metadatas is missing.

  • 400 with reason INVALID_PACKAGE_ID: package.packageId contains characters that a package ID can't have.

  • 404 with reason ROLE_NOT_FOUND: a role in userRoles isn't one that you can assign.

  • 409 with reason USER_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

userId

string

Yes

The user's id.

Query parameters:

Name

Type

Required

Description

ingestPackage

boolean

No

Set to true to also update the metadata of the user's package, from the package part of the body. Only the package's metadata changes. Default: false.

Headers:

Name

Type

Required

Description

enrichers

string

No

Enrichers for the sip in the response, as for Create a user.

Body fields:

Name

Type

Required

Description

user

User

Yes

The user as it must be after the update. The id in the body decides which user is updated, so set it to the same value as userId.

package

UserPackage

Only with ingestPackage=true

The metadata for the user's package. Set package.packageId to the user's package ID.

The update replaces the user, so send every field, not only the ones that change:

  • userRoles becomes the user's full list of roles. To keep a role, include it.

  • username can'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:

  • 400 with reason INVALID_VALUE: the username in the body isn't the user's current username.

  • 400 with reason REQUIRED_FIELD: ingestPackage is true, but package, package.profile, or package.metadatas is missing.

  • 404 with reason USER_NOT_FOUND: there's no user with this ID.

  • 404 with reason ROLE_NOT_FOUND: a role in userRoles isn't one that you can assign.

  • 404 with reason RESOURCE_NOT_FOUND: with ingestPackage=true, there's no package with package.packageId that 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

userId

string

Yes

The user's id.

Query parameters:

Name

Type

Required

Description

resetMFA

boolean

No

Set to true to also make the user set up two-step verification (TOTP) again. Default: false.

client_id

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.

JSON
{
  "emailSent": true
}

Errors that you can get:

  • 404 with reason USER_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

userId

string

Yes

The user's id.

Query parameters:

Name

Type

Required

Description

client_id

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:

  • 404 with reason USER_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

search

string

Yes

The search term, at least 2 characters long after spaces are trimmed.

type

string

No

USER for users only, GROUP for groups only. Any other value, or no value, returns both. Default: ALL.

max

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.

JSON
[
  {
    "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:

  • 400 with reason OUT_OF_RANGE: search is 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.

JSON
[
  {
    "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.

JSON
[
  {
    "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

id

string

The user's ID in the identity provider. Returned by the archive. In an update, send the same value as in the path.

username

string

The name the user signs in with. Required. Can't change after you create the user.

firstName

string

The user's first name.

lastName

string

The user's last name.

email

string

The user's email address. The invitation and reset emails go here. Required.

phoneNumber

string

A phone number, stored with the user.

userRoles

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.

expirationDate

string

An expiration date, stored with the user.

enabled

boolean

Whether the account is active. When you create a user with true, the invitation email goes out.

emailVerified

boolean

Whether the user verified their email address, which they do when they accept the invitation. Returned by the archive.

userPackageId

string

The package ID of the user's package, if you created one with ingestPackage=true. Returned by the archive.

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

profile

string

The urn of an archive profile. Required with ingestPackage=true. An update keeps the package's own profile.

packageId

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.

document

Content

One file for the package.

documents

array of Content

Several files for the package. If you send both, documents wins.

metadatas

array of MetadataObject

The metadata, per schema. Required with ingestPackage=true.

UserList

Field

Type

Description

items

array of UserInfo

The users on this page. Each UserInfo has a user (a User) and, with the userPackage enricher, an aip with the user's package, as in the Dissemination API.

page

integer

The page number, starting at 0.

pageSize

integer

The page size that you asked for.

total

integer

The total number of users, on all pages.

Principal

Field

Type

Description

id

string

The ID of the user or group in the identity provider.

name

string

The username, or the group name.

displayName

string

For a user: the first and last name, or the username if both are empty. For a group: its path, such as /records-team.

type

string

USER or GROUP.

Role

Field

Type

Description

name

string

The role name, as you put it in userRoles.

ArchiveProfile

Field

Type

Description

urn

string

The profile's ID. Use it as the profile of an ingest request.

name

string

The profile's display name.