---
title: "Set the query worker access level"
method: PUT
path: "/_api/user/{user}/database/{geofabric}/restql/{query-worker}"
tags: ["Users"]
---

# Set the query worker access level

`PUT /_api/user/{user}/database/{geofabric}/restql/{query-worker}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/user/:user/database/:geofabric/restql/:query-worker/put.ts> (a function with typed inputs; its response is checked against the schema)

Set the access level for the *query worker* in the GeoFabric *geofabric* for user *user*.

If access level for query worker is not set, then default("&#42;") access level is used. If default("&#42;") access level is also not set, then GeoFabric access level is used.

**Note**: Requires *administrator* permissions.

## Path parameters

- `user` string, string, required
- `geofabric` string, string, required
- `query-worker` string, string, required

## Request body

- UserGrantQueryworker
  - `grant` string, required: - Use "rw" to set the query worker level access to *Read/Write*. - Use "ro" to set the query worker level access to *Read Only*. - Use "none" to set the query worker level access to *No access*.

## Response `200`

Successfully changed access permissions.

- unknown

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed to validate because you do not have access to the GeoFabric.
- `403`: Failed to validate because you do not have access to the server.
- `404`: Failed to find specified fabric, user, or query worker

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
