> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-graphql-api/products/iam/api-reference/role-access.md).

# Role access

Reference for what a role grants: the workspaces it reaches, and the products, features, and data resources it covers, with the matching input types.

What a role grants: the workspaces it reaches, and the products, features, and data resources it covers, with the input types that set them.

## Objects

### IamSelection

A choice among a set of items: every current and future item when `all` is true, exactly `items` otherwise. What an item is depends on the field: a workspace id for `IamRole.workspaces`, a feature code for `IamRoleProductScope.features`, a data-resource item id for `IamRoleDataResourceGrant.items`.

| Field   | Type         | Description                                                                            |
| ------- | ------------ | -------------------------------------------------------------------------------------- |
| `all`   | `Boolean!`   | Whether every current and future item is selected. `items` is empty when this is true. |
| `items` | `[String!]!` | The selected items when `all` is false.                                                |

***

### IamRoleItemActions

The actions a role grants on one data-resource item, in place of its grant's `actions`.

| Field     | Type         | Description                          |
| --------- | ------------ | ------------------------------------ |
| `itemId`  | `String!`    | IAM's id for the data-resource item. |
| `actions` | `[String!]!` | The actions granted on this item.    |

***

### IamRoleDataResourceGrant

What a role grants on one data-resource type of a product.

| Field          | Type                                                                | Description                                                                      |
| -------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `resourceType` | [Code](/docs/navixy-graphql-api/core-api-reference/common.md#code)! | IAM's code for the data-resource type.                                           |
| `items`        | [IamSelection](#iamselection)!                                      | The items of this type the grant covers.                                         |
| `actions`      | `[String!]!`                                                        | The actions granted on every covered item, unless `itemActions` names the item.  |
| `itemActions`  | \[[IamRoleItemActions](#iamroleitemactions)!]!                      | Per-item overrides: an item listed here gets these actions instead of `actions`. |

***

### IamRoleDataResources

The data resources a role grants within one product.

| Field    | Type                                                       | Description                                                                                 |
| -------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `all`    | `Boolean!`                                                 | Whether every data resource of the product is granted. `byType` is empty when this is true. |
| `byType` | \[[IamRoleDataResourceGrant](#iamroledataresourcegrant)!]! | One grant per data-resource type when `all` is false, ordered by `resourceType`.            |

***

### IamRoleProductScope

What a role grants within one product.

| Field           | Type                                                                | Description                                              |
| --------------- | ------------------------------------------------------------------- | -------------------------------------------------------- |
| `productCode`   | [Code](/docs/navixy-graphql-api/core-api-reference/common.md#code)! | IAM's code for the product, such as `bdr` or `iam`.      |
| `features`      | [IamSelection](#iamselection)!                                      | The product's features the role grants, by feature code. |
| `dataResources` | [IamRoleDataResources](#iamroledataresources)!                      | The product's data resources the role grants.            |

***

### IamRoleProductScopes

The products a role grants.

| Field      | Type                                             | Description                                                                   |
| ---------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
| `all`      | `Boolean!`                                       | Whether the role grants every product. `specific` is empty when this is true. |
| `specific` | \[[IamRoleProductScope](#iamroleproductscope)!]! | One scope per product when `all` is false.                                    |

***

## Inputs

### IamSelectionInput

A selection to store: every current and future item when `all` is true, exactly `items` otherwise.

| Field   | Type         | Description                                                                    |
| ------- | ------------ | ------------------------------------------------------------------------------ |
| `all`   | `Boolean!`   | Whether every current and future item is selected. `items` must then be empty. |
| `items` | `[String!]!` | The selected items when `all` is false.                                        |

***

### IamRoleItemActionsInput

The actions to grant on one data-resource item, in place of its grant's `actions`.

| Field     | Type         | Description                                                  |
| --------- | ------------ | ------------------------------------------------------------ |
| `itemId`  | `String!`    | IAM's id for the data-resource item. At most once per grant. |
| `actions` | `[String!]!` | The actions to grant on this item.                           |

***

### IamRoleDataResourceGrantInput

What to grant on one data-resource type of a product.

| Field          | Type                                                                | Description                                                                      |
| -------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `resourceType` | [Code](/docs/navixy-graphql-api/core-api-reference/common.md#code)! | IAM's code for the data-resource type. At most once per product.                 |
| `items`        | [IamSelectionInput](#iamselectioninput)!                            | The items of this type to cover.                                                 |
| `actions`      | `[String!]!`                                                        | The actions to grant on every covered item, unless `itemActions` names the item. |
| `itemActions`  | \[[IamRoleItemActionsInput](#iamroleitemactionsinput)!]!            | Per-item overrides.                                                              |

***

### IamRoleDataResourcesInput

The data resources to grant within one product.

| Field    | Type                                                                 | Description                                                                       |
| -------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `all`    | `Boolean!`                                                           | Whether to grant every data resource of the product. `byType` must then be empty. |
| `byType` | \[[IamRoleDataResourceGrantInput](#iamroledataresourcegrantinput)!]! | One grant per data-resource type when `all` is false.                             |

***

### IamRoleProductScopeInput

What to grant within one product.

| Field           | Type                                                                | Description                                        |
| --------------- | ------------------------------------------------------------------- | -------------------------------------------------- |
| `productCode`   | [Code](/docs/navixy-graphql-api/core-api-reference/common.md#code)! | IAM's code for the product. At most once per role. |
| `features`      | [IamSelectionInput](#iamselectioninput)!                            | The features to grant, by feature code.            |
| `dataResources` | [IamRoleDataResourcesInput](#iamroledataresourcesinput)!            | The data resources to grant.                       |

***

### IamRoleProductScopesInput

The products to grant.

| Field      | Type                                                       | Description                                                    |
| ---------- | ---------------------------------------------------------- | -------------------------------------------------------------- |
| `all`      | `Boolean!`                                                 | Whether to grant every product. `specific` must then be empty. |
| `specific` | \[[IamRoleProductScopeInput](#iamroleproductscopeinput)!]! | One scope per product when `all` is false.                     |

***

## See also

* [Error handling](/docs/navixy-graphql-api/error-handling.md)
* [Limits](/docs/navixy-graphql-api/limits.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://navixy.com/docs/navixy-graphql-api/products/iam/api-reference/role-access.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
