Skip to main content
POST
/
api
/
v1
/
deployments
/
{deploymentId}
/
dependencies
List dependencies
curl --request POST \
  --url https://semgrep.dev/api/v1/deployments/{deploymentId}/dependencies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cursor": "<string>",
  "dependencyFilter": {
    "license": [
      "<string>"
    ],
    "lockfilePath": "<string>",
    "name": "<string>",
    "packageFilters": [
      {
        "exactNameMatch": true,
        "exactVersion": "<string>",
        "name": "<string>",
        "versionLowerBound": "<string>",
        "versionUpperBound": "<string>"
      }
    ],
    "repositoryId": [
      123
    ],
    "version": "<string>"
  },
  "deploymentId": 123,
  "pageSize": 1000
}
'
{
  "dependencies": [
    {
      "id": "1",
      "name": "dependency1",
      "version": "1.0.0"
    },
    {
      "id": "2",
      "name": "dependency2",
      "version": "2.0.0"
    }
  ],
  "cursor": "<string>",
  "hasMore": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.semgrep.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Get access to data with your API token. Example header:

Authorization: Bearer 2991e2fb4b540fe75b8f90677b0b892b6314e4961cb001fe6eb452eee248a628

The token can be provisioned from the Tokens section in your Settings, and requires explicitly enabling Web API access.

Path Parameters

deploymentId
string<uint64>
required

Deployment ID (numeric). Example: 123. Can be found at /deployments, or in your Settings in the web UI.

Example:

123

Body

application/json
cursor
string<uint64>

Cursor to paginate through the dependencies. Provide a cursor value from the response to retrieve the next page.

dependencyFilter
object

Object to provide dependency details to filter by.

deploymentId
string<uint64>

Deployment ID (numeric). Example: 123. Can be found at /deployments, or in your Settings in the web UI.

Example:

123

pageSize
integer<int64>

Number of dependencies per page. Default: 1000, min: 1, max: 10000.

Required range: 1 <= x <= 10000
Example:

1000

Response

200 - application/json

OK

dependencies
object[]
required

List of dependencies.

Example:
[
{
"id": "1",
"name": "dependency1",
"version": "1.0.0"
},
{
"id": "2",
"name": "dependency2",
"version": "2.0.0"
}
]
cursor
string<uint64>

Pass to next request to get next page of results.

hasMore
boolean

True if there are more dependencies to get.