Add roles to a site.
It is required a site and list of roles to be added. Permission Level: Read-Write
POST /users/site/{siteName}/roles
Operation id: SiteService_AddSiteRoles
Tags: SiteService
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
siteName | string | Yes | Name of the site. Required: true |
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": {
"tenantId": {
"type": "string",
"description": "The ID of the tenant. Required: false. Defaults to the tenant of the user making the call."
},
"domain": {
"type": "string",
"description": "The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)\nDefaults to the domain in the request."
},
"scope": {
"type": "string",
"description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
},
"roleId": {
"type": "string",
"description": "The role ID. Required: true."
},
"userIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
site | object | No |
{
"type": "object",
"properties": {
"site": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"parent": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"ancestors": {
"type": "array",
"items": {
"type": "string"
}
},
"descendants": {
"type": "array",
"items": {
"type": "string"
}
},
"displayName": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"scope": {
"type": "string"
},
"fieldName": {
"type": "string"
},
"value": {
"type": "string"
},
"domain": {
"type": "string"
}
}
}
},
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "The ID of the tenant. Required: false. Defaults to the tenant of the user making the call."
},
"domain": {
"type": "string",
"description": "The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)\nDefaults to the domain in the request."
},
"scope": {
"type": "string",
"description": "Some more general scoping for the data (like a particular app in the domain). Required: false."
},
"roleId": {
"type": "string",
"description": "The role ID. Required: true."
},
"userIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"enabledScopes": {
"type": "object"
},
"creationTime": {
"type": "string",
"format": "date-time"
},
"domain": {
"type": "string"
},
"lastUpdated": {
"type": "string",
"format": "date-time"
},
"description": {
"type": "string"
},
"siteType": {
"type": "string"
},
"siteTier": {
"type": "string"
},
"isHierarchyNode": {
"type": "boolean",
"description": "True if is a Retail Operating Model \"Hierarchy Node\", false if it is a Retail Operating Model \"Site\".\nDefaults to a Retail Operating Model \"Site\" if not included."
}
}
}
}
}
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"
}
}
}
}
}
}