Add departments to a site department relation.
It is required for the relation to exist. Permission Level: Read-Write
POST /users/department/{relationName}/{relationType}/departments
Operation id: DepartmentService_AddDepartmentsSiteDepartmentRelation
Tags: DepartmentService
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
relationName | string | Yes | The name of the relation that you want to add the departments to. Required: true |
relationType | string | Yes | The type of the relation that you want to add the departments to. 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 | |
departments | array | No |
{
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"departments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "Used to lookup the department for validation"
},
"departmentName": {
"type": "string",
"description": "Populates propertyNameStatusValues.propertyNameStatusValues.name"
},
"departmentFriendlyName": {
"type": "string",
"description": "Populates propertyNameStatusValues.propertyNameStatusValues.friendlyName"
}
}
}
}
}
}
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
relationName | string | No | |
relationType | string | No | Enum with all possible values for the Site-Department relation type. |
tenantId | string | No | |
departments | array | No |
{
"type": "object",
"properties": {
"relationName": {
"type": "string"
},
"relationType": {
"type": "string",
"description": "Enum with all possible values for the Site-Department relation type.",
"enum": [
"SITE_TYPE",
"SITE_TIER"
],
"default": "SITE_TYPE"
},
"tenantId": {
"type": "string"
},
"departments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "Used to lookup the department for validation"
},
"departmentName": {
"type": "string",
"description": "Populates propertyNameStatusValues.propertyNameStatusValues.name"
},
"departmentFriendlyName": {
"type": "string",
"description": "Populates propertyNameStatusValues.propertyNameStatusValues.friendlyName"
}
}
}
}
}
}
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"
}
}
}
}
}
}