Bulk create Site-Department relationships.
Permission Level: Read-Write
POST /users/site/relation
Operation id: SiteService_BulkCreateSiteDepartmentRelationships
Tags: SiteService
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 | Populates propertyCharacteristicsAndValues.tenantId |
siteDepartmentRelations | array | No |
{
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "Populates propertyCharacteristicsAndValues.tenantId"
},
"siteDepartmentRelations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"relationshipName": {
"type": "string",
"description": "Populates Part 1 of Property Name [It can have underscores, but no spaces for now and in CAPS will be preferred, as it is a SYSTEM_ATTRIBUTE for the system]"
},
"siteDepartmentRelationType": {
"type": "string",
"description": "Enum with all possible values for the Site-Department relation type.",
"enum": [
"SITE_TYPE",
"SITE_TIER"
],
"default": "SITE_TYPE"
},
"departments": {
"type": "array",
"items": {
"type": "object"
}
},
"sites": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
}
Response models
200 — A successful response.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
created | integer (int32) | No | |
updated | integer (int32) | No | |
errors | array | No |
{
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int32"
},
"updated": {
"type": "integer",
"format": "int32"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"message": {
"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"
}
}
}
}
}
}