zabbix-graphql-api/docs/queries/sample_import_user_rights_mutation.graphql
Andreas Hilbig 4ec61ffba1 chore: add MCP integration and refactor documentation into modular how-to guides
- 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`.
2026-01-30 00:47:02 +01:00

50 lines
833 B
GraphQL

### Mutation
Use this mutation to import user rights (roles and groups).
```graphql
mutation ImportUserRights($input: UserRightsInput!, $dryRun: Boolean) {
importUserRights(input: $input, dryRun: $dryRun) {
userRoles {
id
name
message
}
userGroups {
id
name
message
}
}
}
```
### Variables
```json
{
"input": {
"userRoles": [
{
"name": "Test Role",
"type": 1,
"rules": {
"api_access": 1,
"api": ["host.get", "item.get"]
}
}
],
"userGroups": [
{
"name": "Test Group",
"gui_access": 0,
"hostgroup_rights": [
{
"name": "ConstructionSite/Test",
"permission": "READ_WRITE"
}
]
}
]
},
"dryRun": false
}
```