- Moved GraphQL query samples into a new `docs/queries` directory for better organization. - Added new queries and mutations, including `createHost.graphql` and `GetApiVersion.graphql`. - Introduced `mcp-config.yaml` and updated `docker-compose.yml` for MCP integration. - Updated IntelliJ `.idea/workspace.xml` settings to reflect project changes. - Added new how-to guides (`docs/howtos`) for permissions, tags, MCP integration, and schema usage. - Enhanced tests by updating file paths and improving sample data locations. - Refined permissions and host group structures in `zabbix-hostgroups.ts` and `resolvers.ts`.
36 lines
627 B
GraphQL
36 lines
627 B
GraphQL
### Mutation
|
|
Use this mutation to import hosts and assign them to host groups.
|
|
|
|
```graphql
|
|
mutation ImportHosts($hosts: [CreateHost!]!) {
|
|
importHosts(hosts: $hosts) {
|
|
deviceKey
|
|
hostid
|
|
message
|
|
error {
|
|
message
|
|
code
|
|
data
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Variables
|
|
```json
|
|
{
|
|
"hosts": [
|
|
{
|
|
"deviceKey": "TEST_DEVICE_001",
|
|
"name": "Test Device 001",
|
|
"deviceType": "bt_device_tracker_generic",
|
|
"groupNames": ["ConstructionSite/Test"],
|
|
"location": {
|
|
"name": "Test Location",
|
|
"location_lat": "52.5200",
|
|
"location_lon": "13.4050"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
```
|