Hypervisor Users Api Import Hypervisor Users Csv
Creates PENDING users from a text/csv body (ADMIN). Header row required with a username column and optional displayName, email, identitySource (default LOCAL) and realm; header names are case-insensitive and underscores are ignored. At most 256 KiB and 1000 data rows; beyond either, 413 CSV_IMPORT_TOO_LARGE and nothing is imported. An empty body or a header without username is 400 INVALID_CSV. A duplicate canonical name is skipped and an invalid row is reported in errors; the remaining rows are created.
The CSV text, sent as text/csv: a header row with a username column and the optional displayName, email, identitySource and realm columns, then one user per row. The body is limited to 256 KiB and 1000 data rows.
"username,displayName,email,identitySource,realm\nalice,Alice Example,[email protected],LOCAL,\n"
200 OK successful response envelope. The import result, with the created users and one error entry for each row that was skipped or refused
{
"totalRows": 1,
"createdCount": 1,
"skippedCount": 0,
"errorCount": 0,
"errors": [],
"createdUsers": [
{
"id": 3,
"username": "alice",
"canonicalUsername": "alice",
"displayName": "Alice Example",
"email": "[email protected]",
"identitySource": "LOCAL",
"provisioningSource": "CSV_IMPORT",
"enrollmentStatus": "PENDING",
"enabled": true,
"secretVersion": 0,
"createdAt": "2026-01-15T09:45:00Z",
"updatedAt": "2026-01-15T09:45:00Z"
}
]
}
Number of non-blank data rows read; the header row and blank rows are not counted
Number of users created by the import
Number of rows skipped because a user with the same canonical name already exists, in the file or in the Console
Number of rows rejected as invalid; skipped duplicates are not counted
One entry for each skipped duplicate and each rejected row, in row order, so the list length is skippedCount plus errorCount
The users created by the import, in row order
400 Bad Request: INVALID_CSV when the CSV is empty or its header has no username column
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
403 Forbidden: FORBIDDEN when the signed-in role is not allowed to call this operation; CSRF_ERROR when the X-XSRF-TOKEN header is missing or wrong on a POST, PUT, PATCH or DELETE (only POST /api/v1/auth/login is exempt, and a request without a valid session gets 401 UNAUTHENTICATED instead); PASSWORD_CHANGE_REQUIRED when the account must change its password first (only GET /api/v1/auth/session, POST /api/v1/auth/logout and POST /api/v1/auth/change-password are exempt); LICENSE_REQUIRED or LICENSE_EXPIRED while the license pool is restricted (no license, or expired past grace) (exempt: every route under /api/v1/auth, GET /api/v1/user/preferences, GET /api/v1/licensing/summary and POST /api/v1/licensing/licenses)
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
413 Content Too Large: CSV_IMPORT_TOO_LARGE when the body is larger than 256 KiB or has more than 1000 data rows
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: text/csv' -d '[{}]' https://{api_host}/api/v1/hypervisor-users/import-csv