The base64 encoded csv must have this format -> name,workspace_type,display_name,parent,description,domain,scope

If the record already exists display_name and parent fields are updated. If any workspace creation/update fails, the process return the list of errors and make the save/update for the rest of workspaces.

POST /users/workspaces/import

Operation id: WorkspaceService_ImportWorkspacesFromCsv

Tags: WorkspaceService

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
ignoreHeaderbooleanNo
replaceExistingbooleanNo
fileobjectNoThis protobuf message represents any file through an array of bytes.
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "ignoreHeader": {
      "type": "boolean"
    },
    "replaceExisting": {
      "type": "boolean"
    },
    "file": {
      "type": "object",
      "description": "This protobuf message represents any file through an array of bytes.",
      "properties": {
        "content": {
          "type": "string",
          "format": "byte"
        }
      }
    }
  }
}

Response models

200 — A successful response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringNo- WORKSPACE_IMPORT_PENDING: The file upload is pending. Default option. - WORKSPACE_IMPORT_IN_PROGRESS: The file is being uploaded. - WORKSPACE_IMPORT_SUCCESS: The file was successfully uploaded. - WORKSPACE_IMPORT_FAILED: The file upload failed. - WORKSPACE_IMPORT_SUCCESS_WITH_ERRORS: At least one workspace was successfully uploaded, but others had errors
createdinteger (int32)No
updatedinteger (int32)No
deletedinteger (int32)No
errorsarrayNo
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "- WORKSPACE_IMPORT_PENDING: The file upload is pending. Default option.\n - WORKSPACE_IMPORT_IN_PROGRESS: The file is being uploaded.\n - WORKSPACE_IMPORT_SUCCESS: The file was successfully uploaded.\n - WORKSPACE_IMPORT_FAILED: The file upload failed.\n - WORKSPACE_IMPORT_SUCCESS_WITH_ERRORS: At least one workspace was successfully uploaded, but others had errors",
      "enum": [
        "WORKSPACE_IMPORT_PENDING",
        "WORKSPACE_IMPORT_IN_PROGRESS",
        "WORKSPACE_IMPORT_SUCCESS",
        "WORKSPACE_IMPORT_FAILED",
        "WORKSPACE_IMPORT_SUCCESS_WITH_ERRORS"
      ],
      "default": "WORKSPACE_IMPORT_PENDING"
    },
    "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"
          }
        }
      }
    }
  }
}