Skip to content

Commit

Permalink
GITBOOK-7376: API: Move User management with API from API to Admin to…
Browse files Browse the repository at this point in the history
…p level w/out editing or indexing
  • Loading branch information
awileysnyk authored and gitbook-bot committed Jun 20, 2024
1 parent f604f9b commit f4b9319
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 23 deletions.
10 changes: 5 additions & 5 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,11 @@
* [Legal Advisor role template](snyk-admin/manage-permissions-and-roles/custom-role-templates/legal-advisor-role-template.md)
* [CLI Tester role template](snyk-admin/manage-permissions-and-roles/custom-role-templates/cli-tester-role-template.md)
* [Read-only CLI Tester role template](snyk-admin/manage-permissions-and-roles/custom-role-templates/read-only-cli-tester-role-template.md)
* [User management with the Snyk API](snyk-admin/user-management-with-the-snyk-api/README.md)
* [Provision users to Orgs using the Snyk API v1](snyk-admin/user-management-with-the-snyk-api/provision-users-to-orgs-using-the-snyk-api-v1.md)
* [Update Member Roles using the Snyk API v1](snyk-admin/user-management-with-the-snyk-api/update-member-roles-using-the-snyk-api-v1.md)
* [Remove members from Groups and Orgs using the Snyk REST and v1 API](snyk-admin/user-management-with-the-snyk-api/remove-members-from-groups-and-orgs-using-the-snyk-rest-and-v1-api.md)
* [Retrieve audit logs of user-initiated activity by API for an Org or Group](snyk-admin/user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md)
* [Manage notifications](snyk-admin/manage-notifications.md)
* [Snyk Projects](snyk-admin/snyk-projects/README.md)
* [Project information](snyk-admin/snyk-projects/project-information.md)
Expand Down Expand Up @@ -1038,11 +1043,6 @@
* [How to use Postman for Snyk REST API](snyk-api/make-calls-to-the-snyk-api/how-to-use-postman-for-snyk-rest-api.md)
* [Postman and Snyk API v1](snyk-api/make-calls-to-the-snyk-api/postman-and-snyk-api-v1.md)
* [How to use Snyk API endpoints](snyk-api/how-to-use-snyk-api-endpoints/README.md)
* [User management with the Snyk API](snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/README.md)
* [Provision users to Orgs using the Snyk API v1](snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/provision-users-to-orgs-using-the-snyk-api-v1.md)
* [Update Member Roles using the Snyk API v1](snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/update-member-roles-using-the-snyk-api-v1.md)
* [Remove members from Groups and Orgs using the Snyk REST and v1 API](snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/remove-members-from-groups-and-orgs-using-the-snyk-rest-and-v1-api.md)
* [Retrieve audit logs of user-initiated activity by API for an Org or Group](snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md)
* [API v1 Dep Graph endpoints](snyk-api/how-to-use-snyk-api-endpoints/api-v1-dep-graph-endpoints.md)
* [REST API: Get a project’s SBOM document](snyk-api/how-to-use-snyk-api-endpoints/rest-api-get-a-projects-sbom-document.md)
* [REST API: Test an SBOM document for vulnerabilities](snyk-api/how-to-use-snyk-api-endpoints/rest-api-endpoint-test-an-sbom-document-for-vulnerabilities.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following Enterprise features are limited or unavailable during the trial:
* [**Group / Multiple Orgs**](../../snyk-admin/groups-and-organizations/)**:** Limited to one Group and one Organization
* [**Custom Project Tags**](../../snyk-admin/introduction-to-snyk-projects/project-tags.md)**:** Not available.
* [**Custom User Roles**](../../snyk-admin/manage-permissions-and-roles/user-role-management.md): Not available.
* [**Audit Logging**](../../snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md): Not available.
* [**Audit Logging**](../../snyk-admin/user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md): Not available.
* [**Snyk Code Local Engine**](../../scan-with-snyk/snyk-code/snyk-code-local-engine.md): Not available.
* [**Broker**](../../enterprise-configuration/snyk-broker/): Not available.
* [**Self-hosted Git**](../../scm-ide-and-ci-cd-workflow-and-integrations/git-repositories-scms-integrations-with-snyk/snyk-github-enterprise-integration.md): Not available.
Expand Down
2 changes: 1 addition & 1 deletion docs/integrate-with-snyk/event-forwarding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Snyk event forwarding integrations allow you to push Snyk platform events direct
Currently, Snyk supports sending two different types of events:

1. **Snyk issue events** - these events are sent when new issues are discovered in a Snyk Project, or when an issue is updated. Each event contains information about the vulnerability or other problem found, including whether a remediation is available. 
2. **Snyk platform audit events** - these events are sent every time a Snyk user performs an action within the Snyk platform. For more information, see [Audit logs](../../snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md). 
2. **Snyk platform audit events** - these events are sent every time a Snyk user performs an action within the Snyk platform. For more information, see [Audit logs](../../snyk-admin/user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md). 

{% hint style="info" %}
The **Snyk issue** event type currently does not include Snyk Cloud issues.
Expand Down
4 changes: 2 additions & 2 deletions docs/snyk-admin/groups-and-organizations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Snyk has a hierarchy that allows you to control access to Snyk scanning and feat
* [**Organizations**](organizations/): An Organization represents a specific business area, such as a team. Organizations can contain multiple Projects.
* [**Projects**](../snyk-projects/)**:** A Project is established based on the item that Snyk scans for issues, such as a manifest file. Each Project shows the results of scans. You can configure your Projects to define how to scan for issues in that Project.

Snyk also has features to [manage users in Organizations](organizations/manage-users-in-organizations.md) and to [manage users in a Group](groups/manage-users-in-a-group.md). You can use the Snyk API v1 to [provision users to Orgs](../../snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/provision-users-to-orgs-using-the-snyk-api-v1.md) and [remove members from Groups and Orgs](../../snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/remove-members-from-groups-and-orgs-using-the-snyk-rest-and-v1-api.md).
Snyk also has features to [manage users in Organizations](organizations/manage-users-in-organizations.md) and to [manage users in a Group](groups/manage-users-in-a-group.md). You can use the Snyk API v1 to [provision users to Orgs](../user-management-with-the-snyk-api/provision-users-to-orgs-using-the-snyk-api-v1.md) and [remove members from Groups and Orgs](../user-management-with-the-snyk-api/remove-members-from-groups-and-orgs-using-the-snyk-rest-and-v1-api.md).

You can [use Organization access requests](organizations/requests-for-access-to-an-organization.md) to add users and [configure session length for a Snyk Group](groups/configure-session-length-for-a-snyk-group.md).

When you want to find out when a new user was added or analyze unexpected activity, you can [retrieve audit logs of user-initiated activity](../../snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md) by Organization or Group through the Snyk REST API.
When you want to find out when a new user was added or analyze unexpected activity, you can [retrieve audit logs of user-initiated activity](../user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md) by Organization or Group through the Snyk REST API.

The documentation in this section covers [Groups](groups/) and [Organizations](organizations/).

Expand Down
2 changes: 1 addition & 1 deletion docs/snyk-admin/manage-permissions-and-roles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For more information, see [Plans and pricing](https://snyk.io/plans).

Permissions are granted to users according to their role.

Snyk Enterprise plan customers can [manage user roles](user-role-management.md), [change the role of a user](user-role-management.md#change-the-role-of-a-user) in the Snyk Web UI, or [update member roles using the Snyk API v1](../../snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/update-member-roles-using-the-snyk-api-v1.md).
Snyk Enterprise plan customers can [manage user roles](user-role-management.md), [change the role of a user](user-role-management.md#change-the-role-of-a-user) in the Snyk Web UI, or [update member roles using the Snyk API v1](../user-management-with-the-snyk-api/update-member-roles-using-the-snyk-api-v1.md).

When you create or edit a role, as explained on the [User role management](user-role-management.md) page, the Web UI displays a list of permissions you can associate with each role. For more information, see [Pre-defined user roles](pre-defined-roles.md).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pre-defined roles

Snyk provides a set of standard user roles that can be assigned and managed using the Snyk Web UI or the [Snyk REST API and API v1](../../snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/). The permission sets for pre-defined roles cannot be customized. Instead, Snyk recommends creating a custom role under Manage role in the Snyk Web UI.
Snyk provides a set of standard user roles that can be assigned and managed using the Snyk Web UI or the [Snyk REST API and API v1](../user-management-with-the-snyk-api/). The permission sets for pre-defined roles cannot be customized. Instead, Snyk recommends creating a custom role under Manage role in the Snyk Web UI.

The pre-defined roles Snyk provides are as follows:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Under **Manage roles**, you can:
7. [Change the role of a user](user-role-management.md#change-the-role-of-a-user)
8. [Use roles in custom SSO](user-role-management.md#use-roles-in-custom-sso)

If you use the Snyk API, see [User management with the Snyk API](../../snyk-api/how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/) for more information.
If you use the Snyk API, see [User management with the Snyk API](../user-management-with-the-snyk-api/) for more information.

## Essential information for working with Member roles

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Snyk API is available only for Enterprise plans.\
For more information, see [Plans and pricing](https://snyk.io/plans).
{% endhint %}

Users can be managed using the Snyk [API v1](https://snyk.docs.apiary.io) and [REST](https://apidocs.snyk.io/?version=2024-01-04#overview) API and the [Snyk Web UI](../../../snyk-admin/manage-permissions-and-roles/user-role-management.md). You can also [manage service accounts](../../../enterprise-configuration/service-accounts/manage-service-accounts-using-the-snyk-api.md) using the Snyk REST API.
Users can be managed using the Snyk [API v1](https://snyk.docs.apiary.io) and [REST](https://apidocs.snyk.io/?version=2024-01-04#overview) API and the [Snyk Web UI](../manage-permissions-and-roles/user-role-management.md). You can also [manage service accounts](../../enterprise-configuration/service-accounts/manage-service-accounts-using-the-snyk-api.md) using the Snyk REST API.

[User provisioning ](provision-users-to-orgs-using-the-snyk-api-v1.md)uses the provisioning endpoints to organize and grant permissions under a specified role for SSO users before initial log-on.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ The API does not support using service accounts as the inviting user or provisio

* The user being provisioned must not already exist in the Snyk system.
* The inviting user must call the API using a personal token.
* The Snyk Group to which the Organizations belong should have [Single Sign On (SSO) configured](../../../enterprise-configuration/single-sign-on-sso-for-authentication-to-snyk/).
* The Snyk Group to which the Organizations belong should have [Single Sign On (SSO) configured](../../enterprise-configuration/single-sign-on-sso-for-authentication-to-snyk/).
* Both the inviting user and the provisioned user must log in using SSO.
* The inviting user should have the permission `Provision Users` to invoke these calls. All Group and Org Admins by default have this permission.

<figure><img src="../../../.gitbook/assets/Screenshot 2022-09-09 at 09.57.17.png" alt="Enable Provision Users permission"><figcaption><p>Enable Provision Users permission</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/Screenshot 2022-09-09 at 09.57.17.png" alt="Enable Provision Users permission"><figcaption><p>Enable Provision Users permission</p></figcaption></figure>

## How to use the Provision user API

Expand Down Expand Up @@ -55,7 +55,7 @@ You provision a user to the specified Organization with a role. When a user firs
`}`

{% hint style="info" %}
Enterprise plan users can define their own customized [member roles](../../../snyk-admin/manage-permissions-and-roles/user-role-management.md) and can use `rolePublicId` for assignment.\
Enterprise plan users can define their own customized [member roles](../manage-permissions-and-roles/user-role-management.md) and can use `rolePublicId` for assignment.\
\
You can use either `role` or `rolePublicId` but not both in the same call.
{% endhint %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ When an SSO connection is associated with only one Group, the following call can

You can find the `{sso_id}` on the Snyk Web UI; navigate to **Group** >**Settings** >**SSO** >**Step 3**. If you need help, reach out to your Account team.

<figure><img src="../../../.gitbook/assets/Screenshot 2023-02-22 at 10.27.19.png" alt="Self Serve SSO screen, Step 3, sso_id highlighted"><figcaption><p>Self Serve SSO screen, Step 3, sso_id highlighted</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/Screenshot 2023-02-22 at 10.27.19.png" alt="Self Serve SSO screen, Step 3, sso_id highlighted"><figcaption><p>Self Serve SSO screen, Step 3, sso_id highlighted</p></figcaption></figure>

For a successful request, the response is `200 OK`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Update Member Roles using the Snyk API v1

To migrate members of existing organizations to new roles, you must use the [Snyk API](../../).
To migrate members of existing organizations to new roles, you must use the [Snyk API](../../snyk-api/).

Follow the steps in each section of this document. Snyk recommends running these updates with bounded concurrency in batches so as not to trip any of the rate limiters. Optimally, perform the updates in batches of **ten** concurrent requests at a time.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ API v1 [Invite users](https://snyk.docs.apiary.io/#reference/groups/list-all-rol

### Add users to organizations at scale ahead of the first login

Scenario: [Provision users to Orgs via API](../how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/provision-users-to-orgs-using-the-snyk-api-v1.md)
Scenario: [Provision users to Orgs via API](../../snyk-admin/user-management-with-the-snyk-api/provision-users-to-orgs-using-the-snyk-api-v1.md)

**Endpoint used:**\
API v1 [Provision a user to the organization](https://snyk.docs.apiary.io/#reference/organizations/provision-user/provision-a-user-to-the-organization)
Expand Down Expand Up @@ -238,9 +238,9 @@ API v1 [Import targets](https://snyk.docs.apiary.io/#reference/import-projects)
## API v1 Users and Roles

SEE:\
[Provision users to Orgs via API](../how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/provision-users-to-orgs-using-the-snyk-api-v1.md)\
[Remove members from Groups and Orgs via API](../how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/remove-members-from-groups-and-orgs-using-the-snyk-rest-and-v1-api.md)\
[Update Member Roles via API](../how-to-use-snyk-api-endpoints/user-management-with-the-snyk-api/update-member-roles-using-the-snyk-api-v1.md) (also Snyk REST API Users endpoint `PATCH https://api.snyk.io/rest/groups/{group_id}/users/{id}?version=2023-01-30~beta)`
[Provision users to Orgs via API](../../snyk-admin/user-management-with-the-snyk-api/provision-users-to-orgs-using-the-snyk-api-v1.md)\
[Remove members from Groups and Orgs via API](../../snyk-admin/user-management-with-the-snyk-api/remove-members-from-groups-and-orgs-using-the-snyk-rest-and-v1-api.md)\
[Update Member Roles via API](../../snyk-admin/user-management-with-the-snyk-api/update-member-roles-using-the-snyk-api-v1.md) (also Snyk REST API Users endpoint `PATCH https://api.snyk.io/rest/groups/{group_id}/users/{id}?version=2023-01-30~beta)`

## API v1 Webhooks

Expand Down
2 changes: 1 addition & 1 deletion docs/snyk-api/how-to-use-snyk-api-endpoints/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This section provides [scenarios for using Snyk APIs](../api-endpoints-index-and
For more information about using the Snyk API, see the following:

* [API support articles](https://support.snyk.io/hc/en-us/sections/360001344097-API)
* [Audit logs](user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md)
* [Audit logs](../../snyk-admin/user-management-with-the-snyk-api/retrieve-audit-logs-of-user-initiated-activity-by-api-for-an-org-or-group.md)
* [Bazel](../../supported-languages-and-frameworks/bazel.md)
* [Dart and Flutter](../../supported-languages-and-frameworks/dart-and-flutter.md): [List issues for a package](rest-api-list-issues-for-a-package.md)
* [Rust](../../supported-languages-and-frameworks/rust.md): [SBOM test endpoints](rest-api-endpoint-test-an-sbom-document-for-vulnerabilities.md), [List issues for a package](rest-api-list-issues-for-a-package.md)
Expand Down

0 comments on commit f4b9319

Please sign in to comment.