From 218640ec7b008e6b604c4460b091f589dbddc615 Mon Sep 17 00:00:00 2001 From: Ann Wiley Date: Wed, 12 Jun 2024 22:07:54 +0000 Subject: [PATCH] GITBOOK-7284: API: GS-First round of content shuffling. Lots of little changes. --- docs/SUMMARY.md | 133 ++++++++-------- .../service-accounts/README.md | 2 +- ...age-service-accounts-using-the-snyk-api.md | 4 +- ...d-authenticate-with-your-snyk-api-token.md | 2 +- .../ci-cd-setup.md | 2 +- ...al-studio-code-extension-authentication.md | 4 +- .../visual-studio-extension-authentication.md | 2 +- docs/snyk-api-info/snyk-webhooks/README.md | 20 +-- .../modify-the-lambda-function.md | 13 -- ...ic-curated-ui-and-snyk-custom-dashboard.md | 23 --- docs/snyk-api/README.md | 2 +- ...ts.md => api-endpoints-index-and-notes.md} | 4 +- .../api-v1-dep-graph-endpoints.md | 2 +- ...st-an-sbom-document-for-vulnerabilities.md | 2 +- .../rest-api-get-a-projects-sbom-document.md | 2 +- .../try-a-simple-call-to-the-snyk-rest-api.md | 2 +- docs/snyk-api/reference/apps.md | 59 +++---- docs/snyk-api/reference/audit-logs.md | 7 +- docs/snyk-api/reference/collection.md | 19 +-- docs/snyk-api/reference/containerimage.md | 9 +- docs/snyk-api/reference/custom-base-images.md | 13 +- docs/snyk-api/reference/iacsettings.md | 11 +- docs/snyk-api/reference/invites.md | 9 +- docs/snyk-api/reference/issues.md | 15 +- docs/snyk-api/reference/orgs.md | 11 +- docs/snyk-api/reference/projects.md | 11 +- .../reference/pull-request-templates.md | 9 +- docs/snyk-api/reference/sastsettings.md | 7 +- docs/snyk-api/reference/sbom.md | 5 +- docs/snyk-api/reference/serviceaccounts.md | 27 ++-- docs/snyk-api/reference/slack.md | 7 +- docs/snyk-api/reference/slacksettings.md | 17 +- docs/snyk-api/reference/targets.md | 9 +- docs/snyk-api/reference/users.md | 5 +- .../snyk-apps/prerequisites-for-snyk-apps.md | 2 +- .../README.md} | 0 .../authentication-for-api/README.md | 4 +- ...api-token-permissions-users-can-control.md | 2 +- ...voking-and-regenerating-snyk-api-tokens.md | 2 +- .../{ => snyk-rest-api-overview}/changelog.md | 0 .../guides-to-migration/README.md | 17 ++ ...pi-migration-guide-completed-migration.md} | 6 +- ...erimental-api-to-ga-api-migration-guide.md | 10 +- .../links-for-pagination-in-snyk-rest-api.md | 0 .../relationships-in-snyk-rest-api.md | 0 .../request-body-schema-in-snyk-rest-api.md | 0 .../snyk-api-rate-limits.md | 0 .../guides-to-webhooks/README.md | 2 + .../README.md | 0 ...ecurity-through-an-environment-variable.md | 0 ...ambda-function-to-connect-snyk-to-slack.md | 0 .../README.md | 0 .../with-a-lambda-function-url/README.md | 0 .../modify-the-lambda-function.md | 13 ++ .../with-api-gateway/README.md | 0 ...he-post-method-to-connect-snyk-to-slack.md | 0 .../aws-api-gateway-deploy-the-post-method.md | 0 .../aws-lambda-setup-set-up-the-trigger.md | 0 .../configure-the-aws-lambda-script.md | 0 .../set-up-the-snyk-webhook.md | 0 ...k-setup-to-connect-snyk-with-aws-lambda.md | 2 +- .../test-the-snyk-webhook-connection.md | 0 .../README.md | 8 +- ...re-azure-function-environment-variables.md | 2 +- .../copy-the-azure-function-url.md | 2 +- .../create-a-snyk-webhook.md | 0 .../create-an-azure-function-app.md | 0 ...ic-curated-ui-and-snyk-custom-dashboard.md | 23 +++ .../guides-to-webhooks}/tutorial.md | 4 +- .../validation-and-versioning-of-payloads.md | 29 ++++ .../webhooks.md | 36 +---- docs/snyk-api/v1-api-overview/entities.md | 148 ------------------ .../snyk-api/v1-api-overview/v1-api-errors.md | 25 +++ 73 files changed, 351 insertions(+), 455 deletions(-) delete mode 100644 docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md delete mode 100644 docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/new-relic-curated-ui-and-snyk-custom-dashboard.md rename docs/snyk-api/{how-to-find-information-about-snyk-api-endpoints.md => api-endpoints-index-and-notes.md} (99%) rename docs/snyk-api/{snyk-rest-api-overview.md => snyk-rest-api-overview/README.md} (100%) rename docs/snyk-api/{ => snyk-rest-api-overview}/authentication-for-api/README.md (76%) rename docs/snyk-api/{ => snyk-rest-api-overview}/authentication-for-api/api-token-permissions-users-can-control.md (84%) rename docs/snyk-api/{ => snyk-rest-api-overview}/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md (78%) rename docs/snyk-api/{ => snyk-rest-api-overview}/changelog.md (100%) create mode 100644 docs/snyk-api/snyk-rest-api-overview/guides-to-migration/README.md rename docs/snyk-api/{example-migration-guide-list-all-projects-v1-api-to-rest-api.md => snyk-rest-api-overview/guides-to-migration/list-all-projects-v1-api-to-rest-api-migration-guide-completed-migration.md} (99%) rename docs/snyk-api/{ => snyk-rest-api-overview/guides-to-migration}/rest-issues-experimental-api-to-ga-api-migration-guide.md (97%) rename docs/snyk-api/{make-calls-to-the-snyk-api => snyk-rest-api-overview}/links-for-pagination-in-snyk-rest-api.md (100%) rename docs/snyk-api/{make-calls-to-the-snyk-api => snyk-rest-api-overview}/relationships-in-snyk-rest-api.md (100%) rename docs/snyk-api/{make-calls-to-the-snyk-api => snyk-rest-api-overview}/request-body-schema-in-snyk-rest-api.md (100%) rename docs/snyk-api/{make-calls-to-the-snyk-api => snyk-rest-api-overview}/snyk-api-rate-limits.md (100%) create mode 100644 docs/snyk-api/snyk-webhooks/guides-to-webhooks/README.md rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/README.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/aws-lambda-setup-add-security-through-an-environment-variable.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/aws-lambda-setup-create-lambda-function-to-connect-snyk-to-slack.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/aws-lambda-setup-set-up-the-trigger/README.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/README.md (100%) create mode 100644 docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/aws-lambda-setup-set-up-the-trigger/with-api-gateway/README.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-add-the-post-method-to-connect-snyk-to-slack.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-deploy-the-post-method.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-lambda-setup-set-up-the-trigger.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/configure-the-aws-lambda-script.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/set-up-the-snyk-webhook.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/slack-setup-to-connect-snyk-with-aws-lambda.md (94%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda}/test-the-snyk-webhook-connection.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk}/README.md (77%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk}/configure-azure-function-environment-variables.md (86%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk}/copy-the-azure-function-url.md (62%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk}/create-a-snyk-webhook.md (100%) rename docs/{snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app => snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk}/create-an-azure-function-app.md (100%) create mode 100644 docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/new-relic-curated-ui-and-snyk-custom-dashboard.md rename docs/{snyk-api-info/snyk-webhooks => snyk-api/snyk-webhooks/guides-to-webhooks}/tutorial.md (97%) create mode 100644 docs/snyk-api/snyk-webhooks/validation-and-versioning-of-payloads.md rename docs/snyk-api/{v1-api-overview => snyk-webhooks}/webhooks.md (81%) delete mode 100644 docs/snyk-api/v1-api-overview/entities.md create mode 100644 docs/snyk-api/v1-api-overview/v1-api-errors.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index d9c5f9e7fb48..be0fd8d32472 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -917,13 +917,21 @@ * [Configure Snyk CLI to connect to Snyk API](snyk-cli/configure-the-snyk-cli/configure-snyk-cli-to-connect-to-snyk-api.md) * [Proxy configuration for Snyk CLI](snyk-cli/configure-the-snyk-cli/proxy-configuration-for-snyk-cli.md) * [Snyk API](snyk-api/README.md) - * [REST API overview](snyk-api/snyk-rest-api-overview.md) - * [V1 API overview](snyk-api/v1-api-overview/README.md) - * [Entities](snyk-api/v1-api-overview/entities.md) - * [Webhooks](snyk-api/v1-api-overview/webhooks.md) - * [Authentication for API](snyk-api/authentication-for-api/README.md) - * [Snyk API token permissions users can control](snyk-api/authentication-for-api/api-token-permissions-users-can-control.md) - * [Revoking and regenerating Snyk API tokens](snyk-api/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md) + * [REST API](snyk-api/snyk-rest-api-overview/README.md) + * [Snyk API rate limits](snyk-api/snyk-rest-api-overview/snyk-api-rate-limits.md) + * [Authentication for API](snyk-api/snyk-rest-api-overview/authentication-for-api/README.md) + * [Snyk API token permissions users can control](snyk-api/snyk-rest-api-overview/authentication-for-api/api-token-permissions-users-can-control.md) + * [Revoking and regenerating Snyk API tokens](snyk-api/snyk-rest-api-overview/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md) + * [Relationships in Snyk REST API](snyk-api/snyk-rest-api-overview/relationships-in-snyk-rest-api.md) + * [Request body schema in Snyk REST API](snyk-api/snyk-rest-api-overview/request-body-schema-in-snyk-rest-api.md) + * [Links for pagination in Snyk REST API](snyk-api/snyk-rest-api-overview/links-for-pagination-in-snyk-rest-api.md) + * [Changelog](snyk-api/snyk-rest-api-overview/changelog.md) + * [Guides to Migration](snyk-api/snyk-rest-api-overview/guides-to-migration/README.md) + * [List all Projects V1 API to REST API migration guide (completed migration)](snyk-api/snyk-rest-api-overview/guides-to-migration/list-all-projects-v1-api-to-rest-api-migration-guide-completed-migration.md) + * [REST Issues experimental API to GA API migration guide](snyk-api/snyk-rest-api-overview/guides-to-migration/rest-issues-experimental-api-to-ga-api-migration-guide.md) + * [V1 API](snyk-api/v1-api-overview/README.md) + * [V1 API errors](snyk-api/v1-api-overview/v1-api-errors.md) + * [OAuth2 API](snyk-api/oauth2-api.md) * [Reference](snyk-api/reference/README.md) * [Apps](snyk-api/reference/apps.md) * [Audit Logs](snyk-api/reference/audit-logs.md) @@ -957,39 +965,7 @@ * [Users (v1)](snyk-api/reference/users-v1.md) * [Users](snyk-api/reference/users.md) * [Webhooks (v1)](snyk-api/reference/webhooks-v1.md) - * [OAuth2 API](snyk-api/oauth2-api.md) - * [Make calls to the Snyk API](snyk-api/make-calls-to-the-snyk-api/README.md) - * [Try a simple call to the Snyk REST API](snyk-api/make-calls-to-the-snyk-api/try-a-simple-call-to-the-snyk-rest-api.md) - * [Find the differences between versions in the REST API](snyk-api/make-calls-to-the-snyk-api/find-the-differences-between-versions-in-the-rest-api.md) - * [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) - * [Links for pagination in Snyk REST API](snyk-api/make-calls-to-the-snyk-api/links-for-pagination-in-snyk-rest-api.md) - * [Snyk API rate limits](snyk-api/make-calls-to-the-snyk-api/snyk-api-rate-limits.md) - * [Request body schema in Snyk REST API](snyk-api/make-calls-to-the-snyk-api/request-body-schema-in-snyk-rest-api.md) - * [Relationships in Snyk REST API](snyk-api/make-calls-to-the-snyk-api/relationships-in-snyk-rest-api.md) - * [How to find information about Snyk API endpoints](snyk-api/how-to-find-information-about-snyk-api-endpoints.md) - * [How to use Snyk API endpoints](snyk-api/how-to-use-snyk-api-endpoints/README.md) - * [Solutions for specific use cases](snyk-api/how-to-use-snyk-api-endpoints/solutions-for-specific-use-cases.md) - * [Scenarios for using Snyk API](snyk-api/how-to-use-snyk-api-endpoints/scenarios-for-using-snyk-api.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) - * [Aggregated project issues API returns an array of ignoreReasons](snyk-api/how-to-use-snyk-api-endpoints/aggregated-project-issues-api-returns-an-array-of-ignorereasons.md) - * [Determine why API Import targets has failed](snyk-api/how-to-use-snyk-api-endpoints/determine-why-api-import-targets-has-failed.md) - * [List all projects with a vulnerability linked to a CVE](snyk-api/how-to-use-snyk-api-endpoints/list-all-projects-with-a-vulnerability-linked-to-a-cve.md) - * [Get a list of fixed issues using Snyk API](snyk-api/how-to-use-snyk-api-endpoints/get-a-list-of-fixed-issues-using-snyk-api.md) - * [Snyk API v1 Project issue paths endpoints](snyk-api/how-to-use-snyk-api-endpoints/snyk-api-v1-project-issue-paths-endpoints.md) - * [Org identification and projects in Snyk APIs](snyk-api/how-to-use-snyk-api-endpoints/org-identification-and-projects-in-snyk-apis.md) - * [Set project attributes using the Snyk API](snyk-api/how-to-use-snyk-api-endpoints/set-project-attributes-using-the-snyk-api.md) - * [Snyk API responses: Project type](snyk-api/how-to-use-snyk-api-endpoints/snyk-api-responses-project-type.md) - * [Find who created a service account](snyk-api/how-to-use-snyk-api-endpoints/find-who-created-a-service-account.md) - * [Choosing a service account type to use with Snyk APIs](snyk-api/how-to-use-snyk-api-endpoints/choosing-a-service-account-type-to-use-with-snyk-apis.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) - * [REST API: List issues for a package](snyk-api/how-to-use-snyk-api-endpoints/rest-api-list-issues-for-a-package.md) + * [API endpoints index and notes](snyk-api/api-endpoints-index-and-notes.md) * [Snyk Apps](snyk-api-info/snyk-apps/README.md) * [Prerequisites for Snyk Apps](snyk-api/snyk-apps/prerequisites-for-snyk-apps.md) * [Scopes to request](snyk-api/snyk-apps/scopes-to-request.md) @@ -1007,28 +983,31 @@ * [Configuring Express.js](snyk-api-info/snyk-apps/tutorial-create-a-snyk-app/configuring-express.js.md) * [Register the App and configure user authorization](snyk-api-info/snyk-apps/tutorial-create-a-snyk-app/register-the-app-and-configure-user-authorization.md) * [Render content for users](snyk-api-info/snyk-apps/tutorial-create-a-snyk-app/render-content-for-users.md) - * [Snyk Webhooks](snyk-api-info/snyk-webhooks/README.md) - * [Using Snyk Webhooks to connect Snyk to Slack with AWS Lambda](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/README.md) - * [Slack setup to connect Snyk with AWS Lambda](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/slack-setup-to-connect-snyk-with-aws-lambda.md) - * [AWS Lambda setup: create Lambda function to connect Snyk to Slack](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-create-lambda-function-to-connect-snyk-to-slack.md) - * [AWS Lambda setup: add security through an environment variable](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-add-security-through-an-environment-variable.md) - * [AWS Lambda setup: expose a public URL](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/README.md) - * [With API Gateway](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/README.md) - * [AWS API Gateway: Setting up a trigger](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-lambda-setup-set-up-the-trigger.md) - * [AWS API Gateway: add the POST method to connect Snyk to Slack](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-add-the-post-method-to-connect-snyk-to-slack.md) - * [AWS API Gateway: deploy the POST method](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-deploy-the-post-method.md) - * [With a Lambda Function URL](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/README.md) - * [Modify the Lambda function](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md) - * [Set up the Snyk Webhook](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/set-up-the-snyk-webhook.md) - * [Test the Snyk webhook connection](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/test-the-snyk-webhook-connection.md) - * [Configure the AWS Lambda script](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/configure-the-aws-lambda-script.md) - * [Using Snyk Webhooks to integrate New Relic with Snyk](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk/README.md) - * [Create an Azure Function App](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/create-an-azure-function-app.md) - * [Configure Azure Function environment variables](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/configure-azure-function-environment-variables.md) - * [Copy the Azure Function URL](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/copy-the-azure-function-url.md) - * [Create a Snyk Webhook](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/create-a-snyk-webhook.md) - * [New Relic Curated UI and Snyk Custom Dashboard](snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/new-relic-curated-ui-and-snyk-custom-dashboard.md) - * [Using Snyk webhooks with Zapier](snyk-api-info/snyk-webhooks/tutorial.md) + * [Webhooks](snyk-api-info/snyk-webhooks/README.md) + * [Webhook events and payloads](snyk-api/snyk-webhooks/webhooks.md) + * [Validation and versioning of payloads](snyk-api/snyk-webhooks/validation-and-versioning-of-payloads.md) + * [Guides to webhooks](snyk-api/snyk-webhooks/guides-to-webhooks/README.md) + * [How to use Snyk webhooks with Zapier](snyk-api/snyk-webhooks/guides-to-webhooks/tutorial.md) + * [How to use Snyk Webhooks to integrate New Relic with Snyk](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/README.md) + * [Create an Azure Function App](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/create-an-azure-function-app.md) + * [Configure Azure Function environment variables](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/configure-azure-function-environment-variables.md) + * [Copy the Azure Function URL](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/copy-the-azure-function-url.md) + * [Create a Snyk Webhook](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/create-a-snyk-webhook.md) + * [New Relic Curated UI and Snyk Custom Dashboard](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/new-relic-curated-ui-and-snyk-custom-dashboard.md) + * [How to use Snyk Webhooks to connect Snyk to Slack with AWS Lambda](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/README.md) + * [Slack setup to connect Snyk with AWS Lambda](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/slack-setup-to-connect-snyk-with-aws-lambda.md) + * [AWS Lambda setup: create Lambda function to connect Snyk to Slack](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-create-lambda-function-to-connect-snyk-to-slack.md) + * [AWS Lambda setup: add security through an environment variable](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-add-security-through-an-environment-variable.md) + * [AWS Lambda setup: expose a public URL](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/README.md) + * [With API Gateway](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/README.md) + * [AWS API Gateway: Setting up a trigger](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-lambda-setup-set-up-the-trigger.md) + * [AWS API Gateway: add the POST method to connect Snyk to Slack](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-add-the-post-method-to-connect-snyk-to-slack.md) + * [AWS API Gateway: deploy the POST method](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-deploy-the-post-method.md) + * [With a Lambda Function URL](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/README.md) + * [Modify the Lambda function](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md) + * [Set up the Snyk Webhook](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/set-up-the-snyk-webhook.md) + * [Test the Snyk webhook connection](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/test-the-snyk-webhook-connection.md) + * [Configure the AWS Lambda script](snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/configure-the-aws-lambda-script.md) * [Snyk Tools](snyk-api/snyk-tools/README.md) * [Tool: snyk-api-import](snyk-api/snyk-tools/tool-snyk-api-import/README.md) * [Creating organizations in Snyk](snyk-api/snyk-tools/tool-snyk-api-import/creating-orgs-in-snyk.md) @@ -1041,9 +1020,33 @@ * [Contributing to snyk-api-import](snyk-api/snyk-tools/tool-snyk-api-import/contributing.md) * [Tool: jira-tickets-for-new-vulns](snyk-api/snyk-tools/tool-jira-tickets-for-new-vulns.md) * [Python code to extract issues from Snyk API](snyk-api/snyk-tools/python-code-to-extract-issues-from-snyk-api.md) - * [REST Issues Experimental API to GA API Migration Guide](snyk-api/rest-issues-experimental-api-to-ga-api-migration-guide.md) - * [Example migration guide: List all Projects V1 API to REST API](snyk-api/example-migration-guide-list-all-projects-v1-api-to-rest-api.md) - * [REST API Changelog](snyk-api/changelog.md) + * [Make calls to the Snyk API](snyk-api/make-calls-to-the-snyk-api/README.md) + * [Try a simple call to the Snyk REST API](snyk-api/make-calls-to-the-snyk-api/try-a-simple-call-to-the-snyk-rest-api.md) + * [Find the differences between versions in the REST API](snyk-api/make-calls-to-the-snyk-api/find-the-differences-between-versions-in-the-rest-api.md) + * [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) + * [Solutions for specific use cases](snyk-api/how-to-use-snyk-api-endpoints/solutions-for-specific-use-cases.md) + * [Scenarios for using Snyk API](snyk-api/how-to-use-snyk-api-endpoints/scenarios-for-using-snyk-api.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) + * [Aggregated project issues API returns an array of ignoreReasons](snyk-api/how-to-use-snyk-api-endpoints/aggregated-project-issues-api-returns-an-array-of-ignorereasons.md) + * [Determine why API Import targets has failed](snyk-api/how-to-use-snyk-api-endpoints/determine-why-api-import-targets-has-failed.md) + * [List all projects with a vulnerability linked to a CVE](snyk-api/how-to-use-snyk-api-endpoints/list-all-projects-with-a-vulnerability-linked-to-a-cve.md) + * [Get a list of fixed issues using Snyk API](snyk-api/how-to-use-snyk-api-endpoints/get-a-list-of-fixed-issues-using-snyk-api.md) + * [Snyk API v1 Project issue paths endpoints](snyk-api/how-to-use-snyk-api-endpoints/snyk-api-v1-project-issue-paths-endpoints.md) + * [Org identification and projects in Snyk APIs](snyk-api/how-to-use-snyk-api-endpoints/org-identification-and-projects-in-snyk-apis.md) + * [Set project attributes using the Snyk API](snyk-api/how-to-use-snyk-api-endpoints/set-project-attributes-using-the-snyk-api.md) + * [Snyk API responses: Project type](snyk-api/how-to-use-snyk-api-endpoints/snyk-api-responses-project-type.md) + * [Find who created a service account](snyk-api/how-to-use-snyk-api-endpoints/find-who-created-a-service-account.md) + * [Choosing a service account type to use with Snyk APIs](snyk-api/how-to-use-snyk-api-endpoints/choosing-a-service-account-type-to-use-with-snyk-apis.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) + * [REST API: List issues for a package](snyk-api/how-to-use-snyk-api-endpoints/rest-api-list-issues-for-a-package.md) * [Working with Snyk](working-with-snyk/README.md) * [How Snyk handles your data](working-with-snyk/how-snyk-handles-your-data.md) * [Regional hosting and data residency](working-with-snyk/regional-hosting-and-data-residency.md) diff --git a/docs/enterprise-configuration/service-accounts/README.md b/docs/enterprise-configuration/service-accounts/README.md index 525ca03b8490..1243030f66af 100644 --- a/docs/enterprise-configuration/service-accounts/README.md +++ b/docs/enterprise-configuration/service-accounts/README.md @@ -84,7 +84,7 @@ From the **Role** dropdown list, select an appropriate role. For Group service accounts, choose from the following list of roles to configure the scope of the token; Snyk recommends selecting Viewer or Admin. -* **Group Viewer** enables read-only access. Note that to set an API token to be read-only and unable to write to the platform, you must use a service account and set it to Group Viewer. See [Snyk API token permissions users can control](../../snyk-api/authentication-for-api/api-token-permissions-users-can-control.md). +* **Group Viewer** enables read-only access. Note that to set an API token to be read-only and unable to write to the platform, you must use a service account and set it to Group Viewer. See [Snyk API token permissions users can control](../../snyk-api/snyk-rest-api-overview/authentication-for-api/api-token-permissions-users-can-control.md). * **Group Admin** enables full administrator access. * **Group Member** associates a service account with a group but does not grant any specific access. diff --git a/docs/enterprise-configuration/service-accounts/manage-service-accounts-using-the-snyk-api.md b/docs/enterprise-configuration/service-accounts/manage-service-accounts-using-the-snyk-api.md index 437b10efcc65..7ff4b0beb37e 100644 --- a/docs/enterprise-configuration/service-accounts/manage-service-accounts-using-the-snyk-api.md +++ b/docs/enterprise-configuration/service-accounts/manage-service-accounts-using-the-snyk-api.md @@ -32,7 +32,7 @@ Specific permissions are required to perform all these tasks; see [Service accou **API documentation:** [https://apidocs.snyk.io/#get-/groups/-group\_id-/service\_accounts](https://apidocs.snyk.io/?version=2023-09-07#get-/groups/-group\_id-/service\_accounts) -This [paginated](../../snyk-api/make-calls-to-the-snyk-api/links-for-pagination-in-snyk-rest-api.md) call returns an array of objects, each describing a service account. +This [paginated](../../snyk-api/snyk-rest-api-overview/links-for-pagination-in-snyk-rest-api.md) call returns an array of objects, each describing a service account. ### Create a service account for your Group @@ -86,7 +86,7 @@ This call allows you to manage the client secret for `oauth_client_secret` servi **API documentation:** [https://apidocs.snyk.io/#get-/orgs/-org\_id-/service\_accounts](https://apidocs.snyk.io/?version=2023-09-07#get-/orgs/-org\_id-/service\_accounts) -This [paginated](../../snyk-api/make-calls-to-the-snyk-api/links-for-pagination-in-snyk-rest-api.md) call returns an array of objects, each describing a service account. +This [paginated](../../snyk-api/snyk-rest-api-overview/links-for-pagination-in-snyk-rest-api.md) call returns an array of objects, each describing a service account. ### Create a service account for your Organization diff --git a/docs/getting-started/how-to-obtain-and-authenticate-with-your-snyk-api-token.md b/docs/getting-started/how-to-obtain-and-authenticate-with-your-snyk-api-token.md index 0b85636d92d2..d34c2d03c65c 100644 --- a/docs/getting-started/how-to-obtain-and-authenticate-with-your-snyk-api-token.md +++ b/docs/getting-started/how-to-obtain-and-authenticate-with-your-snyk-api-token.md @@ -16,7 +16,7 @@ Enterprise users have access to a personal token under their profile and to serv * Authenticating with the IDE manually * Running API calls one time, for example, to test something -For more information on the personal Snyk API token, see the following pages: [Authenticate the CLI with your account](../snyk-cli/authenticate-the-cli-with-your-account.md) and [Authentication for API](../snyk-api/authentication-for-api/). +For more information on the personal Snyk API token, see the following pages: [Authenticate the CLI with your account](../snyk-cli/authenticate-the-cli-with-your-account.md) and [Authentication for API](../snyk-api/snyk-rest-api-overview/authentication-for-api/). {% hint style="info" %} If you are using Snyk on the EU and AU tenants, you must set your endpoints accordingly before authenticating. For more information, see [Regional hosting and data residency](../working-with-snyk/regional-hosting-and-data-residency.md). diff --git a/docs/scm-ide-and-ci-cd-workflow-and-integrations/snyk-ci-cd-integrations/snyk-ci-cd-integration-deployment-and-strategies/ci-cd-setup.md b/docs/scm-ide-and-ci-cd-workflow-and-integrations/snyk-ci-cd-integrations/snyk-ci-cd-integration-deployment-and-strategies/ci-cd-setup.md index a0652f1014b8..1729dd9093dc 100644 --- a/docs/scm-ide-and-ci-cd-workflow-and-integrations/snyk-ci-cd-integrations/snyk-ci-cd-integration-deployment-and-strategies/ci-cd-setup.md +++ b/docs/scm-ide-and-ci-cd-workflow-and-integrations/snyk-ci-cd-integrations/snyk-ci-cd-integration-deployment-and-strategies/ci-cd-setup.md @@ -53,7 +53,7 @@ To continuously avoid known vulnerabilities in your dependencies, integrate Snyk ### Set up automatic monitoring -If you monitor a Project with Snyk, you will be notified if the dependencies in your Project are affected by newly disclosed vulnerabilities. To ensure the list of dependencies Snyk has for your Open Source Project is up to date, refresh it continuously by running s`nyk monitor` in your deployment process. Configure your environment to include the `SNYK_TOKEN` environment variable. You can [find your API token ](../../../snyk-api/authentication-for-api/)in your Snyk account settings. +If you monitor a Project with Snyk, you will be notified if the dependencies in your Project are affected by newly disclosed vulnerabilities. To ensure the list of dependencies Snyk has for your Open Source Project is up to date, refresh it continuously by running s`nyk monitor` in your deployment process. Configure your environment to include the `SNYK_TOKEN` environment variable. You can [find your API token ](../../../snyk-api/snyk-rest-api-overview/authentication-for-api/)in your Snyk account settings. ### API token configuration diff --git a/docs/scm-ide-and-ci-cd-workflow-and-integrations/use-snyk-in-your-ide/visual-studio-code-extension/visual-studio-code-extension-authentication.md b/docs/scm-ide-and-ci-cd-workflow-and-integrations/use-snyk-in-your-ide/visual-studio-code-extension/visual-studio-code-extension-authentication.md index b650cc9be2ba..ac6c6512c043 100644 --- a/docs/scm-ide-and-ci-cd-workflow-and-integrations/use-snyk-in-your-ide/visual-studio-code-extension/visual-studio-code-extension-authentication.md +++ b/docs/scm-ide-and-ci-cd-workflow-and-integrations/use-snyk-in-your-ide/visual-studio-code-extension/visual-studio-code-extension-authentication.md @@ -1,6 +1,6 @@ # Visual Studio Code extension authentication -To scan your projects you must authenticate with Snyk. The extension uses your Snyk API [token](../../../snyk-api/authentication-for-api/) for authentication. To store the token securely, Snyk uses [Secret Storage API](https://code.visualstudio.com/api/references/vscode-api#SecretStorage), which uses the system's keychain to manage the token. +To scan your projects you must authenticate with Snyk. The extension uses your Snyk API [token](../../../snyk-api/snyk-rest-api-overview/authentication-for-api/) for authentication. To store the token securely, Snyk uses [Secret Storage API](https://code.visualstudio.com/api/references/vscode-api#SecretStorage), which uses the system's keychain to manage the token. ## Logging in @@ -27,7 +27,7 @@ To re-authenticate with a different account, follow these steps: ![Snyk: Log Out](<../../../.gitbook/assets/logging-out-command (1).png>) -Or you run `Snyk: Set Token` command and set your [token](../../../snyk-api/authentication-for-api/) in the text field manually. +Or you run `Snyk: Set Token` command and set your [token](../../../snyk-api/snyk-rest-api-overview/authentication-for-api/) in the text field manually. ![Set token manually](<../../../.gitbook/assets/image (224) (1) (1) (1) (1) (1) (1) (1) (1).png>) diff --git a/docs/scm-ide-and-ci-cd-workflow-and-integrations/use-snyk-in-your-ide/visual-studio-extension/visual-studio-extension-authentication.md b/docs/scm-ide-and-ci-cd-workflow-and-integrations/use-snyk-in-your-ide/visual-studio-extension/visual-studio-extension-authentication.md index 42c0d03d688a..9c1df56ae72a 100644 --- a/docs/scm-ide-and-ci-cd-workflow-and-integrations/use-snyk-in-your-ide/visual-studio-extension/visual-studio-extension-authentication.md +++ b/docs/scm-ide-and-ci-cd-workflow-and-integrations/use-snyk-in-your-ide/visual-studio-extension/visual-studio-extension-authentication.md @@ -8,7 +8,7 @@ You can also authenticate using Options. Open Visual Studio **Options** and go t ![Options and settings button](../../../.gitbook/assets/readme\_image\_2\_5.png) -If the automated method does not work, you can trigger authentication by pressing the **Authenticate** button or entering the user API [token](../../../snyk-api/authentication-for-api/) manually. If you must enter your token, use your personal token. For more information, see [How to obtain and authenticate with your Snyk API token](../../../getting-started/how-to-obtain-and-authenticate-with-your-snyk-api-token.md). You can also submit a request to [Snyk support](https://snyk.zendesk.com/agent/dashboard). +If the automated method does not work, you can trigger authentication by pressing the **Authenticate** button or entering the user API [token](../../../snyk-api/snyk-rest-api-overview/authentication-for-api/) manually. If you must enter your token, use your personal token. For more information, see [How to obtain and authenticate with your Snyk API token](../../../getting-started/how-to-obtain-and-authenticate-with-your-snyk-api-token.md). You can also submit a request to [Snyk support](https://snyk.zendesk.com/agent/dashboard). ![Token field and Authenticate button](../../../.gitbook/assets/readme\_image\_2\_6.png) diff --git a/docs/snyk-api-info/snyk-webhooks/README.md b/docs/snyk-api-info/snyk-webhooks/README.md index f3cdeb1bac9a..caf08e981b06 100644 --- a/docs/snyk-api-info/snyk-webhooks/README.md +++ b/docs/snyk-api-info/snyk-webhooks/README.md @@ -1,10 +1,4 @@ -# Snyk Webhooks - -### Snyk Webhooks for Snyk API - -[Visit the Snyk API documentation for Webhooks](https://snyk.docs.apiary.io/#introduction/consuming-webhooks) to get information on consuming, validating, and examples. - -{% embed url="https://snyk.docs.apiary.io/#introduction/consuming-webhooks" %} +# Webhooks Webhooks allow you to be notified of Snyk system events, enabling you to build notifications and react to changes in your projects. The current implementation supports events for recurring scans of open source and container image related projects. @@ -28,18 +22,6 @@ Get real-time security alerts aggregated across various sources into a single pl Browse the various [Snyk Partner integrations](../../integrate-with-snyk/vulnerability-management-tools/) for a comprehensive list of solutions. -### Webhook headers - -Event messages are delivered with a ​`Content-Type​` of ​`application/json`,​ with the event payload as JSON in the request body. We also send the following headers: - -* `X-Snyk-Event` the name of the event and the version of the payload, such as `ping/v1` -* `X-Snyk-Transport-ID` a GUID to identify this delivery -* ​ `X-Snyk-Timestamp`an ISO 8601 timestamp for when the event occurred, e.g. `2020-09-25T15:27:53Z` -* `X-Hub-Signature` the HMAC hex digest of the request body which is used to secure your webhooks and ensure the request did indeed come from Snyk -* `User-Agent​` identifies the origin of the request, e.g. ​`Snyk-Webhooks/XXX` - -Each webhook receives all events. - ### Security SSL Webhooks can only be configured for URLs using the HTTPS protocol. HTTP is not allowed. diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md b/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md deleted file mode 100644 index 17e7824d9b3c..000000000000 --- a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md +++ /dev/null @@ -1,13 +0,0 @@ -# Modify the Lambda function - -1. Open your Lambda function and click on **Configuration**. -2. Select **Function URL** and then **Create function URL**. - -
-3. Change **Auth type** to **NONE** and save. - -
-4. Copy the function URL to use in the next step of the guide. -5. The function URL is now ready for use and a resource-based policy has been added that you can verify under **Permissions**. - -
diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/new-relic-curated-ui-and-snyk-custom-dashboard.md b/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/new-relic-curated-ui-and-snyk-custom-dashboard.md deleted file mode 100644 index af6ec5074a0a..000000000000 --- a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/new-relic-curated-ui-and-snyk-custom-dashboard.md +++ /dev/null @@ -1,23 +0,0 @@ -# New Relic Curated UI and Snyk Custom Dashboard - -Once the Azure Function and the Snyk Webhook are created, you see data coming in for Snyk projects with the configured retest frequency, or projects that you scan manually and where Snyk identifies new issues. - -## Vulnerability event type - -You can look into the Vulnerability event type to validate that data flows into New Relic. - -
Vulnerability event type

Vulnerability event type

- -## New Relic Vulnerability Management - -In addition New Relic provides a curated UI, a New Relic app named Vulnerability Management, that you can use to visualize all the issues being sent. - -
Vulnerability management app

Vulnerability management app

- -
Vulnerability app management details

Vulnerability app management details

- -## Snyk quickstart template - -The Snyk team has also built a quickstart template that includes a sample custom dashboard to make sure all the data is presented in a Snyk-focused way. - -
New Relic Snyk dashboard

New Relic Snyk dashboard

diff --git a/docs/snyk-api/README.md b/docs/snyk-api/README.md index 413a1a66abe7..a50066bb5c1a 100644 --- a/docs/snyk-api/README.md +++ b/docs/snyk-api/README.md @@ -12,7 +12,7 @@ Snyk [extensibility and the Snyk API](https://snyk.io/blog/extensibility-and-the ## Snyk REST API -The [Snyk REST API](https://apidocs.snyk.io/) is based on the OpenAPI and JSON:API standards and represents an evolutionary approach to API development, with each endpoint versioned. For more information, see [Versioning](https://apidocs.snyk.io/#overview) in the reference docs. The most recent version of the REST API endpoints is also available in the [Reference](reference/) in the Snyk user docs along with the current [REST API overview](snyk-rest-api-overview.md). +The [Snyk REST API](https://apidocs.snyk.io/) is based on the OpenAPI and JSON:API standards and represents an evolutionary approach to API development, with each endpoint versioned. For more information, see [Versioning](https://apidocs.snyk.io/#overview) in the reference docs. The most recent version of the REST API endpoints is also available in the [Reference](reference/) in the Snyk user docs along with the current [REST API overview](snyk-rest-api-overview/). ## Snyk V1 API (superseded by the REST API) diff --git a/docs/snyk-api/how-to-find-information-about-snyk-api-endpoints.md b/docs/snyk-api/api-endpoints-index-and-notes.md similarity index 99% rename from docs/snyk-api/how-to-find-information-about-snyk-api-endpoints.md rename to docs/snyk-api/api-endpoints-index-and-notes.md index a1ff1f6813c3..affeb49e7979 100644 --- a/docs/snyk-api/how-to-find-information-about-snyk-api-endpoints.md +++ b/docs/snyk-api/api-endpoints-index-and-notes.md @@ -1,4 +1,4 @@ -# How to find information about Snyk API endpoints +# API endpoints index and notes This list includes the categories and names of REST GA and beta and V1 API endpoints, with the URL in the reference docs for each endpoint, and links to related information where available. REST is the default, and GA is the status unless beta is noted. V1 API is specified where applicable. This listing is a work in progress; additional information is being added continually. @@ -202,7 +202,7 @@ This list includes the categories and names of REST GA and beta and V1 API endpo #### List all dependencies -[Migrated List all dependencies](how-to-find-information-about-snyk-api-endpoints.md#list-all-dependencies) +[Migrated List all dependencies](api-endpoints-index-and-notes.md#list-all-dependencies) ## Entitlements (v1) diff --git a/docs/snyk-api/how-to-use-snyk-api-endpoints/api-v1-dep-graph-endpoints.md b/docs/snyk-api/how-to-use-snyk-api-endpoints/api-v1-dep-graph-endpoints.md index 7bbb6d7d9576..a27a5d3256ea 100644 --- a/docs/snyk-api/how-to-use-snyk-api-endpoints/api-v1-dep-graph-endpoints.md +++ b/docs/snyk-api/how-to-use-snyk-api-endpoints/api-v1-dep-graph-endpoints.md @@ -12,7 +12,7 @@ The recommended approach to testing and monitoring your dependencies managed by Follow these basic steps: 1. For each type of dependency (for example, Maven, Cocoapods), create a [Dep Graph JSON object](https://github.com/snyk/dep-graph) listing all the dependency packages and versions. For an example, see the Snyk user docs [Bazel](../../getting-started/supported-languages-and-frameworks/bazel.md) page. -2. As part of a Bazel test rule, send the Dep Braph JSON object as a POST request to the [Dep Graph Test API](https://snyk.docs.apiary.io/#reference/test/dep-graph), along with your [auth token](../authentication-for-api/). An example curl request follows: +2. As part of a Bazel test rule, send the Dep Braph JSON object as a POST request to the [Dep Graph Test API](https://snyk.docs.apiary.io/#reference/test/dep-graph), along with your [auth token](../snyk-rest-api-overview/authentication-for-api/). An example curl request follows: ``` curl -X POST 'https://snyk.io/api/v1/test/dep-graph' \ diff --git a/docs/snyk-api/how-to-use-snyk-api-endpoints/rest-api-endpoint-test-an-sbom-document-for-vulnerabilities.md b/docs/snyk-api/how-to-use-snyk-api-endpoints/rest-api-endpoint-test-an-sbom-document-for-vulnerabilities.md index dc4522b866dc..8f8c13965d68 100644 --- a/docs/snyk-api/how-to-use-snyk-api-endpoints/rest-api-endpoint-test-an-sbom-document-for-vulnerabilities.md +++ b/docs/snyk-api/how-to-use-snyk-api-endpoints/rest-api-endpoint-test-an-sbom-document-for-vulnerabilities.md @@ -31,7 +31,7 @@ Testing your SBOM can be a long-running operation. Instead of waiting until the Follow these steps to test an SBOM: 1. Log in to the Snyk Web UI and retrieve your Organization ID (UUID format), Project ID (UUID), and API key.\ - If you need help in finding these values, see [Group and Organization navigation](../../snyk-admin/groups-and-organizations/switch-between-groups-and-organizations.md), [View Project settings](../../snyk-admin/snyk-projects/view-and-edit-project-settings.md), and [Authentication for API](../authentication-for-api/). + If you need help in finding these values, see [Group and Organization navigation](../../snyk-admin/groups-and-organizations/switch-between-groups-and-organizations.md), [View Project settings](../../snyk-admin/snyk-projects/view-and-edit-project-settings.md), and [Authentication for API](../snyk-rest-api-overview/authentication-for-api/). 2. Use any HTTP client, for example, `curl` or Postman, to make a request to the endpoint [Create an SBOM test run](https://apidocs.snyk.io/?version=2023-10-24%7Ebeta#post-/orgs/-org\_id-/sbom\_tests). {% hint style="info" %} diff --git a/docs/snyk-api/how-to-use-snyk-api-endpoints/rest-api-get-a-projects-sbom-document.md b/docs/snyk-api/how-to-use-snyk-api-endpoints/rest-api-get-a-projects-sbom-document.md index f731d14073de..b9f587d1308e 100644 --- a/docs/snyk-api/how-to-use-snyk-api-endpoints/rest-api-get-a-projects-sbom-document.md +++ b/docs/snyk-api/how-to-use-snyk-api-endpoints/rest-api-get-a-projects-sbom-document.md @@ -14,7 +14,7 @@ SBOM documents can be generated in [CycloneDX](https://cyclonedx.org/) v1.4 (JSO ## How to generate the SBOM for a project 1. On the Snyk Web UI, retrieve your organization ID (UUID format), project ID (UUID) and API key.\ - If you need help in finding these values, see [Group and Organization navigation](../../snyk-admin/groups-and-organizations/switch-between-groups-and-organizations.md), [View project settings](../../snyk-admin/snyk-projects/view-and-edit-project-settings.md), and [Authentication for API](../authentication-for-api/). + If you need help in finding these values, see [Group and Organization navigation](../../snyk-admin/groups-and-organizations/switch-between-groups-and-organizations.md), [View project settings](../../snyk-admin/snyk-projects/view-and-edit-project-settings.md), and [Authentication for API](../snyk-rest-api-overview/authentication-for-api/). 2. Determine the format you want for the SBOM you will generate.\ Available options are CycloneDX 1.4 JSON (`cyclonedx1.4+json`), CycloneDX 1.4 XML (`cyclonedx1.4+xml`) or SPDX v2.3 JSON (`spdx2.3+json`). 3. Using any HTTP client, for example, Postman or `curl`, make a request to the endpoint.\ diff --git a/docs/snyk-api/make-calls-to-the-snyk-api/try-a-simple-call-to-the-snyk-rest-api.md b/docs/snyk-api/make-calls-to-the-snyk-api/try-a-simple-call-to-the-snyk-rest-api.md index 24082df9ca7d..e7e99b4ace15 100644 --- a/docs/snyk-api/make-calls-to-the-snyk-api/try-a-simple-call-to-the-snyk-rest-api.md +++ b/docs/snyk-api/make-calls-to-the-snyk-api/try-a-simple-call-to-the-snyk-rest-api.md @@ -6,7 +6,7 @@ Follow these steps to make a simple call to the Snyk REST API. 2. Log in to [Snyk](https://snyk.io/). 3. Navigate to the **Org Settings** (gear icon) for an organization where you have projects you can list. 4. Find the **Organization ID** so you can copy the value when you make the API call. -5. Navigate to the Snyk REST API and authenticate. For instructions, see See [Authentication for API](../authentication-for-api/). +5. Navigate to the Snyk REST API and authenticate. For instructions, see See [Authentication for API](../snyk-rest-api-overview/authentication-for-api/). 6. Observe that the Snyk REST API opens to the most recent GA version. 7. Look for the **Projects** endpoints and navigate to `GET/orgs/{org_id}/projects` ([List all Projects for an Org with the given Org ID](https://apidocs.snyk.io/?#get-/orgs/-org\_id-/projects)). 8. Copy your **Organization ID** from your **Org settings** and paste the ID into the **PATH PARAMETERS** `org_id` field (asterisk designates a required request parameter). diff --git a/docs/snyk-api/reference/apps.md b/docs/snyk-api/reference/apps.md index c7aaccced5e9..012c15c781f8 100644 --- a/docs/snyk-api/reference/apps.md +++ b/docs/snyk-api/reference/apps.md @@ -1,116 +1,117 @@ # Apps {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/self/apps" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/self/apps/{app_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/self/apps/{app_id}/sessions" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/self/apps/{app_id}/sessions/{session_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/self/apps/installs" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/self/apps/installs/{install_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/{client_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/{client_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/{client_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/{client_id}/secrets" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/installs" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/installs" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/installs/{install_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/installs/{install_id}/secrets" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/creations" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/creations" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/creations/{app_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/creations/{app_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/creations/{app_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/apps/creations/{app_id}/secrets" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/app_bots" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/app_bots/{bot_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/apps/installs" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/apps/installs" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/apps/installs/{install_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/apps/installs/{install_id}/secrets" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/audit-logs.md b/docs/snyk-api/reference/audit-logs.md index 4e62862a0c57..49bcd0d2e0de 100644 --- a/docs/snyk-api/reference/audit-logs.md +++ b/docs/snyk-api/reference/audit-logs.md @@ -1,12 +1,13 @@ # Audit Logs {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/audit_logs/search" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/audit_logs/search" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/collection.md b/docs/snyk-api/reference/collection.md index f2fa10f3573c..6f77b5a674df 100644 --- a/docs/snyk-api/reference/collection.md +++ b/docs/snyk-api/reference/collection.md @@ -1,36 +1,37 @@ # Collection {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/collections" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/collections" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/collections/{collection_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/collections/{collection_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/collections/{collection_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/collections/{collection_id}/relationships/projects" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/collections/{collection_id}/relationships/projects" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/collections/{collection_id}/relationships/projects" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/containerimage.md b/docs/snyk-api/reference/containerimage.md index 8eb08b32aac9..d6cdf73fa41b 100644 --- a/docs/snyk-api/reference/containerimage.md +++ b/docs/snyk-api/reference/containerimage.md @@ -1,16 +1,17 @@ # ContainerImage {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/container_images" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/container_images/{image_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/container_images/{image_id}/relationships/image_target_refs" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/custom-base-images.md b/docs/snyk-api/reference/custom-base-images.md index b053c128fa0f..8aeb20d17729 100644 --- a/docs/snyk-api/reference/custom-base-images.md +++ b/docs/snyk-api/reference/custom-base-images.md @@ -1,24 +1,25 @@ # Custom Base Images {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/custom_base_images" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/custom_base_images" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/custom_base_images/{custombaseimage_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/custom_base_images/{custombaseimage_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/custom_base_images/{custombaseimage_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/iacsettings.md b/docs/snyk-api/reference/iacsettings.md index 983b77b7be50..1877402e5a6c 100644 --- a/docs/snyk-api/reference/iacsettings.md +++ b/docs/snyk-api/reference/iacsettings.md @@ -1,20 +1,21 @@ # IacSettings {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/settings/iac" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/settings/iac" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/settings/iac" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/settings/iac" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/invites.md b/docs/snyk-api/reference/invites.md index 5797e91f3b62..4900b0e6ac0e 100644 --- a/docs/snyk-api/reference/invites.md +++ b/docs/snyk-api/reference/invites.md @@ -1,16 +1,17 @@ # Invites {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/invites" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/invites" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/invites/{invite_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/issues.md b/docs/snyk-api/reference/issues.md index 071720bd9ffc..bdbfb58ba9a2 100644 --- a/docs/snyk-api/reference/issues.md +++ b/docs/snyk-api/reference/issues.md @@ -1,28 +1,29 @@ # Issues {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/packages/{purl}/issues" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/packages/issues" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/issues" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/issues/{issue_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/issues" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/issues/{issue_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/orgs.md b/docs/snyk-api/reference/orgs.md index d4df94d33bba..740bd3a0c04b 100644 --- a/docs/snyk-api/reference/orgs.md +++ b/docs/snyk-api/reference/orgs.md @@ -1,20 +1,21 @@ # Orgs {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/orgs" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/projects.md b/docs/snyk-api/reference/projects.md index 8ff1733d9925..328a248c787c 100644 --- a/docs/snyk-api/reference/projects.md +++ b/docs/snyk-api/reference/projects.md @@ -1,20 +1,21 @@ # Projects {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/projects" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/projects/{project_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/projects/{project_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/projects/{project_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/pull-request-templates.md b/docs/snyk-api/reference/pull-request-templates.md index d1a49ee0a95d..f542543a5c40 100644 --- a/docs/snyk-api/reference/pull-request-templates.md +++ b/docs/snyk-api/reference/pull-request-templates.md @@ -1,16 +1,17 @@ # Pull Request Templates {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/settings/pull_request_template" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/settings/pull_request_template" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/settings/pull_request_template" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/sastsettings.md b/docs/snyk-api/reference/sastsettings.md index 92af9176bdfa..3de15162e2ad 100644 --- a/docs/snyk-api/reference/sastsettings.md +++ b/docs/snyk-api/reference/sastsettings.md @@ -1,12 +1,13 @@ # SastSettings {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/settings/sast" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/settings/sast" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/sbom.md b/docs/snyk-api/reference/sbom.md index 4d4f8d3c7f32..48e54af3a47b 100644 --- a/docs/snyk-api/reference/sbom.md +++ b/docs/snyk-api/reference/sbom.md @@ -1,8 +1,9 @@ # SBOM {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/projects/{project_id}/sbom" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/serviceaccounts.md b/docs/snyk-api/reference/serviceaccounts.md index 39b9f83ac8b5..d9adf6384f3c 100644 --- a/docs/snyk-api/reference/serviceaccounts.md +++ b/docs/snyk-api/reference/serviceaccounts.md @@ -1,52 +1,53 @@ # ServiceAccounts {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/service_accounts" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/service_accounts" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/service_accounts/{serviceaccount_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/service_accounts/{serviceaccount_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/service_accounts/{serviceaccount_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/service_accounts/{serviceaccount_id}/secrets" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/service_accounts" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/service_accounts" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/service_accounts/{serviceaccount_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/service_accounts/{serviceaccount_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/service_accounts/{serviceaccount_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/groups/{group_id}/service_accounts/{serviceaccount_id}/secrets" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/slack.md b/docs/snyk-api/reference/slack.md index 1fe010501434..10bd33de5f4c 100644 --- a/docs/snyk-api/reference/slack.md +++ b/docs/snyk-api/reference/slack.md @@ -1,12 +1,13 @@ # Slack {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{tenant_id}/channels" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{tenant_id}/channels/{channel_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/slacksettings.md b/docs/snyk-api/reference/slacksettings.md index 86d328526ca6..64272277c478 100644 --- a/docs/snyk-api/reference/slacksettings.md +++ b/docs/snyk-api/reference/slacksettings.md @@ -1,32 +1,33 @@ # SlackSettings {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{bot_id}" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{bot_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{bot_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{bot_id}/projects" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id}" method="post" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id}" method="patch" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/targets.md b/docs/snyk-api/reference/targets.md index e5a98e3518bc..db0566d88b58 100644 --- a/docs/snyk-api/reference/targets.md +++ b/docs/snyk-api/reference/targets.md @@ -1,16 +1,17 @@ # Targets {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/targets" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/targets/{target_id}" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} {% swagger src="../../.gitbook/assets/rest-spec.json" path="/orgs/{org_id}/targets/{target_id}" method="delete" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/reference/users.md b/docs/snyk-api/reference/users.md index d674e4fa2e4c..ef18c798801f 100644 --- a/docs/snyk-api/reference/users.md +++ b/docs/snyk-api/reference/users.md @@ -1,8 +1,9 @@ # Users {% hint style="info" %} -This document uses the REST API. For more details, see the [Authentication for API](../authentication-for-api/) page. +This document uses the REST API. For more details, see the [Authentication for API](../snyk-rest-api-overview/authentication-for-api/) page. {% endhint %} + {% swagger src="../../.gitbook/assets/rest-spec.json" path="/self" method="get" %} -[spec.yaml](../../.gitbook/assets/rest-spec.json) +[rest-spec.json](../../.gitbook/assets/rest-spec.json) {% endswagger %} diff --git a/docs/snyk-api/snyk-apps/prerequisites-for-snyk-apps.md b/docs/snyk-api/snyk-apps/prerequisites-for-snyk-apps.md index 3e9fce184450..78b7e977c720 100644 --- a/docs/snyk-api/snyk-apps/prerequisites-for-snyk-apps.md +++ b/docs/snyk-api/snyk-apps/prerequisites-for-snyk-apps.md @@ -1,6 +1,6 @@ # Prerequisites for Snyk Apps -To create a Snyk App, you must have access to the Snyk API. To get started, follow the steps for [authentication for API](../authentication-for-api/). +To create a Snyk App, you must have access to the Snyk API. To get started, follow the steps for [authentication for API](../snyk-rest-api-overview/authentication-for-api/). You must also retrieve the ID of the Snyk Organization you intend the App to be owned by (your `orgId`). You can get the Organization ID from the Organization settings in the Snyk Web UI or by using the `https://api.snyk.io/rest/orgs` API endpoint, with the Snyk API token in the Authorization header. diff --git a/docs/snyk-api/snyk-rest-api-overview.md b/docs/snyk-api/snyk-rest-api-overview/README.md similarity index 100% rename from docs/snyk-api/snyk-rest-api-overview.md rename to docs/snyk-api/snyk-rest-api-overview/README.md diff --git a/docs/snyk-api/authentication-for-api/README.md b/docs/snyk-api/snyk-rest-api-overview/authentication-for-api/README.md similarity index 76% rename from docs/snyk-api/authentication-for-api/README.md rename to docs/snyk-api/snyk-rest-api-overview/authentication-for-api/README.md index a261fc91417a..52198ef81af0 100644 --- a/docs/snyk-api/authentication-for-api/README.md +++ b/docs/snyk-api/snyk-rest-api-overview/authentication-for-api/README.md @@ -9,6 +9,6 @@ To use the Snyk API, you must first get your API token from Snyk. For more information about authentication, refer to the overview in the [API reference docs](https://apidocs.snyk.io/). For additional information, see [Revoking and regenerating Snyk API tokens](revoking-and-regenerating-snyk-api-tokens.md). -![Get API token](<../../.gitbook/assets/uuid-8d94edf8-b42b-e5b3-ada1-e157d18ff884-en (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (3) (16).png>) +![Get API token](<../../../.gitbook/assets/uuid-8d94edf8-b42b-e5b3-ada1-e157d18ff884-en (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (3) (16).png>) -For information about using personal tokens versus service account tokens, see [How to obtain and authenticate with your Snyk API token](../../getting-started/how-to-obtain-and-authenticate-with-your-snyk-api-token.md). +For information about using personal tokens versus service account tokens, see [How to obtain and authenticate with your Snyk API token](../../../getting-started/how-to-obtain-and-authenticate-with-your-snyk-api-token.md). diff --git a/docs/snyk-api/authentication-for-api/api-token-permissions-users-can-control.md b/docs/snyk-api/snyk-rest-api-overview/authentication-for-api/api-token-permissions-users-can-control.md similarity index 84% rename from docs/snyk-api/authentication-for-api/api-token-permissions-users-can-control.md rename to docs/snyk-api/snyk-rest-api-overview/authentication-for-api/api-token-permissions-users-can-control.md index e0b984ad1b3a..616a50ee5ec1 100644 --- a/docs/snyk-api/authentication-for-api/api-token-permissions-users-can-control.md +++ b/docs/snyk-api/snyk-rest-api-overview/authentication-for-api/api-token-permissions-users-can-control.md @@ -4,4 +4,4 @@ To set an API token to be read-only and unable to write to the platform, use a s Service accounts at the org level have only org admin and org collaborator permissions. Thus to set a service account to view-only you must use a group level service account. -For more information see [Service accounts](../../enterprise-configuration/service-accounts/). +For more information see [Service accounts](../../../enterprise-configuration/service-accounts/). diff --git a/docs/snyk-api/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md b/docs/snyk-api/snyk-rest-api-overview/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md similarity index 78% rename from docs/snyk-api/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md rename to docs/snyk-api/snyk-rest-api-overview/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md index e774b816f98f..4375dac7ba6d 100644 --- a/docs/snyk-api/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md +++ b/docs/snyk-api/snyk-rest-api-overview/authentication-for-api/revoking-and-regenerating-snyk-api-tokens.md @@ -8,6 +8,6 @@ If you suspect an API token has been leaked, it is good practice to revoke that To revoke your Snyk user API token, navigate to your User Account Settings in the Snyk Web UI at [app.snyk.io/account](https://app.snyk.io/account). -![APT token screen, Revoke & Regenerate button](<../../.gitbook/assets/uuid-8d94edf8-b42b-e5b3-ada1-e157d18ff884-en (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (3) (16).png>) +![APT token screen, Revoke & Regenerate button](<../../../.gitbook/assets/uuid-8d94edf8-b42b-e5b3-ada1-e157d18ff884-en (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (3) (16).png>) Click the **Revoke & Regenerate** button to revoke your API token. A new one will be generated in its place. You can now copy the newly generated API token and update integrations that used the old key. diff --git a/docs/snyk-api/changelog.md b/docs/snyk-api/snyk-rest-api-overview/changelog.md similarity index 100% rename from docs/snyk-api/changelog.md rename to docs/snyk-api/snyk-rest-api-overview/changelog.md diff --git a/docs/snyk-api/snyk-rest-api-overview/guides-to-migration/README.md b/docs/snyk-api/snyk-rest-api-overview/guides-to-migration/README.md new file mode 100644 index 000000000000..0b149d44d7d3 --- /dev/null +++ b/docs/snyk-api/snyk-rest-api-overview/guides-to-migration/README.md @@ -0,0 +1,17 @@ +--- +layout: + title: + visible: true + description: + visible: true + tableOfContents: + visible: true + outline: + visible: true + pagination: + visible: true +--- + +# Guides to Migration + +Snyk is migrating V1 API endpoints to REST, and REST experimental endpoints to GA. The guides in this section explain what is being done for each group of endpoints. diff --git a/docs/snyk-api/example-migration-guide-list-all-projects-v1-api-to-rest-api.md b/docs/snyk-api/snyk-rest-api-overview/guides-to-migration/list-all-projects-v1-api-to-rest-api-migration-guide-completed-migration.md similarity index 99% rename from docs/snyk-api/example-migration-guide-list-all-projects-v1-api-to-rest-api.md rename to docs/snyk-api/snyk-rest-api-overview/guides-to-migration/list-all-projects-v1-api-to-rest-api-migration-guide-completed-migration.md index f087a71492cb..ae172136bf57 100644 --- a/docs/snyk-api/example-migration-guide-list-all-projects-v1-api-to-rest-api.md +++ b/docs/snyk-api/snyk-rest-api-overview/guides-to-migration/list-all-projects-v1-api-to-rest-api-migration-guide-completed-migration.md @@ -1,4 +1,4 @@ -# Example migration guide: List all Projects V1 API to REST API +# List all Projects V1 API to REST API migration guide (completed migration) {% hint style="warning" %} **End of life** @@ -88,7 +88,3 @@ The following Snyk Tools that use the [List all projects v1 API](https://snyk.do | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Filter by tags |

Filter: tags

Return projects that match all the provided tags


| Supported from version [2023-02-15](https://apidocs.snyk.io/?version=2023-02-15#get-/orgs/-org\_id-/projects) and up | | Filter by attributes | Filter: business\_criticality, environment and lifecycle | Supported from version [2023-02-15](https://apidocs.snyk.io/?version=2023-02-15#get-/orgs/-org\_id-/projects) and up | - -### - -\\ diff --git a/docs/snyk-api/rest-issues-experimental-api-to-ga-api-migration-guide.md b/docs/snyk-api/snyk-rest-api-overview/guides-to-migration/rest-issues-experimental-api-to-ga-api-migration-guide.md similarity index 97% rename from docs/snyk-api/rest-issues-experimental-api-to-ga-api-migration-guide.md rename to docs/snyk-api/snyk-rest-api-overview/guides-to-migration/rest-issues-experimental-api-to-ga-api-migration-guide.md index 3388c23b011e..8053086ddda6 100644 --- a/docs/snyk-api/rest-issues-experimental-api-to-ga-api-migration-guide.md +++ b/docs/snyk-api/snyk-rest-api-overview/guides-to-migration/rest-issues-experimental-api-to-ga-api-migration-guide.md @@ -1,4 +1,4 @@ -# REST Issues Experimental API to GA API Migration Guide +# REST Issues experimental API to GA API migration guide {% hint style="info" %} **Important information about Experimental APIs** @@ -6,7 +6,7 @@ An experimental endpoint should be considered unstable and regarded as a tech preview. Experimental versions may introduce breaking changes and may be discontinued at any time. {% endhint %} -## What's New in the GA REST Issues API? +## What's new in the GA REST Issues API? This version of the API delivers: @@ -19,17 +19,17 @@ Snyk understands that migrating to a new API can be a significant undertaking an If you are using the deprecated endpoint, Snyk encourages you to review this migration guide and move all your automations over. -## Comparison of Experimental vs GA API +## Comparison of experimental vs GA API {% hint style="info" %} -**Mapping Experimental API issues to GA API issues** +**Mapping experimental API issues to GA API issues** One of the main differences you will see in the table below is that the format of the ID for an issue changes from URI format (consists of key & scan\_item.id) in the Experimental API to UUID in the GA API. To match an issue in the experimental api response to the same issue in the GA API response you can use **key** and the **scan\_item.id**. Note that **scan\_item** is part of the **relationships** block and **key** is part of the **attributes** block. {% endhint %}
FieldsExperimentalGA
classesPresentNo change
coordinatesOnly available for cloud issuesAvailable for cloud and SCA issues and has new fixability fields.

coordinates.is_fixable_manually

coordinates.is_fixable_snyk

coordinates.is_fixable_upstream

coordinates.is_patchable

coordinates.is_pinnable

coordinates.is_upgradeable


Not presentNewly introduced fixability data
coordinates.reachabilityNot presentNewly introduced
coordinates.remediesPresentNo change
representationsPresentNew fields
representations.resourcePathPresentNo change
respresentations.dependencyChainPresentRemoved in favor of representations.dependency
representations.dependencyNot present

Newly introduced replaces representations.

dependencyChain

representations.dependency

.package_name

representations.dependency.

package_version


Not presentNewly introduced as part of represenations.dependency
cloud_resourcePresentNo change
sourceLocationPresentNo change
created_atPresentNo change
description
No change
effective_severity_levelPresentNo change
ignoredPresentNo change
keyPresentNo change
priorityPresentRemoved and replaced with risk
priority.factorsPresentReplaced with risk.factors
priority.scorePresentReplaced with risk.score
riskNot presentNewly introduced - replaces priority
risk.factorsNot presentNewly introduced - replaces priority.factors

risk.factors[i].included_in_score

risk.factors[i].links

risk.factors[i].links.evidence

risk.factors[i].links.evidence.href

risk.factors[i].links.evidence.meta

risk.factors[i].name

risk.factors[i].updated_at

risk.factors[i].value

Not presentNewly introduced
risk.scoreNot presentNewly introduced replaces priority.score

risk.score.model

risk.score.updated_at

risk.score.value

Not present
problemsPresentNo change
resolutionOnly for cloud issuesFor all issue types
severitiesPresent - Not populatedRemoved as not populated and will not be
statusPresentNo change
titlePresentNo change
toolPresentNo change
typePresentNo change
updated_atPresentNo change
idURI format (consists of key & scan_item.id)UUID format
relationships.ignorePresentNo change
relationships.organizationPresentNo change
relationships.policiesPresent - Not populatedRemoved as not populated and will not be
relationships.previousPresent - Not populatedRemoved as not populated and will not be
relationships.scan_itemPresentNo change
relationships.test_executionPresentNo change
-## Comparison of Filters in Experimental vs GA API +## Comparison of filters in experimental vs GA API | Filter by | Purpose | Experimental | GA | | -------------------------- | --------------------------------------------------------- | ------------ | ---------------- | diff --git a/docs/snyk-api/make-calls-to-the-snyk-api/links-for-pagination-in-snyk-rest-api.md b/docs/snyk-api/snyk-rest-api-overview/links-for-pagination-in-snyk-rest-api.md similarity index 100% rename from docs/snyk-api/make-calls-to-the-snyk-api/links-for-pagination-in-snyk-rest-api.md rename to docs/snyk-api/snyk-rest-api-overview/links-for-pagination-in-snyk-rest-api.md diff --git a/docs/snyk-api/make-calls-to-the-snyk-api/relationships-in-snyk-rest-api.md b/docs/snyk-api/snyk-rest-api-overview/relationships-in-snyk-rest-api.md similarity index 100% rename from docs/snyk-api/make-calls-to-the-snyk-api/relationships-in-snyk-rest-api.md rename to docs/snyk-api/snyk-rest-api-overview/relationships-in-snyk-rest-api.md diff --git a/docs/snyk-api/make-calls-to-the-snyk-api/request-body-schema-in-snyk-rest-api.md b/docs/snyk-api/snyk-rest-api-overview/request-body-schema-in-snyk-rest-api.md similarity index 100% rename from docs/snyk-api/make-calls-to-the-snyk-api/request-body-schema-in-snyk-rest-api.md rename to docs/snyk-api/snyk-rest-api-overview/request-body-schema-in-snyk-rest-api.md diff --git a/docs/snyk-api/make-calls-to-the-snyk-api/snyk-api-rate-limits.md b/docs/snyk-api/snyk-rest-api-overview/snyk-api-rate-limits.md similarity index 100% rename from docs/snyk-api/make-calls-to-the-snyk-api/snyk-api-rate-limits.md rename to docs/snyk-api/snyk-rest-api-overview/snyk-api-rate-limits.md diff --git a/docs/snyk-api/snyk-webhooks/guides-to-webhooks/README.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/README.md new file mode 100644 index 000000000000..dc542ddee65c --- /dev/null +++ b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/README.md @@ -0,0 +1,2 @@ +# Guides to webhooks + diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/README.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/README.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/README.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/README.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-add-security-through-an-environment-variable.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-add-security-through-an-environment-variable.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-add-security-through-an-environment-variable.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-add-security-through-an-environment-variable.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-create-lambda-function-to-connect-snyk-to-slack.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-create-lambda-function-to-connect-snyk-to-slack.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-create-lambda-function-to-connect-snyk-to-slack.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-create-lambda-function-to-connect-snyk-to-slack.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/README.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/README.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/README.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/README.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/README.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/README.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/README.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/README.md diff --git a/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md new file mode 100644 index 000000000000..d34b6de13293 --- /dev/null +++ b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-a-lambda-function-url/modify-the-lambda-function.md @@ -0,0 +1,13 @@ +# Modify the Lambda function + +1. Open your Lambda function and click on **Configuration**. +2. Select **Function URL** and then **Create function URL**. + +
+3. Change **Auth type** to **NONE** and save. + +
+4. Copy the function URL to use in the next step of the guide. +5. The function URL is now ready for use and a resource-based policy has been added that you can verify under **Permissions**. + +
diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/README.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/README.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/README.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/README.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-add-the-post-method-to-connect-snyk-to-slack.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-add-the-post-method-to-connect-snyk-to-slack.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-add-the-post-method-to-connect-snyk-to-slack.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-add-the-post-method-to-connect-snyk-to-slack.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-deploy-the-post-method.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-deploy-the-post-method.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-deploy-the-post-method.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-api-gateway-deploy-the-post-method.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-lambda-setup-set-up-the-trigger.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-lambda-setup-set-up-the-trigger.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-lambda-setup-set-up-the-trigger.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/aws-lambda-setup-set-up-the-trigger/with-api-gateway/aws-lambda-setup-set-up-the-trigger.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/configure-the-aws-lambda-script.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/configure-the-aws-lambda-script.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/configure-the-aws-lambda-script.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/configure-the-aws-lambda-script.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/set-up-the-snyk-webhook.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/set-up-the-snyk-webhook.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/set-up-the-snyk-webhook.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/set-up-the-snyk-webhook.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/slack-setup-to-connect-snyk-with-aws-lambda.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/slack-setup-to-connect-snyk-with-aws-lambda.md similarity index 94% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/slack-setup-to-connect-snyk-with-aws-lambda.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/slack-setup-to-connect-snyk-with-aws-lambda.md index f00e40e053b4..165e8660fa01 100644 --- a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/slack-setup-to-connect-snyk-with-aws-lambda.md +++ b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/slack-setup-to-connect-snyk-with-aws-lambda.md @@ -20,7 +20,7 @@ To set up Slack Apps with a webhook, follow these steps:
Add features and functionality to Slack App, Incoming webhooks

Add features and functionality to Slack App, Incoming webhooks

9. Activate incoming webhooks in that page. -

Incoming webhooks activation

+

Incoming webhooks activation

10. Generate a webhook URL for the channel you want by clicking on **Add New Webhook to Workspace** 11. Select the channel you want Snyk to post to. If you haven’t already done so, [create a channel](https://slack.com/intl/en-gb/help/articles/201402297-Create-a-channel). 12. When the webhook has been created, copy and save the webhook URL to use in the next step in AWS. diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/test-the-snyk-webhook-connection.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/test-the-snyk-webhook-connection.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/test-the-snyk-webhook-connection.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-connect-snyk-to-slack-with-aws-lambda/test-the-snyk-webhook-connection.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk/README.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/README.md similarity index 77% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk/README.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/README.md index 3331ce13ec41..5e3b1a7bbe4a 100644 --- a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk/README.md +++ b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/README.md @@ -1,10 +1,10 @@ -# Using Snyk Webhooks to integrate New Relic with Snyk +# How to use Snyk Webhooks to integrate New Relic with Snyk New Relic Security API is the most recent approach to having New Relic send any type of security-related information into the New Relic platform. This API is part of New Relic's Vulnerability Management capabilities. Using New Relic Security API is beneficial because New Relic “understands” the type of data being ingested and is able to provide a curated user interface for the information. New Relic also offers a standardized way of correlating this information with other types of data that New Relic is able to consume. You can see the correlations on the tabs in New Relic, including the vulnerability management section of an entity. -
Entity-level vulnerability management

Entity-level vulnerability management

+
Entity-level vulnerability management

Entity-level vulnerability management

Examples of such correlations are: @@ -13,11 +13,11 @@ Examples of such correlations are: New Relic also provides a dedicated Vulnerability Management section for all of your security-related issues. The information shared using the Snyk webhook will automatically be populated automatically in this section. -
Vulnerability Management

Vulnerability Management

+
Vulnerability Management

Vulnerability Management

To set up the integration between Snyk and New Relic, follow the steps on these pages. There are two ways to achieve this: 1. Through New Relic's native security ingest processor: follow the guide on [New Relic docs](https://docs.newrelic.com/docs/vulnerability-management/integrations/snyk/) to get started -2. Through an Azure Function App that acts as a proxy: begin with [Create an Azure Function App](../using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/create-an-azure-function-app.md). +2. Through an Azure Function App that acts as a proxy: begin with [Create an Azure Function App](create-an-azure-function-app.md). If you have **problems** setting up or using the Snyk Webhook, **contact** your Solutions Engineer or Technical Success Manager for help. diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/configure-azure-function-environment-variables.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/configure-azure-function-environment-variables.md similarity index 86% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/configure-azure-function-environment-variables.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/configure-azure-function-environment-variables.md index c25371532ee3..75092af5026d 100644 --- a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/configure-azure-function-environment-variables.md +++ b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/configure-azure-function-environment-variables.md @@ -15,6 +15,6 @@ If you want to use the optional parameters for troubleshooting in a separate New * **NEW\_RELIC\_INSIGHTS\_URL**: URL for the New Relic account event API, that is, https://insights-collector.newrelic.com/v1/accounts/{NR-ACCOUNT-ID}/events -
Azure Function Configuration

Azure Function Configuration

+
Azure Function Configuration

Azure Function Configuration

Next [Copy the Azure Function URL](copy-the-azure-function-url.md). diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/copy-the-azure-function-url.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/copy-the-azure-function-url.md similarity index 62% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/copy-the-azure-function-url.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/copy-the-azure-function-url.md index b184452a0a35..11bff93eda1d 100644 --- a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/copy-the-azure-function-url.md +++ b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/copy-the-azure-function-url.md @@ -4,4 +4,4 @@ Select the appropriate Azure Function and copy the Function URL. You need this U An example follows for one user's New Relic Azure Function. -
Azure Function URL

Azure Function URL

+
Azure Function URL

Azure Function URL

diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/create-a-snyk-webhook.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/create-a-snyk-webhook.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/create-a-snyk-webhook.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/create-a-snyk-webhook.md diff --git a/docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/create-an-azure-function-app.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/create-an-azure-function-app.md similarity index 100% rename from docs/snyk-api-info/snyk-webhooks/using-snyk-webhooks-to-integrate-new-relic-with-snyk-through-an-azure-function-app/create-an-azure-function-app.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/create-an-azure-function-app.md diff --git a/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/new-relic-curated-ui-and-snyk-custom-dashboard.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/new-relic-curated-ui-and-snyk-custom-dashboard.md new file mode 100644 index 000000000000..d990972ffc6e --- /dev/null +++ b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/how-to-use-snyk-webhooks-to-integrate-new-relic-with-snyk/new-relic-curated-ui-and-snyk-custom-dashboard.md @@ -0,0 +1,23 @@ +# New Relic Curated UI and Snyk Custom Dashboard + +Once the Azure Function and the Snyk Webhook are created, you see data coming in for Snyk projects with the configured retest frequency, or projects that you scan manually and where Snyk identifies new issues. + +## Vulnerability event type + +You can look into the Vulnerability event type to validate that data flows into New Relic. + +
Vulnerability event type

Vulnerability event type

+ +## New Relic Vulnerability Management + +In addition New Relic provides a curated UI, a New Relic app named Vulnerability Management, that you can use to visualize all the issues being sent. + +
Vulnerability management app

Vulnerability management app

+ +
Vulnerability app management details

Vulnerability app management details

+ +## Snyk quickstart template + +The Snyk team has also built a quickstart template that includes a sample custom dashboard to make sure all the data is presented in a Snyk-focused way. + +
New Relic Snyk dashboard

New Relic Snyk dashboard

diff --git a/docs/snyk-api-info/snyk-webhooks/tutorial.md b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/tutorial.md similarity index 97% rename from docs/snyk-api-info/snyk-webhooks/tutorial.md rename to docs/snyk-api/snyk-webhooks/guides-to-webhooks/tutorial.md index 9d130b88c8f6..faa7f19f295a 100644 --- a/docs/snyk-api-info/snyk-webhooks/tutorial.md +++ b/docs/snyk-api/snyk-webhooks/guides-to-webhooks/tutorial.md @@ -1,4 +1,4 @@ -# Using Snyk webhooks with Zapier +# How to use Snyk webhooks with Zapier {% hint style="info" %} Snyk API v1 docs are at [https://snyk.docs.apiary.io/#](https://snyk.docs.apiary.io) @@ -12,7 +12,7 @@ First of all, we need to create a new Zap in [Zapier](https://zapier.com) In order to have an access to request headers, we need to create **"Catch Raw Hook"** trigger. It comes with a disadvantage that request payload will be provided as a string and we will need to parse it to the JSON. -![](<../../.gitbook/assets/untitled (1) (1) (1) (1) (1) (1) (1).png>) +![](<../../../.gitbook/assets/untitled (1) (1) (1) (1) (1) (1) (1).png>) It will provide us a Webhook url, were we can send requests: diff --git a/docs/snyk-api/snyk-webhooks/validation-and-versioning-of-payloads.md b/docs/snyk-api/snyk-webhooks/validation-and-versioning-of-payloads.md new file mode 100644 index 000000000000..bc325a1ee1e2 --- /dev/null +++ b/docs/snyk-api/snyk-webhooks/validation-and-versioning-of-payloads.md @@ -0,0 +1,29 @@ +# Validation and versioning of payloads + +### Validating payloads + +All transports sent to your webhooks have a `X-Hub-Signature` header, which contains the hash signature for the transport. The signature is a HMAC hexdigest of the request body, generated using sha256 and your `secret` as the HMAC key. + +You could use a function in Node.JS such as the following to validate these signatures on incoming requests from Snyk: + +``` +import * as crypto from 'crypto'; + +function verifySignature(request, secret) { + const hmac = crypto.createHmac('sha256', secret); + const buffer = JSON.stringify(request.body); + hmac.update(buffer, 'utf8'); + + const signature = `sha256=${hmac.digest('hex')}`; + + return signature === request.headers['x-hub-signature']; +} +``` + +### Payload versioning + +Payloads may evolve over time, and so are versioned. Payload versions are supplied as a suffix to the `X-Snyk-Event` header. For example, `project_snapshot/v0` indicates that the payload is `v0` of the `project_snapshot` event. + +Version numbers only increment when a breaking change is made; for example, removing a field that used to exist, or changing the name of a field. Version numbers do not increment when making an additive change, such as adding a new field that never existed before. + +**Note:** During the BETA phase, the structure of webhook payloads may change at any time, so we recommend you check the payload version. diff --git a/docs/snyk-api/v1-api-overview/webhooks.md b/docs/snyk-api/snyk-webhooks/webhooks.md similarity index 81% rename from docs/snyk-api/v1-api-overview/webhooks.md rename to docs/snyk-api/snyk-webhooks/webhooks.md index 36071c2ecc01..cac9a3a4b552 100644 --- a/docs/snyk-api/v1-api-overview/webhooks.md +++ b/docs/snyk-api/snyk-webhooks/webhooks.md @@ -1,4 +1,4 @@ -# Webhooks +# Webhook events and payloads Webhooks are delivered with a `Content-Type` of `application/json`, with the event payload as JSON in the request body. We also send the following headers: @@ -12,39 +12,11 @@ Webhooks are delivered with a `Content-Type` of `application/json`, with the eve After your server is configured to receive payloads, it listens for any payload sent to the endpoint you configured. For security reasons, you should limit requests to those coming from Snyk. -#### Validating payloads - -All transports sent to your webhooks have a `X-Hub-Signature` header, which contains the hash signature for the transport. The signature is a HMAC hexdigest of the request body, generated using sha256 and your `secret` as the HMAC key. - -You could use a function in Node.JS such as the following to validate these signatures on incoming requests from Snyk: - -``` -import * as crypto from 'crypto'; - -function verifySignature(request, secret) { - const hmac = crypto.createHmac('sha256', secret); - const buffer = JSON.stringify(request.body); - hmac.update(buffer, 'utf8'); - - const signature = `sha256=${hmac.digest('hex')}`; - - return signature === request.headers['x-hub-signature']; -} -``` - -#### Payload versioning - -Payloads may evolve over time, and so are versioned. Payload versions are supplied as a suffix to the `X-Snyk-Event` header. For example, `project_snapshot/v0` indicates that the payload is `v0` of the `project_snapshot` event. - -Version numbers only increment when a breaking change is made; for example, removing a field that used to exist, or changing the name of a field. Version numbers do not increment when making an additive change, such as adding a new field that never existed before. - -**Note:** During the BETA phase, the structure of webhook payloads may change at any time, so we recommend you check the payload version. - -#### Event types +### Event types While consuming a webhook event, `X-Snyk-Event` header must be checked, as an end-point may receive multiple event types. -**ping** +#### **ping** The ping event happens after a new webhook is created, and can also be manually triggered using the ping webhook API. This is useful to test that your webhook receives data from Snyk correctly. @@ -64,7 +36,7 @@ Content-Type: application/json } ``` -**project\_snapshot** +#### **project\_snapshot** This event is triggered every time an existing project is tested and a new snapshot is created. It is triggered on every test of a project, whether or not there are new issues. This event is not triggered when a new project is created or imported. Currently supported targets/scan types are Open Source and container. diff --git a/docs/snyk-api/v1-api-overview/entities.md b/docs/snyk-api/v1-api-overview/entities.md deleted file mode 100644 index 31e7c277403a..000000000000 --- a/docs/snyk-api/v1-api-overview/entities.md +++ /dev/null @@ -1,148 +0,0 @@ -# Entities - -The API is a REST API. It has the following entities: - -#### Test result - -The test result is the object returned from the API giving the results of testing a package for issues. It has the following fields: - -| Property | Type | Description | Example | -| --------------: | ------- | ----------------------------------------------------- | --------------------------------------------------------------- | -| ok | boolean | Does this package have one or more issues? | false | -| issues | object | The issues found. See below for details. | See below | -| dependencyCount | number | The number of dependencies the package has. | 9 | -| org | object | The organization this test was carried out for. | {"name": "anOrg", "id": "5d7013d9-2a57-4c89-993c-0304d960193c"} | -| licensesPolicy | object | The organization's licenses policy used for this test | See in the examples | -| packageManager | string | The package manager for this package | "maven" | - -Issue - -An issue is either a vulnerability or a license issue, according to the organization's policy. It has the following fields: - -| Property | Type | Description | Example | -| -------------: | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| id | string | The issue ID | "SNYK-JS-BACKBONE-10054" | -| url | string | A link to the issue details on snyk.io | "[https://snyk.io/vuln/SNYK-JS-BACKBONE-10054](https://snyk.io/vuln/SNYK-JS-BACKBONE-10054) | -| title | string | The issue title | "Cross Site Scripting" | -| type | string | The issue type: "license" or "vulnerability". | "license" | -| paths | array | The paths to the dependencies which have an issue, and their corresponding upgrade path (if an upgrade is available). [More information about from and upgrade paths](https://snyk.docs.apiary.io/#introduction/overview-and-entities/from-and-upgrade-paths) |

[
{
"from": ["a@1.0.0", "b@4.8.1"],
"upgrade": [false, "b@4.8.2"]
}
]

| -| package | string | The package identifier according to its package manager | "backbone", "org.apache.flex.blazeds:blazeds" | -| version | string | The package version this issue is applicable to. | "0.4.0" | -| severity | string | The Snyk defined severity level: "critical", "high", "medium" or "low". | "high" | -| language | string | The package's programming language | "js" | -| packageManager | string | The package manager | "npm" | -| semver | array\[string] OR map\[string]array\[string] | One or more [semver](https://semver.org) ranges this issue is applicable to. The format varies according to package manager. | \["<0.5.0, >=0.4.0", "<0.3.8, >=0.3.6"] OR { "vulnerable": \["\[2.0.0, 3.0.0)"], "unaffected": \["\[1, 2)", "\[3, )"] } | - -#### Vulnerability - -A vulnerability in a package. In addition to all the fields present in an issue, a vulnerability also has these fields: - -| Property | Type | Description | Example | -| --------------: | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| publicationTime | Date | The vulnerability publication time | "2016-02-11T07:16:18.857Z" | -| disclosureTime | Date | The time this vulnerability was originally disclosed to the package maintainers | "2016-02-11T07:16:18.857Z" | -| isUpgradable | boolean | Is this vulnerability fixable by upgrading a dependency? | true | -| description | string | The detailed description of the vulnerability, why and how it is exploitable. Provided in markdown format. | "## Overview[`org.apache.logging.log4j:log4j-core`](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22log4j-core%22)\nIn Apache Log4j 2.x before 2.8.2, when using the TCP socket server or UDP socket server to receive serialized log events from another application, a specially crafted binary payload can be sent that, when deserialized, can execute arbitrary code.\n\n# Details\nSerialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like _Remote Method Invocation (RMI)_, _Java Management Extension (JMX)_, _Java Messaging System (JMS)_, _Action Message Format (AMF)_, _Java Server Faces (JSF) ViewState_, etc.\n\n\_Deserialization of untrusted data\_ ([CWE-502](https://cwe.mitre.org/data/definitions/502.html)), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution. \n\nJava deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a [popular library (Apache Commons Collection)](https://snyk.io/vuln/SNYK-JAVA-COMMONSCOLLECTIONS-30078). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.\n\nAn attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.\n\n> Developers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application an attacker can execute functions (including calling Runtime.exec() to execute local OS commands).\n- Apache Blog\n\n\n## References\n- [NVD](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5645)\n- [jira issue](https://issues.apache.org/jira/browse/LOG4J2-1863)\n" | -| isPatchable | boolean | Is this vulnerability fixable by using a Snyk supplied patch? | true | -| isPinnable | boolean | Is this vulnerability fixable by pinning a transitive dependency | true | -| identifiers | object | Additional vulnerability identifiers | {"CWE": \[], "CVE": \["CVE-2016-2402]} | -| credit | string | The reporter of the vulnerability | "Snyk Security Team" | -| CVSSv3 | string | Common Vulnerability Scoring System (CVSS) provides a way to capture the principal characteristics of a vulnerability, and produce a numerical score reflecting its severity, as well as a textual representation of that score. | "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N" | -| cvssScore | number | CVSS Score | 5.3 | -| patches | array | Patches to fix this issue, by snyk | see "Patch" below. | -| upgradePath | object | The path to upgrade this issue, if applicable | see below | -| isPatched | boolean | Is this vulnerability patched? | false | -| exploitMaturity | string | The snyk exploit maturity level | | - -**Patch** - -A patch is an object like this one: - -``` -{ - "urls": [ - "https://snyk-patches.s3.amazonaws.com/npm/backbone/20110701/backbone_20110701_0_0_0cdc525961d3fa98e810ffae6bcc8e3838e36d93.patch" - ], - "version": "<0.5.0 >=0.3.3", - "modificationTime": "2015-11-06T02:09:36.180Z", - "comments": [ - "https://github.com/jashkenas/backbone/commit/0cdc525961d3fa98e810ffae6bcc8e3838e36d93.patch" - ], - "id": "patch:npm:backbone:20110701:0" -} -``` - -#### From and upgrade paths - -Both from and upgrade paths are arrays, where each item within the array is a package `name@version`. - -Take the following `from` path: - -``` -[ - "my-project@1.0.0", - "actionpack@4.2.5", - "rack@1.6.4" -] -``` - -Assuming this was returned as a result of a test, then we know: - -* The package that was tested was `my-project@1.0.0` -* The dependency with an issue was included in the tested package via the direct dependency `actionpack@4.2.5` -* The dependency with an issue was [rack@1.6.4](https://snyk.io/vuln/rubygems:rack@1.6.4) - -Take the following `upgrade` path: - -``` -[ - false, - "actionpack@5.0.0", - "rack@2.0.1" -] -``` - -Assuming this was returned as a result of a test, then we know: - -* The package that was tested is not upgradable (`false`) -* The direct dependency `actionpack` should be upgraded to at least version `5.0.0` in order to fix the issue -* Upgrading `actionpack` to version `5.0.0` will cause `rack` to be installed at version `2.0.1` - -If the `upgrade` path comes back as an empty array (`[]`) then this means that there is no upgrade path available which would fix the issue. - -#### License issue - -A license issue has no additional fields other than the ones in "Issue". - -#### Snyk organization - -The organization in Snyk this request is applicable to. The organization determines the access rights, licenses policy and is the unit of billing for private projects. - -A Snyk organization has these fields: - -| Property | Type | Description | Example | -| -------: | ------ | ----------------------------- | -------------------------------------- | -| name | string | The organization display name | "deelmaker" | -| id | string | The ID of the organization | "3ab0f8d3-b17d-4953-ab6d-e1cbfe1df385" | - -### Errors - -This is a beta release of this API. Therefore, despite our efforts, errors might occur. In the unlikely event of such an error, it will have the following structure as JSON in the body: - -| Property | Type | Description | Example | -| -------: | ------- | --------------------------------- | ------------------------------------------------------------------------ | -| message | string | Error message with reference | Error calling Snyk api (reference: 39db46b1-ad57-47e6-a87d-e34f6968030b) | -| errorRef | V4 uuid | An error ref to contact Snyk with | 39db46b1-ad57-47e6-a87d-e34f6968030b | - -The error reference will also be supplied in the `x-error-reference` header in the server reply. - -Example response: - -``` -HTTP/1.1 500 Internal Server Error -x-error-reference: a45ec9c1-065b-4f7b-baf8-dbd1552ffc9f -Content-Type: application/json; charset=utf-8 -Content-Length: 1848 -Vary: Accept-Encoding -Date: Sun, 10 Sep 2017 06:48:40 GMT -``` diff --git a/docs/snyk-api/v1-api-overview/v1-api-errors.md b/docs/snyk-api/v1-api-overview/v1-api-errors.md new file mode 100644 index 000000000000..10fea272247b --- /dev/null +++ b/docs/snyk-api/v1-api-overview/v1-api-errors.md @@ -0,0 +1,25 @@ +# V1 API errors + +The V1 API uses standard HTTP error codes for error responses. + +```json +{ + "code": 404, + "message": "Org 39db46b1-ad57-47e6-a87d-e34f6968030b was not found or you may not have the correct permissions to access the org.", + "error": "Org 39db46b1-ad57-47e6-a87d-e34f6968030b was not found or you may not have the correct permissions to access the org." +} +``` + +The error reference will also be supplied in the `x-error-reference` header in the server reply. + +Example `500` response: + +``` +HTTP/1.1 500 Internal Server Error +x-error-reference: a45ec9c1-065b-4f7b-baf8-dbd1552ffc9f +Content-Type: application/json; charset=utf-8 +Content-Length: 1848 +Vary: Accept-Encoding +Date: Sun, 10 Sep 2017 06:48:40 GMT +``` +