---
title: "Set the query worker access level"
method: PUT
path: "/_api/key/{keyid}/database/{geofabric}/restql/{query-worker}"
tags: ["API Keys"]
---

# Set the query worker access level

`PUT /_api/key/{keyid}/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/key/:keyid/database/:geofabric/restql/:query-worker/put.ts> (a function with typed inputs; its response is checked against the schema)

Sets the access level for the *query worker* in the GeoFabric *geofabric* for an API key with *keyid*.

Requires a JSON object with these properties:

  - **grant**: 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*.

 - **query worker**: Use "&#42;" to set default access level for all query workers.

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

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

## Path parameters

- `keyid` 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, API key, 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)
