Monitor (v1)

This document uses the v1 API, which will eventually be deprecated, as further Snyk developments are now focused on the REST API. For more details, see the v1 API.

Monitor Dep Graph

post

Experimental! Note these endpoints are subject to change and only available to selected users. Please contact support@snyk.io to request access.

The following package managers are supported:

  • deb

  • gomodules

  • gradle

  • maven

  • nuget

  • paket

  • pip

  • rpm

  • rubygems

  • cocoapods

  • npm

  • yarn

The name of the root node in the dep-graph is used as the project name when creating a project. This should be unique for your organization. In the example given below 'my-maven-app' will be the project name.

To inform Snyk that some dependencies in your project have changed ensure subsequent requests use the same root node name.Use this endpoint to monitor a DepGraph data object.

Required permissions

  • View Organization

  • Add Project

  • Test Project

Query parameters
orgstringoptional

The organization to test the package with. See "The Snyk organization for a request" above.

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
Body
all ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/v1/monitor/dep-graph' \
  --header 'Content-Type: application/json' \
  --data '{
    "depGraph": {
      "schemaVersion": "1.2.0",
      "pkgManager": {
        "name": "maven"
      },
      "pkgs": [
        {
          "id": "my-maven-app@1.0.0",
          "info": {
            "name": "my-maven-app",
            "version": "1.0.0"
          }
        },
        {
          "id": "ch.qos.logback:logback-core@1.0.13",
          "info": {
            "name": "ch.qos.logback:logback-core",
            "version": "1.0.13"
          }
        }
      ],
      "graph": {
        "rootNodeId": "root-node",
        "nodes": [
          {
            "nodeId": "root-node",
            "pkgId": "my-maven-app@1.0.0",
            "deps": [
              {
                "nodeId": "ch.qos.logback:logback-core@1.0.13"
              }
            ]
          },
          {
            "nodeId": "ch.qos.logback:logback-core@1.0.13",
            "pkgId": "ch.qos.logback:logback-core@1.0.13",
            "deps": []
          }
        ]
      }
    }
  }'
{
  "ok": true,
  "id": "f7c065cd-5850-462d-a0ca-9719d07e3e38",
  "uri": "https://app.snyk.io/org/my-org/project/f7c065cd-5850-462d-a0ca-9719d07e3e38/history/39d14036-31f3-4f22-8037-1d979e0516ef"
}

Last updated

Was this helpful?