Create An Account
Description |
This API allows users to create new accounts |
URL Path |
/account |
Method |
POST |
HTTP header parameters
Authorization |
The API key of the caller |
REQUIRED |
This header should have the following format: Bearer [ Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD |
Method: POST
HTTP body |
json |
REQUIRED |
{
"first_name"
:
"John"
,
"last_name"
:
"Doe"
,
"display_name"
:
"John Doe"
,
"user_name"
:
"JohnD"
,
"password"
:
"password"
,
"email"
:
"jdoe@opswat.com"
,
"role"
:
"user"
,
"expires"
:
"2019-07-15T04:14:50.0000000Z"
}
Descriptions of body:
first_name |
User first name |
REQUIRED |
last_name |
User last name |
REQUIRED |
user_name |
User login/user name |
REQUIRED |
display_name |
User display name |
OPTIONAL |
password |
User password |
REQUIRED. |
|
User email address |
OPTIONAL |
role |
User role |
REQUIRED |
expires |
Account expiry date |
OPTIONAL (only if 'expires_after' is not specified). Specify a date+time (in UTC) when the account should expire. Cannot be combined with 'expires_after' property. |
expires_after |
Account expiry time span |
OPTIONAL
(only if 'expires' is not specified)
. Specify in DD:HH:MM:SS. Cannot be combined with 'expires' property. The value ranges are the following:
Boundaries: |
Request Code
200 |
OK |
successful request |
300 |
Ambiguous |
Invalid user type. |
400 |
Bad Request |
Invalid HTTP request |
401 |
Unauthorized |
Invalid/expired API key. |
403 |
Forbidden |
API key is incorrect |
409 |
Conflict |
Email address already exists. |
500 |
Internal Server Error |
Server is temporarily unavailable |
Response
Example of a successful request:
{
"created"
:
"2018-01-08T13:50:09.0000000Z"
,
"display_name"
:
null
,
"email"
:
"jdoe@opswat.com"
,
"expires"
:
"2019-07-15T04:14:50.0000000Z"
,
"first_name"
:
"John"
,
"groups"
:
null
,
"last_name"
:
"Doe"
,
"owner"
:
null
,
"role"
:
"User"
,
"status"
:
"Enabled"
,
"user_id"
:
2
,
"user_name"
:
"JohnD"
}
Descriptions of response:
created |
User's creation date |
display_name |
User's display name |
expires |
User's expiration date |
first_name |
User's first name |
groups |
Represents the groups where the user is included |
last_name |
User's last name |
owner |
Represents the guest user's owner. Value is null if user has other role than guest. |
role |
User's role. Possible values: User |
status |
User's availability status. Possible values: Disabled |
user_id |
Unique user ID |
user_name |
The username user to log in. |