using the powershell you need to create space.
I use the admin account, a similar python script works.
#Создание пространства
##########################
[String]$namespace = 'CRMS'
[String]$key = 'CRMMS'
[String]$valspace = 'O2PIS'
##########################
$url='http://10.12.12.14/rest/api/space/'
$user = "admin"
$pass= "admin"
$password = $pass | ConvertTo-SecureString -AsPlainText -FORCE
$credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist $user,$password
$header = @{
"User-Agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36";
"Accept-Language"="ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7";
"Authorization" = "Basic "+[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(($Credentials.UserName+":"+[System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($Credentials.Password)) )))
"Accept"="application/json"
"Content-Type"="application/json"
}
$temp2 = @{"value"= $valspace
"representation" = "plain"}
$temp3 = @{"plain"= $temp2}
$body = @{"key" = $key
"namespace" = $namespace
"description" = $temp3
"metadata" = {}
}
$BodyJson = $body | ConvertTo-Json
$password_base64 = ConvertTo-SecureString $pass -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential ($user, $password_base64)
Invoke-WebRequest -UseBasicParsing $url -Headers $header -Method POST -Body $BodyJson