Add a list of roles to a Site Template.
Permission Level: Read-Write
POST /users/site-template/{siteTemplateId}/roles
Operation id: SiteTemplateService_AddRolesToSiteTemplate
Tags: SiteTemplateService
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
siteTemplateId | string | Yes |
Security
- Authorization (apiKey)
- Bearer token
Responses
200 — A successful response.
Content type: application/json
default — An unexpected error response.
Content type: application/json
Request body
Required: Yes
application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
tenantId | string | No | |
roles | array | No |
{
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"roleId": {
"type": "string"
},
"scope": {
"type": "string"
},
"domain": {
"type": "string"
},
"autoAssigned": {
"type": "boolean"
},
"tenantId": {
"type": "string"
}
}
}
}
}
}
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
siteTemplateId | string | No | |
tenantId | string | No | |
friendlyName | string | No | |
departments | array | No | |
roles | array | No | |
siteAttributes | array | No | |
allRoles | boolean | No | |
allDepartments | boolean | No | |
allSiteAttributes | boolean | No | |
creationTime | string (date-time) | No | |
lastUpdated | string (date-time) | No | |
attributes | array | No | |
departmentDetails | array | No | The departments that the site_template is assigned to. This is to support UI for getting the details part of the graphQL query. In V3, we can remove the existing departments field and use this one instead. |
{
"type": "object",
"properties": {
"siteTemplateId": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"friendlyName": {
"type": "string"
},
"departments": {
"type": "array",
"items": {
"type": "string"
}
},
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"roleId": {
"type": "string"
},
"scope": {
"type": "string"
},
"domain": {
"type": "string"
},
"autoAssigned": {
"type": "boolean"
},
"tenantId": {
"type": "string"
}
}
}
},
"siteAttributes": {
"type": "array",
"items": {
"type": "string"
}
},
"allRoles": {
"type": "boolean"
},
"allDepartments": {
"type": "boolean"
},
"allSiteAttributes": {
"type": "boolean"
},
"creationTime": {
"type": "string",
"format": "date-time"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"scope": {
"type": "string"
},
"fieldName": {
"type": "string"
},
"value": {
"type": "string"
},
"domain": {
"type": "string"
}
}
}
},
"departmentDetails": {
"type": "array",
"description": "The departments that the site_template is assigned to. This is to support UI for getting the details part of the graphQL query.\nIn V3, we can remove the existing departments field and use this one instead.",
"items": {
"type": "object",
"description": "Protobuf created to represent a Department.\nUsing this name because UniqueDepartmentProto is already used for another use case.",
"properties": {
"tenantId": {
"type": "string"
},
"departmentName": {
"type": "string"
}
}
}
}
}
}
default — An unexpected error response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
code | integer (int32) | No | |
message | string | No | |
details | array | No |
{
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
}
}
}
}
}