List of inventory objects.
Example request:
GET /api/v2/objects/ HTTP/1.1
Example response:
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, POST, HEAD, OPTIONS
[
{
"id": 353,
"name": "ci-slave13-scc.fuel-infra.org",
"location": {
"name": "Moscow",
"fact": "msk"
},
"type": {
"name": "HW Server"
},
"labels": [],
"attributes": {
"zabbix_host_id": "10586",
"puppet_manifests_version": "$Id: 705d0793d2b22d879ec5132c9148685976c68dac $",
"fqdn": "ci-slave13-scc.fuel-infra.org",
"hardware": ""
},
"responsible": []
},
...
]
Query Parameters: | |
---|---|
|
Create inventory object.
Example request:
POST /api/v2/objects/ HTTP/1.1
{
"attributes": {
"fqdn": "myhost.local",
"zabbix_host_id": "11235"
},
"labels": [],
"location": null,
"name": "myhost.local",
"responsible": [],
"type": null
}
Example response:
HTTP/1.1 200 OK
{
"attributes": {
"fqdn": "myhost.local",
"zabbix_host_id": "11235"
},
"labels": [],
"location": null,
"name": "myhost.local",
"responsible": [],
"type": null
}
Example request:
PUT /api/v2/objects/ HTTP/1.1
{
"attributes": {
"fqdn": "myhost.local",
"zabbix_host_id": "11235"
},
"id": 1,
"labels": [],
"location": null,
"name": "myhost.local",
"responsible": [],
"type": null
}
Example response:
HTTP/1.1 200 OK
{
"attributes": {
"fqdn": "myhost.local",
"zabbix_host_id": "11235"
},
"id": 1,
"labels": [],
"location": null,
"name": "myhost.local",
"responsible": [],
"type": null
}
Example request:
DELETE /api/v2/objects/ HTTP/1.1
Example response:
HTTP/1.1 204 No Content