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

PropertyTypeRequiredDescription
tenantIdstringNo
templateNamestringNo
ignoreHeaderbooleanNoSet if the header row of the CSV file I'm uploading can be ignored.
replaceExistingbooleanNo
fileobjectNoThis protobuf message represents any file through an array of bytes.
signedUrlstringNo
sftpDetailsobjectNo
fssIdstringNo
testConnectionbooleanNo
emailsarrayNo
{
  "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

PropertyTypeRequiredDescription
statusstringNo- 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
batchIdstringNobatch_id for all the users in template bulk upload. Randomly generated string.
createdinteger (int32)No
updatedinteger (int32)No
deletedinteger (int32)No
errorsarrayNo
{
  "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

PropertyTypeRequiredDescription
codeinteger (int32)No
messagestringNo
detailsarrayNo
{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "format": "int32"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          }
        }
      }
    }
  }
}