Publié Thu, 29 Jun 2023 11:41:16 GMT par Chema Lopez Developer
I try to create a new user by REST API as documented but I get an error.

This is an example:

POST https://MYCOMPANY.docuware.cloud/DocuWare/Platform/Organization/UserInfo
{
    "Name": "Demo",
    "DbName": "DEMO",
    "Email": "demo@mycompany.com",
    "NetworkId": "",
    "Password": "mysecretpw"
}

Response:
{
    "Message": "'' is not valid user id",
    "Exception": "InvalidGuidException: '' is not valid user id",
    "Uri": "http://MYCOMPANY.docuware.cloud/DocuWare/Platform/Organization/UserInfo",
    "Method": "POST",
    "StatusCode": 422,
    "Status": "Unprocessable Entity",
    "InternalCode": 0
}

I would like to know what I am doing wrong.

Thank you in advance.

 
Publié Tue, 04 Jul 2023 14:57:59 GMT par Gerardo Lisanti Team Leader Product Management
Hi Chema,

please make sure that you pass the Content-Type: application/vnd.docuware.platform.createorganizationuser+json in the HTTP header.
Only then the POST request is considered a "Create User" request.

With Content-Type: application/json  the system tries to update an existing user, where the user's GUID is required.


Viele Grüße / With best regards,

--

Gerardo Lisanti
Team Leader Product Management  |  DocuWare GmbH
 
Publié Thu, 06 Jul 2023 06:49:15 GMT par Chema Lopez Developer
Thank you very much.

I tried to use PUT and some other HTTP methods just in case.

With the Content-Type option works ok.

 

You must be signed in to post in this forum.