Add Roles

Adds the given roles 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/roles/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
role
String
✓
The roles to add

Example

Request

POST .../api/1/tenant/sample-tenant/roles/add
accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d
role=APP_TEST,APP_REPORT

Response

Status 200 OK

 1{
 2  "name": "sample-tenant",
 3  "verifyNewProfiles": true,
 4  "availableRoles": [
 5    "APP_ADMIN",
 6    "APP_TEST",
 7    "APP_REPORT",
 8    "APP_USER"
 9  ],
10  "ssoEnabled": false,
11  "attributeDefinitions": [
12    {
13      "permissions": [
14        {
15          "allowedActions": [
16            "*"
17          ],
18          "application": "*"
19        }
20      ],
21      "name": "firstName",
22      "metadata": {
23        "label": "First Name",
24        "type": "TEXT",
25        "displayOrder": 0.0
26      },
27      "defaultValue": null
28    },
29    {
30      "permissions": [
31        {
32          "allowedActions": [
33            "*"
34          ],
35          "application": "*"
36        }
37      ],
38      "name": "lastName",
39      "metadata": {
40        "label": "Last Name",
41        "type": "TEXT",
42        "displayOrder": 1.0
43      },
44      "defaultValue": null
45    },
46    {
47      "permissions": [
48        {
49          "allowedActions": [
50            "*"
51          ],
52          "application": "*"
53        }
54      ],
55      "name": "avatarLink",
56      "metadata": {
57        "label": "Avatar Link",
58        "type": "TEXT",
59        "displayOrder": 3.0
60      },
61      "defaultValue": null
62    }
63  ],
64  "id": "5926f6d9d4c650e226b03b61"
65}

Responses

Status
Location
Response Body
200

See example above.

400



{"errorCode":"NO_SUCH_TENANT", "message":"No tenant
with name \"test\" found"}
500

{ "message" : "Internal server error" }