Create Asset
POST/api/v1/assets
Create a new Asset. Requires editor role.
Request
- application/json
Body
Body
workspace stringrequired
Name of the Workspace
Example:
Workspace 1asset stringrequired
Name of the Asset
Example:
Asset 1type string
Type of the Asset
Default value:
DefaultExample:
Vesseldescription stringnullable
Description of the Asset
Example:
DescriptionResponses
- 201
- 400
- 401
- 403
- 404
- 409
Success
- application/json
- Schema
- Example (from schema)
Schema
id integerrequired
ID of the Asset
Possible values: > 0
Example:
1000name stringrequired
Name of the Asset
Example:
Asset 1createdAt date-timerequired
Creation Date of the Asset
Example:
2025-08-25T19:29:40.666ZupdatedAt date-timerequired
Update Date of the Asset
Example:
2025-08-25T19:29:40.666Ztype stringrequired
Type of the Asset
Example:
Vesseldescription stringnullablerequired
Description of the Asset
Example:
Descriptionworkspace
object
required
id integerrequired
ID of the Workspace
Possible values: > 0
Example:
1000name stringrequired
Name of the Workspace
Example:
Workspace 1{
"id": 1000,
"name": "Asset 1",
"createdAt": "2025-08-25T19:29:40.666Z",
"updatedAt": "2025-08-25T19:29:40.666Z",
"type": "Vessel",
"description": "Description",
"workspace": {
"id": 1000,
"name": "Workspace 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"
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
status stringrequired
Possible values: [Forbidden]
{
"status": "Forbidden"
}
Workspace not found
- application/json
- Schema
- Example (from schema)
Schema
status stringrequired
Possible values: [Workspace not found]
{
"status": "Workspace not found"
}
Asset already exists
- application/json
- Schema
- Example (from schema)
Schema
status stringrequired
Possible values: [Asset already exists]
{
"status": "Asset already exists"
}
Loading...