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

# Set the stream access level

`PUT /_api/user/{user}/database/{geofabric}/stream/{stream}`

## 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/stream/:stream/put.ts> (a function with typed inputs; its response is checked against the schema)

Set the stream access levels for the *stream* of API key with *keyid*.

If access level for stream is not set the default("&#42;") access level is used. If default("&#42;") access level is also not set the GeoFabric access level is used.

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

## Path parameters

- `user` string, string, required
- `geofabric` string, string, required
- `stream` string, string, required

## Request body

- UserGrantDatabase
  - `grant` string, required: - Use "rw" to set the GeoFabric access level to *Administrate*. - Use "ro" to set the GeoFabric access level to *Access*. - Use "none" to set the database access level to *No access*.

## Response `200`

Successfully set stream access level.

- 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 collection

---

[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)
