AttackForge Enterprise & AttackForge Core
Powered By GitBook
CreateUser
This method can be used for the following functionality: Create a new user in AttackForge.

Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

Headers

1
POST /api/ss/user HTTP/1.1
2
Host: demo.attackforge.com
3
X-SSAPI-KEY: APIKey
4
Content-Type: application/json
5
Connection: close
Copied!

Query

first_name (string)
First name of the user.
Example:
1
{
2
"first_name": "..."
3
}
Copied!
last_name (string)
Last name of the user.
Example:
1
{
2
"last_name": "..."
3
}
Copied!
username (string)
Username of the user. If SSO is enabled, should be username in external identity provider. If SSO is disabled, should be email address.
Example:
1
{
2
"username": "..."
3
}
Copied!
email (string)
Email address of the user.
Example:
1
{
2
"email": "..."
3
}
Copied!
password (string)
Password. Should be minimum 15 characters in length.
Example:
1
{
2
"password": "..."
3
}
Copied!
role (string)
Role of the user. Must be one of the following: admin, librarymod, client, consultant, projectoperator.
Example:
1
{
2
"role": "..."
3
}
Copied!
mfa (string)
Whether MFA is enabled or disabled for the user. Must be one of the following: Yes, No.
Example:
1
{
2
"mfa": "..."
3
}
Copied!

Example

The following example is a cURL request to create a new user.

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.
1
curl -X POST 'https://demo.attackforge.com/api/ss/user' -H 'Host: demo.attackforge.com' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
2
"first_name": "John",
3
"last_name": "Citizen",
4
"username": "[email protected]",
5
"email": "[email protected]",
6
"password": "ThisIsASuperLongPassword",
7
"role": "client",
8
"mfa": "Yes"
9
}'
Copied!

Response

Response contains a user object.
1
{
2
"user": {
3
"id": "...",
4
"first_name": "...",
5
"last_name": "...",
6
"email": "...",
7
"username": "...",
8
"status": "...",
9
"role": "...",
10
"mfa": "..."
11
}
12
}
Copied!
Last modified 11mo ago