assets
POST/v1/observability/assets
You can create multiple assets simultaneously. To do so, simply add multiple objects to the assets array. If ncScale finds an asset with the same element_id and tool_id, we will update it. Otherwise, a new asset will be created.
Request
- application/json
Body
Array [
]
assets
object[]
required
Responses
- 200
- 400
- 401
- 500
200
Response Headers
Connection
string
Content-Length
string
Date
string
ETag
string
Keep-Alive
string
X-Powered-By
string
X-RateLimit-Limit
string
X-RateLimit-Remaining
string
X-RateLimit-Reset
string
- application/json
- Schema
- Example (from schema)
- 200
Schema
{
"message": "ok"
}
{
"message": "ok"
}
400
Response Headers
Connection
string
Content-Length
string
Date
string
ETag
string
Keep-Alive
string
X-Powered-By
string
X-RateLimit-Limit
string
X-RateLimit-Remaining
string
X-RateLimit-Reset
string
- application/json
- Schema
- Example (from schema)
- 400
Schema
Array [
]
[
{
"field": "assets[0].tool_id",
"message": "The 'assets[0].tool_id' field is required.",
"type": "required"
},
{
"field": "assets[0].name",
"message": "The 'assets[0].name' field is required.",
"type": "required"
},
{
"field": "assets[0].active",
"message": "The 'assets[0].active' field is required.",
"type": "required"
},
{
"field": "assets[0].composition",
"message": "The 'assets[0].composition' field is required.",
"type": "required"
},
{
"field": "assets[0].priority",
"message": "The 'assets[0].priority' field is required.",
"type": "required"
},
{
"field": "assets[0].last_edited",
"message": "The 'assets[0].last_edited' field is required.",
"type": "required"
}
]
[
{
"field": "assets[0].tool_id",
"message": "The 'assets[0].tool_id' field is required.",
"type": "required"
},
{
"field": "assets[0].name",
"message": "The 'assets[0].name' field is required.",
"type": "required"
},
{
"field": "assets[0].active",
"message": "The 'assets[0].active' field is required.",
"type": "required"
},
{
"field": "assets[0].composition",
"message": "The 'assets[0].composition' field is required.",
"type": "required"
},
{
"field": "assets[0].priority",
"message": "The 'assets[0].priority' field is required.",
"type": "required"
},
{
"field": "assets[0].last_edited",
"message": "The 'assets[0].last_edited' field is required.",
"type": "required"
}
]
401
Response Headers
Connection
string
Content-Length
string
Date
string
ETag
string
Keep-Alive
string
X-Powered-By
string
- application/json
- Schema
- Example (from schema)
- 401
Schema
{
"message": "Unauthorized",
"status": 401
}
{
"message": "Unauthorized",
"status": 401
}
500
Response Headers
Connection
string
Content-Length
string
Date
string
ETag
string
Keep-Alive
string
X-Powered-By
string
X-RateLimit-Limit
string
X-RateLimit-Remaining
string
X-RateLimit-Reset
string
- application/json
- Schema
- Example (from schema)
- 500
Schema
{
"code": "23503",
"constraint": "fk_2af5a5c8f7b22cc",
"detail": "Key (tool_id)=() is not present in table \"tool\".",
"file": "ri_triggers.c",
"length": 240,
"line": "2608",
"name": "error",
"routine": "ri_ReportViolation",
"schema": "public",
"severity": "ERROR",
"table": "asset"
}
{
"code": "23503",
"constraint": "fk_2af5a5c8f7b22cc",
"detail": "Key (tool_id)=() is not present in table \"tool\".",
"file": "ri_triggers.c",
"length": 240,
"line": "2608",
"name": "error",
"routine": "ri_ReportViolation",
"schema": "public",
"severity": "ERROR",
"table": "asset"
}