Bulk Upload users with a given template. Requires a template to be created beforehand.
If the template has a column named Action Flag. the behavior changes and the input file is used to delete users.
POST /users/templated
Operation id: UserService_CreateTemplatedUsers
Description
Permission Level: Read-Write
Tags: UserService
Security
- Authorization (apiKey)
- Bearer token
Responses
200 — A successful response.
Content type: application/json
default — An unexpected error response.
Content type: application/json
Request body
(streaming inputs)
Required: Yes
application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
tenantId | string | No | |
templateName | string | No | |
ignoreHeader | boolean | No | Set if the header row of the CSV file I'm uploading can be ignored. |
replaceExisting | boolean | No | |
file | object | No | This protobuf message represents any file through an array of bytes. |
signedUrl | string | No | |
sftpDetails | object | No | |
fssId | string | No | |
testConnection | boolean | No | |
emails | array | No |
{
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"templateName": {
"type": "string"
},
"ignoreHeader": {
"type": "boolean",
"description": "Set if the header row of the CSV file I'm uploading can be ignored."
},
"replaceExisting": {
"type": "boolean"
},
"file": {
"type": "object",
"description": "This protobuf message represents any file through an array of bytes.",
"properties": {
"content": {
"type": "string",
"format": "byte"
}
}
},
"signedUrl": {
"type": "string"
},
"sftpDetails": {
"type": "object",
"properties": {
"host": {
"type": "string"
},
"port": {
"type": "integer",
"format": "int32"
},
"directory": {
"type": "string"
},
"fileName": {
"type": "string"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"fssId": {
"type": "string"
},
"testConnection": {
"type": "boolean"
},
"emails": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | No | - PENDING: The file upload is pending. Default option. - IN_PROGRESS: The file is being uploaded. - SUCCESS: The file was successfully uploaded. - FAILED: The file upload failed. - SUCCESS_WITH_ERRORS: At least one user was successfully uploaded, but others had errors |
batchId | string | No | batch_id for all the users in template bulk upload. Randomly generated string. |
created | integer (int32) | No | |
updated | integer (int32) | No | |
deleted | integer (int32) | No | |
errors | array | No |
{
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "- PENDING: The file upload is pending. Default option.\n - IN_PROGRESS: The file is being uploaded.\n - SUCCESS: The file was successfully uploaded.\n - FAILED: The file upload failed.\n - SUCCESS_WITH_ERRORS: At least one user was successfully uploaded, but others had errors",
"enum": [
"PENDING",
"IN_PROGRESS",
"SUCCESS",
"FAILED",
"SUCCESS_WITH_ERRORS"
],
"default": "PENDING"
},
"batchId": {
"type": "string",
"description": "batch_id for all the users in template bulk upload. Randomly generated string."
},
"created": {
"type": "integer",
"format": "int32"
},
"updated": {
"type": "integer",
"format": "int32"
},
"deleted": {
"type": "integer",
"format": "int32"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
}
default — An unexpected error response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
code | integer (int32) | No | |
message | string | No | |
details | array | No |
{
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
}
}
}
}
}