Add Attributes
Adds the given attribute definitions to the specified 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/tenant/:name/attribute_definitions/add |
Response Formats
|
JSON |
Parameters
Name
|
Type
|
Required
|
Description
|
---|---|---|---|
accessTokenId
|
String
|
✓
|
The access token ID of the application
making the call
|
name
|
String
|
✓
|
The tenant’s name
|
Example
Request
POST .../api/1/tenant/sample-tenant/attribute_definitions/add?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d
1[
2 {
3 "permissions": [
4 {
5 "allowedActions": [
6 "*"
7 ],
8 "application": "*"
9 }
10 ],
11 "name": "nickname",
12 "metadata": {
13 "label": "Nickname",
14 "type": "TEXT",
15 "displayOrder": 1.0
16 },
17 "defaultValue": null
18 }
19]
Response
Status 200 OK
1{
2 "name": "sample-tenant",
3 "verifyNewProfiles": false,
4 "availableRoles": [
5 "APP_ADMIN",
6 "APP_USER"
7 ],
8 "ssoEnabled": false,
9 "attributeDefinitions": [
10 {
11 "permissions": [
12 {
13 "allowedActions": [
14 "*"
15 ],
16 "application": "*"
17 }
18 ],
19 "name": "firstName",
20 "metadata": {
21 "label": "First Name",
22 "type": "TEXT",
23 "displayOrder": 0
24 },
25 "defaultValue": null
26 },
27 {
28 "permissions": [
29 {
30 "allowedActions": [
31 "*"
32 ],
33 "application": "*"
34 }
35 ],
36 "name": "lastName",
37 "metadata": {
38 "label": "Last Name",
39 "type": "TEXT",
40 "displayOrder": 1
41 },
42 "defaultValue": null
43 },
44 {
45 "permissions": [
46 {
47 "allowedActions": [
48 "*"
49 ],
50 "application": "*"
51 }
52 ],
53 "name": "avatarLink",
54 "metadata": {
55 "label": "Avatar Link",
56 "type": "TEXT",
57 "displayOrder": 3
58 },
59 "defaultValue": null
60 },
61 {
62 "permissions": [
63 {
64 "allowedActions": [
65 "*"
66 ],
67 "application": "*"
68 }
69 ],
70 "name": "nickname",
71 "metadata": {
72 "label": "Nickname",
73 "type": "TEXT",
74 "displayOrder": 1.0
75 },
76 "defaultValue": null
77 }
78 ],
79 "id": "59284656d4c650213cc2f3fb"
80}
Responses
Status
|
Location
|
Response Body
|
---|---|---|
200
|
See example above. |
|
400
|
{"errorCode":"NO_SUCH_TENANT",
"message": "No tenant with name
\"test\" found"}
|
|
500
|
|