# Vendia CLI command - node

## `share node`

Manage **project** **workspaces**.

## Commands

Manage **workspaces** in a **project**

### Usage for `share node`
```
share node <subcommand>
```

| Subcommand | Description |
| :-- | :-- |
| [`node add-api-key`](https://docs.vendia.com/platform/cli/commands/node#node-add-api-key) | Add an API Key |
| [`node add-jwt-auth`](https://docs.vendia.com/platform/cli/commands/node#node-add-jwt-auth) | Add a custom JWT Authentication Provider to a **workspace** |
| [`node get`](https://docs.vendia.com/platform/cli/commands/node#node-get) | Get **workspace** configuration |
| [`node grant-access`](https://docs.vendia.com/platform/cli/commands/node#node-grant-access) | Grant user access to a **workspace** |
| [`node remove-jwt-auth`](https://docs.vendia.com/platform/cli/commands/node#node-remove-jwt-auth) | Remove a custom JWT Authentication Provider from a **workspace** |
| [`node revoke-access`](https://docs.vendia.com/platform/cli/commands/node#node-revoke-access) | Revoke a user’s access to a **workspace** |
| [`node schema`](https://docs.vendia.com/platform/cli/commands/node#node-schema) | Fetch a **workspace**’s GraphQL Schema |
| [`node sharing-policy`](https://docs.vendia.com/platform/cli/commands/node#node-sharing-policy) | Manage sharing policies for a **workspace** |
| [`node update`](https://docs.vendia.com/platform/cli/commands/node#node-update) | Update **workspace** configuration |

### Examples for `share node`
```
❯ Get workspace info

share node get --uni <uniName>

share node get --uni <uniName> --node <nodeName>

share node get --uni <uniName> --node <nodeName> --json | jq '.'

❯ Update workspace settings

share node update --uni <uniName> --node <nodeName> --config '{"blockReportEmails":["email@email.com"]}'

❯ Get workspace GraphQL schema

share node schema --uni <uniName>

share node schema --uni <uniName> --node <nodeName>

❯ Grant one or more users access to a workspace

share node grant-access --uni <uniName> --node <nodeName> --user john@acme.com --user jill@acme.com --accessLevel ALL

❯ Revoke one or more users' access to a workspace

share node revoke-access --uni <uniName> --node <nodeName> --user john@acme.com --user jill@acme.com

❯ Add an API Key for a workspace

share node add-api-key --uni <uniName> --node <nodeName> --name <name> --expiry <expiry>

❯ Add a JWT Authentication Provider

share node add-jwt-auth --uni <uniName> --node <nodeName> --name <name> --jwksUrl <jwksUrl> --issuer <issuer> --audience <audience> --scopes <scopes>

❯ Remove a JWT Authentication Provider

share node remove-jwt-auth --uni <uniName> --node <nodeName> --name <name>
```

## `node add-api-key`

Add an API Key.

### Usage for `node add-api-key`
```
share node add-api-key
```

### Flags for `node add-api-key`
- `uni` ( _option_) \- The name of **project**
- `node` ( _option_) \- The name of **workspace** to modify
- `name` ( _option_) \- The name of the API Key
- `expiry` ( _option_) \- The expiration date of the API Key

### Examples for `node add-api-key`
```
share node add-api-key --uni <uniName> --node <nodeName> --name <name> --expiry <expiry>
```

## `node add-jwt-auth`

Add a custom JWT Authentication Provider to a **workspace**.

### Usage
```
share node add-jwt-auth
```

### Flags for `node add-jwt-auth`
- `uni` ( _option_) \- The name of **project**
- `node` ( _option_) \- The name of **workspace** to modify
- `name` ( _option_) \- A unique resource name for this JWT (JSON Web Token) authentication.
- `jwksUrl` ( _option_) - The JSON Web Key Set (JWKS) is a set of keys containing the public keys used to verify any JSON Web Token (JWT) issued by the authorization server and signed using the RS256 signing algorithm.
- `issuer` ( _option_) \- The ‘iss’ (issuer) claim identifies the principal that issued the JWT.
- `audience` ( _option_) \- The ‘aud’ (audience) claim identifies the recipients that the JWT is intended for.
- `scopes` ( _option_) \- The scopes required to access the API resource. Separated by spaces (eg. “read:product write:product”).

### Examples for `node add-jwt-auth`
```
share node add-jwt-auth --uni <uniName> --node <nodeName> --name <name> --jwksUrl <jwksUrl> --issuer <issuer> --audience <audience> --scopes <scopes>
```

## `node get`

Get **workspace** configuration.

### Usage for `node get`
```
share node get
```

### Flags for `node get`
- `uni` ( _option_) \- Name of **project**
- `node` ( _option_) \- Name of **workspace**
- `json` ( _boolean_) \- Output return values as JSON
- `role` ( _option_) \- Role name to use for the operation

### Examples for `node get`
```
share node get --uni <uniName>

share node get --uni <uniName> --node <nodeName>

share node get --uni <uniName> --node <nodeName> --json | jq '.'
```

## `node grant-access`

Grant user access to a **workspace**.

### Usage for `node grant-access`
```
share node grant-access
```

### Flags for `node grant-access`
- `uni` ( _option_) \- The name of **project**
- `node` ( _option_) \- The name of **workspace** to modify
- `user` ( _option_) \- E-mail address of the user to which to grant access
- `accessLevel` ( _option_) \- Access level to grant user(s)

### Examples for `node grant-access`
```
share node grant-access --uni <uniName> --node <nodeName> --user john@acme.com --user jill@acme.com --accessLevel ALL
```

## `node remove-jwt-auth`

Remove a custom JWT Authentication Provider from a **workspace**.

### Usage for `node remove-jwt-auth`
```
share node remove-jwt-auth
```

### Flags for `node remove-jwt-auth`
- `uni` ( _option_) \- The name of **project**
- `node` ( _option_) \- The name of **workspace** to modify
- `name` ( _option_) \- A unique resource name for this JWT (JSON Web Token) authentication.

### Examples for `node remove-jwt-auth`
```
share node remove-jwt-auth --uni <uniName> --node <nodeName> --name <name>
```

## `node revoke-access`

Revoke a user’s access to a **workspace**.

### Usage for `node revoke-access`
```
share node revoke-access
```

### Flags for `node revoke-access`
- `uni` ( _option_) \- The name of **project**
- `node` ( _option_) \- The name of **workspace** to modify
- `user` ( _option_) \- E-mail address of the user to which to revoke access

### Examples for `node revoke-access`
```
share node revoke-access --uni <uniName> --node <nodeName> --user john@acme.com --user jill@acme.com
```

## `node schema`

Fetch a **workspace**’s GraphQL Schema.

### Usage for `node schema`
```
share node schema
```

### Flags for `node schema`
- `uni` ( _option_) \- Name of **project**
- `node` ( _option_) \- Name of **workspace**
- `json` ( _boolean_) \- Output return values as JSON

### Examples for `node schema`
```
share node schema --uni <uniName>

share node schema --uni <uniName> --node <nodeName>
```

## `node sharing-policy`

Manage sharing policies for a **workspace**.

See [fine grained data permissions documentation](https://docs.vendia.com/platform/operational/secure-data-sharing/fine-grained-data-permissions) for additional information.

### Usage for `node sharing-policy`
```
share auth sharing-policy <SubCommand>
```

### Examples for `node sharing-policy`
```
❯ Add a sharing policy

share node sharing-policy add --uni <uniName> --node <nodeName> --name test-policy --entity Product --acl '[]' --description 'test policy for sharing products'
```

## `node update`

Update **workspace** configuration.

### Usage for `node update`
```
share node update
```

### Flags for `node update`
- `uni` ( _option_) \- Name of **project**
- `node` ( _option_) \- Name of **workspace**
- `config` ( _option_) \- config values to set
- `force` ( _boolean_) \- Force config update & ignore prompts
- `json` ( _boolean_) \- Output return values as JSON

### Examples for `node update`
```
share node update --uni <uniName> --node <nodeName> --config '{"blockReportEmails":["email@email.com"]}'
```
