Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 195 additions & 0 deletions apps/docs/content/docs/cli/organizations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,39 @@ sim organizations search sources permissions imports create <sourceId> [options]

API request and response schemas: [createSourcePermissionImport](/api-reference/organizations/createSourcePermissionImport).

### Replace source permissions from two CSV files, uploaded in bounded parts

```bash
sim organizations search sources permissions upload <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <id>` | Yes | Organization identifier. |
| `--provider <provider>` | Yes | Permission provider. Accepted values: `gitlab`. |
| `--expected-revision <number>` | Yes | Revision read before exporting the CSVs. |
| `--user-mapping <path>` | Yes | Complete user mapping CSV. |
| `--project-permissions <path>` | Yes | Complete project permissions CSV. |
| `-y, --yes` | Yes | Confirm replacement of all source permissions. |

</CommandTable>

API request and response schemas: [createSourcePermissionImport](/api-reference/organizations/createSourcePermissionImport), [putSourcePermissionImportPart](/api-reference/organizations/putSourcePermissionImportPart), [completeSourcePermissionImport](/api-reference/organizations/completeSourcePermissionImport).

### Complete source permission import

This replaces the source’s permission grants. Readers omitted from the new grants lose access.
Expand Down Expand Up @@ -1206,6 +1239,168 @@ sim organizations sso policy update [options]

API request and response schemas: [updateSsoPolicy](/api-reference/organizations/updateSsoPolicy).

## Other commands

### List search sources

```bash
sim organizations search sources list [options]
```

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--sort-by <value>` | No | Field used to sort the result. Defaults to "createdAt". Accepted values: `connectorType`, `createdAt`, `updatedAt`. |
| `--sort-order <value>` | No | Sort direction. Defaults to "desc". Accepted values: `asc`, `desc`. |
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
| `--cursor <value>` | No | Continue from nextCursor returned by a previous result. |

</CommandTable>

API request and response schemas: [listSearchSources](/api-reference/organizations/listSearchSources).

### Get search source

```bash
sim organizations search sources get <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier, also used by permission uploads. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |

</CommandTable>

API request and response schemas: [getSearchSource](/api-reference/organizations/getSearchSource).

### Create search source

```bash
sim organizations search sources create [options]
```

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--connector-type <value>` | Yes | Registered connector type. |
| `--credential-id <value>` | No | OAuth credential identifier for connector types whose `auth.mode` is `oauth` (see connector types), or a saved credential for an `apiKey` connector type that declares `auth.savedCredential` (such as Amazon S3 with a saved AWS credential); otherwise omit it for `apiKey` connectors. |
| `--api-key <value\|@file>` | No | Write-only API key for connector types whose `auth.mode` is `apiKey` (see connector types), or a personal access token for an OAuth connector that also accepts one, such as GitHub. Send it instead of `credentialId`. Pass a raw key, or a secret reference written as the whole value `{{SECRET_NAME}}`, which the server resolves; `$SECRET_NAME` is not a reference. (@path / @- reads a file or stdin verbatim, including trailing newlines; @@value for a literal leading @). |
| `--source-config <json\|@file>` | Yes | Connector-specific source selection and filtering configuration. (JSON, or @path / @- to read a file or stdin). |
| `--access-mode <value>` | No | Source-managed permissions (admin), or individually connected member accounts (members). Defaults to "admin". Accepted values: `admin`, `members`. |
| `--permission-config <json\|@file>` | No | Provider-specific permissions for initial setup. Large CSV snapshots use permission imports after creation. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

API request and response schemas: [createSearchSource](/api-reference/organizations/createSearchSource).

### Update search source

This updates source settings and may replace its permission grants.

```bash
sim organizations search sources update <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier, also used by permission uploads. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--api-key <value\|@file>` | No | Replacement token for providers supporting credential updates (currently GitLab). For GitLab, supply permissionConfig with the current expectedRevision; omitted CSVs retain grants. Omit to keep the saved token. (@path / @- reads a file or stdin verbatim, including trailing newlines; @@value for a literal leading @). |
| `--source-config <json\|@file>` | No | Complete replacement source configuration. Read the existing configuration before editing it. (JSON, or @path / @- to read a file or stdin). |
| `--permission-config <json\|@file>` | No | Provider-specific permission update, using the current expectedRevision. Omit to retain permissions. (JSON, or @path / @- to read a file or stdin). |
| `--status <value>` | No | Pause or resume this source without changing its ID or stored permissions. Accepted values: `active`, `paused`. |
| `-y, --yes` | Yes | Confirm this operation. |

</CommandTable>

API request and response schemas: [updateSearchSource](/api-reference/organizations/updateSearchSource).

### Delete search source

This removes the source and its permission grants.

```bash
sim organizations search sources delete <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier, also used by permission uploads. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `-y, --yes` | Yes | Confirm this operation. |

</CommandTable>

API request and response schemas: [deleteSearchSource](/api-reference/organizations/deleteSearchSource).

### Prepare search sources

```bash
sim organizations search sources prepare [options]
```

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--connector-type <value>` | Yes | Registered connector type. |
| `--access-mode <value>` | No | Source-managed permissions (admin), or individually connected member accounts (members). Defaults to "admin". Accepted values: `admin`, `members`. |

</CommandTable>

API request and response schemas: [prepareSearchSources](/api-reference/organizations/prepareSearchSources).

## Related docs

- [Organizations](/platform/organization)
Expand Down
Loading
Loading