Monitor (v1)
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
The organization to test the package with. See "The Snyk organization for a request" above.
9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
Will prune large dep-graphs by removing identical sub-graphs under a top level dependency. If you receive a 422 error, it's likely that your dep-graph is too large to monitor. Pruning can help reduce the number of repetative paths but still retain at least one fully resolved path to ensure vulnerablities are not missed.
true
{"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":[]}]}}}
{"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 /v1/monitor/dep-graph HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
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": []
}
]
}
}
}
{
"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?