Monitor (v1)

이 문서는 v1 API를 사용합니다. 자세한 내용은 v1 API를 참조하십시오.

Monitor Dep Graph

post

Experimental! Note these endpoints are subject to change and only available to selected users. Please contact [email protected] 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
and
anyOptionalExample: {"depGraph":{"schemaVersion":"1.2.0","pkgManager":{"name":"maven"},"pkgs":[{"id":"[email protected]","info":{"name":"my-maven-app","version":"1.0.0"}},{"id":"ch.qos.logback:[email protected]","info":{"name":"ch.qos.logback:logback-core","version":"1.0.13"}}],"graph":{"rootNodeId":"root-node","nodes":[{"nodeId":"root-node","pkgId":"[email protected]","deps":[{"nodeId":"ch.qos.logback:[email protected]"}]},{"nodeId":"ch.qos.logback:[email protected]","pkgId":"ch.qos.logback:[email protected]","deps":[]}]}}}
Responses
200Success
application/json; charset=utf-8
Responseall of
and
anyOptionalExample: {"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"}
post
POST /v1/monitor/dep-graph HTTP/1.1
Host: api.snyk.io
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 520

{
  "depGraph": {
    "schemaVersion": "1.2.0",
    "pkgManager": {
      "name": "maven"
    },
    "pkgs": [
      {
        "id": "[email protected]",
        "info": {
          "name": "my-maven-app",
          "version": "1.0.0"
        }
      },
      {
        "id": "ch.qos.logback:[email protected]",
        "info": {
          "name": "ch.qos.logback:logback-core",
          "version": "1.0.13"
        }
      }
    ],
    "graph": {
      "rootNodeId": "root-node",
      "nodes": [
        {
          "nodeId": "root-node",
          "pkgId": "[email protected]",
          "deps": [
            {
              "nodeId": "ch.qos.logback:[email protected]"
            }
          ]
        },
        {
          "nodeId": "ch.qos.logback:[email protected]",
          "pkgId": "ch.qos.logback:[email protected]",
          "deps": []
        }
      ]
    }
  }
}
200Success
{
  "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