Hypervisor Users Api Import Hypervisor Users Csv

Hypervisor Users Api Import Hypervisor Users Csv
Bulk-create users from 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.

Request
URI
POST
https://{api_host}/api/v1/hypervisor-users/import-csv
COPY
Request Body

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"
Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. The import result, with the created users and one error entry for each row that was skipped or refused

Returns CsvImportResult of type(s) application/json
{
    "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"
        }
    ]
}
integer As int32 As int32
totalRows
Required  

Number of non-blank data rows read; the header row and blank rows are not counted

integer As int32 As int32
createdCount
Required  

Number of users created by the import

integer As int32 As int32
skippedCount
Required  

Number of rows skipped because a user with the same canonical name already exists, in the file or in the Console

integer As int32 As int32
errorCount
Required  

Number of rows rejected as invalid; skipped duplicates are not counted

array of object
errors
Required  

One entry for each skipped duplicate and each rejected row, in row order, so the list length is skippedCount plus errorCount

array of object
createdUsers
Required  

The users created by the import, in row order


400

400 Bad Request: INVALID_CSV when the CSV is empty or its header has no username column

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

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.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

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

401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked

Returns Unauthenticated of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

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.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

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

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)

Returns ForbiddenWrite of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

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.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

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

413 Content Too Large: CSV_IMPORT_TOO_LARGE when the body is larger than 256 KiB or has more than 1000 data rows

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

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.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: text/csv' -d '[{}]' https://{api_host}/api/v1/hypervisor-users/import-csv