• Document Up to Date

Update Tenant

Updates the given 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/update
Response Formats
JSON

Parameters

Name
Type
Required
Description
accessTokenId

String


The access token ID of the application
making the call

Example

Request

POST .../api/1/tenant/update?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

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

Response

Status 200 OK

 1{
 2  "name": "sample-tenant",
 3  "verifyNewProfiles": true,
 4  "availableRoles": [
 5    "APP_ADMIN",
 6    "APP_USER"
 7  ],
 8  "ssoEnabled": true,
 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.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.0
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.0
58      },
59      "defaultValue": null
60    }
61  ],
62  "id": "5926f218d4c6ad51e5e44f47"
63}

Responses

Status
Location
Response Body
200

See example above.

400



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

{ "message" : "Internal server error" }