younifyd
Menu

Import database-user credentials

Import database-user credentials

POST/v1/experimental/import-db-users

Use it in a workflow

  1. Add a step and choose the Weaviate connector.
  2. Pick the Import database-user credentials action (under experimental).
  3. Fill in the fields below, then reference the result from later steps as {{importDatabaseUserCredentials.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

namespacestring

The target namespace every user in this request is created under. Required on namespace-enabled clusters.

usersarray<object>required

The credential records to import. Only records with a strong (argon2id) secureHash are importable.

userIdstringrequired

The name (ID) of the user, without any namespace prefix.

userIdentifierstring

The random identifier embedded in the user's API key, used to resolve the key hash. Exactly 16 characters for an importable record; empty when the export reports a user whose key is not carried.

secureHashstring | null

The argon2id PHC hash of the user's API key. Null when the key cannot be migrated (see status).

apiKeyFirstLettersstring

First 3 letters of the associated API key.

activeboolean

Whether the user is active. A deactivated (not revoked) user is carried with active=false and reproduced on import.

createdAtstring (date-time)

Date and time in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

expiresAtstring (date-time)

Date and time in ISO 8601 format, in UTC, at which the user's API key stops authenticating. Absent or null means the key never expires, except that import never changes an existing user's expiry, so a record without one keeps the stored value. A new user takes the record's value, even one that has passed. A differing future value for an existing user gives that record an error result naming `PUT /v1/users/db/{user_id}/expiration`. A differing past value gives `skipped_exists` for a deactivated user. For an active one it gives an error result advising to deactivate the user, or delete it and re-import, because that PUT refuses a past time. A node without a Weaviate license key refuses the whole import with 403 when any record sets a non-null `expiresAt`.

namespacestring

The namespace the user was bound to on the source. Informational on export; import binds the user to the request's target namespace.

statusstring

Export classification. Only 'exported' carries a usable secureHash; the others report why the user was not carried.

One ofexportedimported_keyrevoked

json
{
  "users": [
    {
      "userId": "string",
      "userIdentifier": "string",
      "secureHash": "string",
      "apiKeyFirstLetters": "string",
      "active": false,
      "createdAt": "2025-01-01T00:00:00Z",
      "expiresAt": "2025-01-01T00:00:00Z",
      "namespace": "string",
      "status": "exported"
    }
  ],
  "namespace": "string"
}

Response

Returns 200 with a any. Read it in later steps with {{importDatabaseUserCredentials.response.data.<field>}}.

Need more? See the Weaviate guide for connection setup and behaviour shared by every action.

Import database-user credentials — Weaviate — Documentation