Get Unit
GET/api/v1/units/:unit
Get a Unit by its ID.
Request
Path Parameters
unit integerrequired
Possible values: > 0
ID of the Unit
Responses
- 200
- 400
- 401
- 404
Success
- application/json
- Schema
- Example (from schema)
Schema
id integerrequired
ID of the Unit
Possible values: > 0
Example:
1000name stringrequired
Name of the Unit
Example:
Unit 1createdAt date-timerequired
Creation Date of the Unit
Example:
2025-08-25T19:29:40.666ZupdatedAt date-timerequired
Update Date of the Unit
Example:
2025-08-25T19:29:40.666Zworkspace
object
required
id integerrequired
ID of the Workspace
Possible values: > 0
Example:
1000name stringrequired
Name of the Workspace
Example:
Workspace 1asset
object
required
id integerrequired
ID of the Asset
Possible values: > 0
Example:
1000name stringrequired
Name of the Asset
Example:
Asset 1division
object
required
id integerrequired
ID of the Division
Possible values: > 0
Example:
1000name stringrequired
Name of the Division
Example:
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 [
]
status stringrequired
Possible values: [Validation Error]
errors
object[]
required
error stringrequired
location stringrequired
Possible values: [body, query, path, headers]
{
"status": "Validation Error",
"errors": [
{
"error": "string",
"location": "body"
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
status stringrequired
Possible values: [Unauthorized]
{
"status": "Unauthorized"
}
Unit not found
- application/json
- Schema
- Example (from schema)
Schema
status stringrequired
Possible values: [Unit not found]
{
"status": "Unit not found"
}
Loading...