objects handler allows to perform the following operations:
- get
- create
- update
- delete
Action is defined by HTTP method used for request.
Example:
Request:
GET /api/v2/objects/
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:
POST /api/v2/objects/
{
"attributes": {
"fqdn": "myhost.local",
"zabbix_host_id": "11235"
},
"labels": [],
"location": null,
"name": "myhost.local",
"responsible": [],
"type": null
}
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/
{
"attributes": {
"fqdn": "myhost.local",
"zabbix_host_id": "11235"
},
"id": 1,
"labels": [],
"location": null,
"name": "myhost.local",
"responsible": [],
"type": null
}
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
}