For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test (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.

Test package.json & yarn.lock File

post

Test for issues in yarn files.You can test your yarn packages for issues according to their manifest file & lockfile using this action. It takes a JSON object containing a "target" package.json and a yarn.lock.

Required permissions

  • View Organization

  • Test Packages

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
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/yarn
200Success

Test sbt file

post

Test for issues in sbt files.You can test your sbt packages for issues according to their manifest file using this action. It takes a JSON object containing a the "target" build.sbt.

Required permissions

  • View Organization

  • Test Packages

Query parameters
orgstringOptional

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

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
repositorystringOptional

The repository hosting this package. The default value is Maven Central. More than one value is supported, in order.

Example: https://repo1.maven.org/maven2
Body
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/sbt
200Success

sbt_Test for issues in a public package by group id, artifact id and version

get

Test for issues in sbt files.You can test sbt packages for issues according to their group ID, artifact ID and version. This is done via the maven endpoint (for Java), since the packages are hosted on maven central or a compatible repository. See "Maven" above for details.

Required permissions

  • View Organization

  • Test Packages

Path parameters
groupIdstringRequired

The package's group ID.

Example: org.apache.flex.blazeds
artifactIdstringRequired

The package's artifact ID.

Example: blazeds
versionstringRequired

The package version to test.

Example: 4.7.2
Query parameters
orgstringOptional

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

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
repositorystringOptional

The repository hosting this package. The default value is Maven Central. More than one value is supported, in order.

Example: https://repo1.maven.org/maven2
Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
get
/test/sbt/{groupId}/{artifactId}/{version}
200Success

Test gemfile.lock file

post

Test for issues in rubygems packages and applications.You can test your rubygems applications for issues according to their lockfile using this action. It takes a JSON object containing a the "target" Gemfile.lock.

Required permissions

  • View Organization

  • Test Packages

Query parameters
orgstringOptional

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

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Body
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/rubygems
200Success

Test for issues in a public gem by name and version

get

Test for issues in rubygems packages and applications.You can test rubygems packages for issues according to their name and version.

Required permissions

  • View Organization

  • Test Packages

Path parameters
gemNamestringRequired

The gem name.

Example: rails-html-sanitizer
versionstringRequired

The gem version to test.

Example: 1.0.3
Query parameters
orgstringOptional

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

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
get
/test/rubygems/{gemName}/{version}
200Success

Test requirements.txt file

post

Test for issues in pip files.You can test your pip packages for issues according to their manifest file using this action. It takes a JSON object containing a the "target" requirements.txt.

Required permissions

  • View Organization

  • Test Packages

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
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/pip
200Success

pip_Test for issues in a public package by name and version

get

Test for issues in pip files.You can test pip packages for issues according to their name and version.

Required permissions

  • View Organization

  • Test Packages

Path parameters
packageNamestringRequired

The package name.

Example: rsa
versionstringRequired

The Package version to test.

Example: 3.3
Query parameters
orgstringOptional

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

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
get
/test/pip/{packageName}/{version}
200Success

Test package.json & package-lock.json File

post

Test for issues in npm files.You can test your npm packages for issues according to their manifest file & optional lockfile using this action. It takes a JSON object containing a "target" package.json and optionally a package-lock.json.

Required permissions

  • View Organization

  • Test Packages

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
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/npm
200Success

Test for issues in a public package by name and version

get

Test for issues in npm files.You can test npm packages for issues according to their name and version.

Required permissions

  • View Organization

  • Test Packages

Path parameters
packageNamestringRequired

The package name. For scoped packages, must be url-encoded, so to test "@angular/core" version 4.3.2, one should GET /test/npm/%40angular%2Fcore/4.3.2.

Example: ms
versionstringRequired

The Package version to test.

Example: 0.7.0
Query parameters
orgstringOptional

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

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
get
/test/npm/{packageName}/{version}
200Success

Test maven file

post

Test for issues in Maven files.You can test your Maven packages for issues according to their manifest file using this action. It takes a JSON object containing a the "target" pom.xml.

Additional manifest files, if they are needed, like parent pom.xml files, child poms, etc., according the the definitions in the target pom.xml file, should be supplied in the additional body parameter.

Required permissions

  • View Organization

  • Test Packages

Query parameters
orgstringOptional

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

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
repositorystringOptional

The Maven repository hosting this package. The default value is Maven Central. More than one value is supported, in order.

Example: https://repo1.maven.org/maven2
Body
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/maven
200Success

Test for issues in a public package by group id, artifact id and version

get

Test for issues in Maven files.You can test maven packages for issues according to their coordinates: group ID, artifact ID and version. The repository hosting the package may also be customized (see the repository query parameter).

Required permissions

  • View Organization

  • Test Packages

Path parameters
groupIdstringRequired

The package's group ID.

Example: org.apache.flex.blazeds
artifactIdstringRequired

The package's artifact ID.

Example: blazeds
versionstringRequired

The package version to test.

Example: 4.7.2
Query parameters
orgstringOptional

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

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
repositorystringOptional

The Maven repository hosting this package. The default value is Maven Central. More than one value is supported, in order.

Example: https://repo1.maven.org/maven2
Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
get
/test/maven/{groupId}/{artifactId}/{version}
200Success

Test gradle file

post

Test for issues in Gradle files.You can test your Gradle packages for issues according to their manifest file using this action. It takes a JSON object containing the "target" build.gradle.

Required permissions

  • View Organization

  • Test Packages

Query parameters
orgstringOptional

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

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
repositorystringOptional

The repository hosting this package. The default value is Maven Central. More than one value is supported, in order.

Example: https://repo1.maven.org/maven2
Body
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/gradle
200Success

Test for issues in a public package by group, name and version

get

Test for issues in Gradle files.You can test gradle packages for issues according to their group, name and version. This is done via the maven endpoint (for Java), since the packages are hosted on maven central or a compatible repository. See "Maven" above for details.

Required permissions

  • View Organization

  • Test Packages

Path parameters
groupstringRequired

The package's group ID.

Example: org.apache.flex.blazeds
namestringRequired

The package's artifact ID.

Example: blazeds
versionstringRequired

The package version to test.

Example: 4.7.2
Query parameters
orgstringOptional

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

Example: 9695cbb1-3a87-4d6f-8ae1-61a1c37ee9f7
repositorystringOptional

The repository hosting this package. The default value is Maven Central. More than one value is supported, in order.

Example: https://repo1.maven.org/maven2
Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
get
/test/gradle/{group}/{name}/{version}
200Success

Test vendor.json File

post

Test for issues in Go vendor files.You can test your Go vendor packages for issues according to their manifest file using this action. It takes a JSON object containing a "target" vendor.json.

Required permissions

  • View Organization

  • Test Packages

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
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/govendor
200Success

Test Gopkg.toml & Gopkg.lock File

post

Test for issues in Go dep files.You can test your Go dep packages for issues according to their manifest file & lockfile using this action. It takes a JSON object containing a "target" Gopkg.toml and a Gopkg.lock.

Required permissions

  • View Organization

  • Test Packages

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
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/golangdep
200Success

Test Dep Graph

post

Test for issues in a Snyk dependency graph.

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

  • yarnUse this endpoint to find issues in a DepGraph data object.

Required permissions

  • View Organization

  • View Project

  • View Project Snapshot

  • 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
Responses
200Success
application/json
okbooleanRequired
packageManagerstringRequired
post
/test/dep-graph
200Success

Test composer.json & composer.lock file

post

Test for issues in PHP composer.json and composer.lock files.You can test your Composer packages for issues according to their manifest file & lockfile using this action. It takes a JSON object containing a "target" composer.json and a composer.lock.

Required permissions

  • View Organization

  • Test Packages

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
encodingall ofOptional
string · enumOptional

the encoding for the manifest files sent.

Possible values:
and
anyOptional

the encoding for the manifest files sent.

Responses
200Success
application/json
okbooleanRequired
dependencyCountinteger · int32Required
licensesPolicystring · nullableRequired
packageManagerstringRequired
post
/test/composer
200Success

Last updated

Was this helpful?