Your example with dummy data
Code: Select all
curl --location 'https://my.domain.tld/gmao/api/rest/users/' \
--header 'Authorization: 6H6R8AKuKUkUkUkUkUDP5Vn1fZ' \
--header 'Content-Type: text/plain' \
--header 'Cookie: MANTIS_PROJECT_COOKIE=0; PHPSESSID=e76dc8f6bdd28031eda749424ef5932a' \
--data-raw '{
"username": "testuser",
"password": "p@ssw0rd",
"real_name": "Victor Boctor",
"email": "victor@yet-another-domain.com",
"access_level": { "name": "updater" },
"enabled": false,
"protected": false
}'
Code: Select all
400 Invalid request body or format
Code: Select all
curl --location 'https://my.domain.tld/gmao/api/rest/users/' \
--header 'Authorization: 6H6R8AKuKUkUkUkUkUDP5Vn1fZ' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: MANTIS_PROJECT_COOKIE=0; PHPSESSID=e76dc8f6bdd28031eda749424ef5932a' \
--data-urlencode 'username=CoreSuperAdmin' \
--data-urlencode 'password=PaSsW0OrDa' \
--data-urlencode 'real_name=CoreSuperAdmin' \
--data-urlencode 'email=superadmin@mail.com'
Appreciate help.