Update Unit
PUT/api/v1/units/:unit
Update a Unit. Requires editor role.
Request
Path Parameters
Possible values: > 0
ID of the Unit
Query Parameters
Possible values: [true, false]
Force creation of parent resources if they don't exist
false- application/json
Body
Body
Name of the Asset
Asset 1Name of the Division
Division 1Name of the Unit
Unit 1Responses
- 200
- 400
- 401
- 403
- 404
Success
- application/json
- Schema
- Example (from schema)
Schema
ID of the Unit
Possible values: > 0
1000Name of the Unit
Unit 1Creation Date of the Unit
2025-08-25T19:29:40.666ZUpdate Date of the Unit
2025-08-25T19:29:40.666Zworkspace
object
required
ID of the Workspace
Possible values: > 0
1000Name of the Workspace
Workspace 1asset
object
required
ID of the Asset
Possible values: > 0
1000Name of the Asset
Asset 1division
object
required
ID of the Division
Possible values: > 0
1000Name of the Division
Division 1{
"id": 1000,
"name": "Unit 1",
"createdAt": "2025-08-25T19:29:40.666Z",
"updatedAt": "2025-08-25T19:29:40.666Z",
"workspace": {
"id": 1000,
"name": "Workspace 1"
},
"asset": {
"id": 1000,
"name": "Asset 1"
},
"division": {
"id": 1000,
"name": "Division 1"
}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Possible values: [Validation Error]
errors
object[]
required
Possible values: [body, query, path, headers]
{
"status": "Validation Error",
"errors": [
{
"error": "string",
"location": "body"
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [Unauthorized]
{
"status": "Unauthorized"
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [Forbidden]
{
"status": "Forbidden"
}
404
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
- MOD3
oneOf
Unit not found
Possible values: [Unit not found]
Asset not found
Possible values: [Asset not found]
Division not found
Possible values: [Division not found]
{}