> ## Documentation Index
> Fetch the complete documentation index at: https://semgrep-ee9d73d8-mintlify-b75b9a88.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List dependencies



## OpenAPI

````yaml post /api/v1/deployments/{deploymentId}/dependencies
openapi: 3.0.3
info:
  description: >

    Welcome to Semgrep's portal for the Semgrep AppSec Platform web API.


    # Introduction

    Semgrep is a fast, open-source, static analysis tool for finding bugs and
    enforcing code standards at editor,

    commit, and CI time. [Get started.](https://semgrep.dev/getting-started/)


    Semgrep analyzes code locally on your computer or in your build environment:
    **code is never uploaded.**


    This API is documented in the **OpenAPI format**.


    # Authentication

    The API supports authentication with an API token with the "Web API"
    permission, without limited

    scopes of access.


    You can provision an API token [from the Settings
    page](https://semgrep.dev/orgs/-/settings/tokens).


    # Terms of Use


    Please note, the materials made available herein are subject to the

    [Semgrep Terms of Use](https://semgrep.dev/resources/website-terms/), and
    your

    access or use of any of the same is your acknowledgment and acceptance of
    the

    such terms.


    <br>


    ___
  title: Semgrep Web App
  version: 1.0.0
servers:
  - url: https://semgrep.dev
security: []
tags:
  - description: >-
      Deployments encapsulate your organization's security organization, with
      multiple projects, policies, and integrations. As the root object of the
      organization, they're similarly the root object of the API.
    name: DeploymentsService
    x-displayName: Deployment
  - description: >-
      Manage and retrieve code and supply chain security findings from Semgrep
      scans
    name: FindingsService
    x-displayName: Code and Supply Chain
  - description: Utility endpoints.
    name: MiscService
    x-displayName: Other
  - description: View and manage the Policies of your organization.
    name: PoliciesService
    x-displayName: Policies
  - name: ProjectsService
    x-displayName: Projects
  - description: View details of scans associated with projects in your organization.
    name: ScansService
    x-displayName: Scans
  - description: View and manage the Secrets of your organization.
    name: SecretsService
    x-displayName: Secrets
  - description: |-
      Manage the Supply Chain findings and dependencies of your organization.

      A request body is required, but may be an empty object.
    name: SupplyChainService
    x-displayName: Supply Chain
  - description: Create and manage external tickets
    name: TicketingService
    x-displayName: Ticketing
  - description: View and manage the triage of your organization.
    name: TriageService
    x-displayName: Triage
paths:
  /api/v1/deployments/{deploymentId}/dependencies:
    post:
      tags:
        - SupplyChainService
      summary: List dependencies
      operationId: SupplyChainService_ListDependencies
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            description: >-
              Deployment ID (numeric). Example: `123`. Can be found at
              `/deployments`, or in your Settings in the web UI.
            example: 123
            format: uint64
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/protos.openapi.v1.ListDependenciesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/protos.openapi.v1.ListDependenciesResponse
          description: OK
      security:
        - SemgrepWebToken: []
components:
  schemas:
    protos.openapi.v1.ListDependenciesRequest:
      properties:
        cursor:
          description: >-
            Cursor to paginate through the dependencies. Provide a cursor value
            from the response to retrieve the next page.
          format: uint64
          type: string
        dependencyFilter:
          $ref: '#/components/schemas/protos.sca.v1.DependencyFilter'
        deploymentId:
          description: >-
            Deployment ID (numeric). Example: `123`. Can be found at
            `/deployments`, or in your Settings in the web UI.
          example: 123
          format: uint64
          type: string
        pageSize:
          description: 'Number of dependencies per page. Default: 1000, min: 1, max: 10000.'
          example: 1000
          format: int64
          maximum: 10000
          minimum: 1
          type: integer
      required:
        - deployment_id
      title: List Dependencies Request
      type: object
    protos.openapi.v1.ListDependenciesResponse:
      properties:
        cursor:
          description: Pass to next request to get next page of results.
          format: uint64
          type: string
        dependencies:
          description: List of dependencies.
          example:
            - id: '1'
              name: dependency1
              version: 1.0.0
            - id: '2'
              name: dependency2
              version: 2.0.0
          items:
            $ref: '#/components/schemas/protos.sca.v1.FoundDependency'
          type: array
        hasMore:
          description: True if there are more dependencies to get.
          type: boolean
      required:
        - dependencies
        - has_more
      title: List Dependencies Response
      type: object
    protos.sca.v1.DependencyFilter:
      description: Object to provide dependency details to filter by.
      properties:
        ecosystem:
          description: |+
            Filter by ecosystem (e.g. npm, pypi, etc).

            | value | description |
            |-------|---------------|
            | no_package_manager |  |
            | npm |  |
            | pypi |  |
            | gomod |  |
            | cargo |  |
            | maven |  |
            | gem |  |
            | composer |  |
            | nuget |  |
            | pub |  |
            | swiftpm |  |
            | hex |  |

          enum:
            - no_package_manager
            - npm
            - pypi
            - gomod
            - cargo
            - maven
            - gem
            - composer
            - nuget
            - pub
            - swiftpm
            - hex
          items:
            enum:
              - no_package_manager
              - npm
              - pypi
              - gomod
              - cargo
              - maven
              - gem
              - composer
              - nuget
              - pub
              - swiftpm
              - hex
            format: enum
            type: string
          type: array
        license:
          description: Filter by license (e.g. MIT).
          items:
            type: string
          type: array
        licensePolicySettings:
          description: |+
            Filter by license policy setting outcome.

            | value | description |
            |-------|---------------|
            | LICENSE_POLICY_SETTING_ALLOW |  |
            | LICENSE_POLICY_SETTING_COMMENT |  |
            | LICENSE_POLICY_SETTING_BLOCK |  |

          enum:
            - LICENSE_POLICY_SETTING_ALLOW
            - LICENSE_POLICY_SETTING_COMMENT
            - LICENSE_POLICY_SETTING_BLOCK
          items:
            enum:
              - LICENSE_POLICY_SETTING_UNSPECIFIED
              - LICENSE_POLICY_SETTING_ALLOW
              - LICENSE_POLICY_SETTING_COMMENT
              - LICENSE_POLICY_SETTING_BLOCK
            format: enum
            type: string
          type: array
        lockfilePath:
          description: Filter by path to the lockfile (e.g. `foo/bar/package-lock.json`).
          type: string
        name:
          description: >-
            Deprecated - use package_filters instead. Filter by dependency name
            (e.g. lodash).
          type: string
        packageFilters:
          description: >-
            Multiple package filters with exact name matching and version
            bounds.
          items:
            $ref: '#/components/schemas/protos.sca.v1.PackageFilter'
          type: array
        repositoryId:
          description: >-
            Repository IDs (numeric) to filter by. Omit if the endpoint has
            Repository ID as a path parameter.
             Use Projects endpoints to retrieve Repository IDs.
          items:
            format: uint32
            type: integer
          type: array
        transitivity:
          description: |+
            Filter by transitivity.

            | value | description |
            |-------|---------------|
            | UNKNOWN_TRANSITIVITY |  |
            | TRANSITIVE |  |
            | DIRECT |  |

          enum:
            - UNKNOWN_TRANSITIVITY
            - TRANSITIVE
            - DIRECT
          items:
            enum:
              - UNKNOWN_TRANSITIVITY
              - TRANSITIVE
              - DIRECT
            format: enum
            type: string
          type: array
        version:
          description: >-
            Deprecated - use package_filters instead. Filter by dependency
            version (e.g. 1.0.1).
          type: string
      type: object
    protos.sca.v1.FoundDependency:
      properties:
        definedAt:
          allOf:
            - $ref: '#/components/schemas/protos.sca.v1.CodeLocation'
          description: Path and line number dependency is declared in.
        ecosystem:
          description: |+
            The ecosystem the dependency is in (e.g. pypi, npm, etc).

            | value | description |
            |-------|---------------|
            | no_package_manager |  |
            | npm |  |
            | pypi |  |
            | gomod |  |
            | cargo |  |
            | maven |  |
            | gem |  |
            | composer |  |
            | nuget |  |
            | pub |  |
            | swiftpm |  |
            | hex |  |

          enum:
            - no_package_manager
            - npm
            - pypi
            - gomod
            - cargo
            - maven
            - gem
            - composer
            - nuget
            - pub
            - swiftpm
            - hex
          format: enum
          type: string
        licenses:
          description: Licenses the dependency is using.
          items:
            type: string
          type: array
        manifestDefinition:
          allOf:
            - $ref: '#/components/schemas/protos.sca.v1.CodeLocation'
          description: >-
            Path to the manifest file that defines the subproject containing
            this dependency
        package:
          allOf:
            - $ref: '#/components/schemas/protos.sca.v1.Dependency'
          description: What the dependency is.
        repositoryId:
          description: ID of repository dependency is found in.
          type: string
        resolvedUrl:
          description: >-
            The resolved URL of the dependency. Could point to a compressed
            source code directory (e.g. tarball), source code repository, or a
            package manager cache directory. May be empty if the package manager
            doesn't supply a URL.
          type: string
        transitivity:
          description: |+
            Whether dependency is direct or transitive.

            | value | description |
            |-------|---------------|
            | UNKNOWN_TRANSITIVITY |  |
            | TRANSITIVE |  |
            | DIRECT |  |

          enum:
            - UNKNOWN_TRANSITIVITY
            - TRANSITIVE
            - DIRECT
          format: enum
          type: string
      type: object
    protos.sca.v1.PackageFilter:
      description: Individual package filter with optional version bounds.
      properties:
        exactNameMatch:
          description: >-
            When true, name must match exactly. When false (default), name is
            fuzzy-matched (contains).
          type: boolean
        exactVersion:
          description: |-
            Exact version match (e.g. "1.0.0").
             Takes precedence over version bounds if set.
          type: string
        name:
          description: Exact package name (e.g. lodash).
          type: string
        versionLowerBound:
          description: |-
            Lower bound version constraint (e.g. ">=1.0.0").
             Ignored if exact_version is set.
          type: string
        versionUpperBound:
          description: |-
            Upper bound version constraint (e.g. "<2.0.0").
             Ignored if exact_version is set.
          type: string
      type: object
    protos.sca.v1.CodeLocation:
      description: Specific location in a file.
      properties:
        committedAt:
          description: Timestamp when code file was last modified, if available.
          format: date-time
          type: string
        endCol:
          description: Ending column number (1 indexed).
          type: string
        endLine:
          description: Ending line number (1 indexed).
          type: string
        path:
          description: Path to a file.
          type: string
        startCol:
          description: Starting column number (1 indexed).
          type: string
        startLine:
          description: Starting line number (1 indexed).
          type: string
        url:
          description: URL to code location if available, otherwise empty.
          type: string
      type: object
    protos.sca.v1.Dependency:
      description: A specific dependency.
      properties:
        name:
          description: String identifier of dependency
          type: string
        versionSpecifier:
          description: Version specifier of dependency.
          type: string
      type: object
  securitySchemes:
    SemgrepWebToken:
      bearerFormat: string
      description: >-
        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.
      scheme: bearer
      type: http

````