Create Profile¶
Creates a new profile for a specific tenant.
Resource Information¶
This service uses the tomcat application on port 8080 by default. To see a list of default ports click here
The context for this API is /crafter-profile
, please prefix the API URLs with this context.
HTTP Verb
|
POST
|
URL
|
/api/1/profile/create |
Response Formats
|
JSON |
Parameters¶
Name
|
Type
|
Required
|
Description
|
---|---|---|---|
accessTokenId
|
String
|
✓
|
The access token ID of the application
making the call
|
tenantName
|
String
|
✓
|
The name of the tenant to add the profile to
|
username
|
String
|
✓
|
The profile’s username
|
password
|
String
|
The profile’s password
|
|
email
|
String
|
✓
|
The profile’s email
|
enabled
|
String
|
✓
|
If the profile should be enabled or not
|
role
|
String
|
The profile’s roles
|
|
attributes
|
String
|
The additional attributes to add to the profile
(specify a JSON string)
|
|
verificationUrl
|
String
|
The URL (sans token) the user needs to go in case
it needs to verify the created profile
(verification depends on tenant)
|
Example¶
Request¶
POST .../api/1/profile/create
1accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d
2tenantName=sample-tenant
3username=john.doe
4password=passw0rd
5email=john.doe@example.com
6enabled=false
7attributes={"firstName":"John","lastName":"Doe"}
8verificationUrl
Response¶
Status 200 OK
1{
2 "username": "john.doe",
3 "email": "john.doe@example.com",
4 "verified": false,
5 "enabled": false,
6 "createdOn": 1495733716728,
7 "lastModified": 1495733716728,
8 "tenant": "sample-tenant",
9 "roles": [],
10 "attributes": {},
11 "id": "592715d4d4c650e226b03b62"
12}
Responses¶
Status
|
Location
|
Response Body
|
---|---|---|
200
|
See example above. |
|
400
|
{"errorCode":"PROFILE_EXISTS", "message":"A profile with
name \"john.doe\" already exists"}
|
|
500
|
|