> ## 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.

# Create a new SBOM export job



## OpenAPI

````yaml /public_v1.openapi.yaml post /api/v1/deployments/{deploymentId}/sbom/export
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/docs/getting-started/)


    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: []
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
    x-group: Deployment
  - description: >-
      Manage and retrieve code, supply chain, and AI-powered scan findings from
      Semgrep scans
    name: FindingsService
    x-displayName: Code, Supply Chain, and AI-Powered Scan
    x-group: Code, Supply Chain, and AI-Powered Scan
  - description: Utility endpoints.
    name: MiscService
    x-displayName: Other
    x-group: Other
  - description: >-
      View and manage the Policies of your organization.


      Deployments on the Unified Policies model use the [Policies V2
      API](/api/v2/docs/#tag/PoliciesV2Service) instead; this service stops
      working after the migration.
    name: PoliciesService
    x-displayName: Policies
    x-group: Policies
  - name: ProjectsService
    x-displayName: Projects
    x-group: Projects
  - description: View details of scans associated with projects in your organization.
    name: ScansService
    x-displayName: Scans
    x-group: Scans
  - description: View and manage the Secrets of your organization.
    name: SecretsService
    x-displayName: Secrets
    x-group: 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
    x-group: Supply Chain
  - description: Create and manage external tickets
    name: TicketingService
    x-displayName: Ticketing
    x-group: Ticketing
  - description: View and manage the triage of your organization.
    name: TriageService
    x-displayName: Triage
    x-group: Triage
paths:
  /api/v1/deployments/{deploymentId}/sbom/export:
    post:
      tags:
        - SupplyChainService
      summary: Create a new SBOM export job
      operationId: SupplyChainService_CreateSbomExport
      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: int64
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/protos.openapi.v1.CreateSbomExportRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/protos.openapi.v1.CreateSbomExportResponse
          description: OK
      security:
        - SemgrepWebToken: []
components:
  schemas:
    protos.openapi.v1.CreateSbomExportRequest:
      properties:
        deploymentId:
          description: >-
            Deployment ID (numeric). Example: `123`. Can be found at
            `/deployments`, or in your Settings in the web UI.
          example: 123
          format: int64
          type: string
        formatVersion:
          $ref: '#/components/schemas/protos.sca.v1.SbomFormatVersion'
        metadataComponentType:
          default: SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_APPLICATION
          description: >+
            Metadata component type for the SBOM export.


            | value | description |

            |-------|---------------|

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_APPLICATION |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_FRAMEWORK |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_LIBRARY |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_CONTAINER |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_PLATFORM |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_OPERATING_SYSTEM |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_DEVICE |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_DEVICE_DRIVER |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_FIRMWARE |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_FILE |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_MACHINE_LEARNING_MODEL
            |  |

            | SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_DATA |  |

          enum:
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_APPLICATION
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_FRAMEWORK
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_LIBRARY
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_CONTAINER
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_PLATFORM
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_OPERATING_SYSTEM
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_DEVICE
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_DEVICE_DRIVER
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_FIRMWARE
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_FILE
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_MACHINE_LEARNING_MODEL
            - SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_DATA
          example: SBOM_METADATA_COMPONENT_TYPE_CYCLONE_DX_V15_APPLICATION
          format: enum
          type: string
        metadataSupplier:
          $ref: '#/components/schemas/protos.sca.v1.SbomMetadataSupplier'
        ref:
          description: Branch to export SBOM for (Ex. ref=`refs/pull/1234/merge`).
          example: refs/pull/1234/merge
          type: string
        repositoryId:
          description: Repository ID to export SBOM for.
          example: 123
          format: int64
          type: string
        sbomOutputFormat:
          description: |+
            SBOM output format for the SBOM export.

            | value | description |
            |-------|---------------|
            | SBOM_OUTPUT_FORMAT_JSON |  |

          enum:
            - SBOM_OUTPUT_FORMAT_JSON
            - SBOM_OUTPUT_FORMAT_CYCLONEDX
          example: SBOM_OUTPUT_FORMAT_JSON
          format: enum
          type: string
      required:
        - deployment_id
      title: Create Sbom Export Request
      type: object
    protos.openapi.v1.CreateSbomExportResponse:
      properties:
        taskToken:
          description: Task token for the SBOM export job.
          type: string
      required:
        - task_token
      title: Create Sbom Export Response
      type: object
    protos.sca.v1.SbomFormatVersion:
      properties:
        cyclonedxVersion:
          description: >+
            CycloneDX schema version for the SBOM export. Supported: 1.4, 1.5,
            1.6, 1.7. Defaults to 1.4 when unset.


            | value | description |

            |-------|---------------|

            | SBOM_CYCLONE_DX_VERSION_V1_4 |  |

            | SBOM_CYCLONE_DX_VERSION_V1_5 |  |

            | SBOM_CYCLONE_DX_VERSION_V1_6 |  |

            | SBOM_CYCLONE_DX_VERSION_V1_7 |  |

          enum:
            - SBOM_CYCLONE_DX_VERSION_V1_4
            - SBOM_CYCLONE_DX_VERSION_V1_5
            - SBOM_CYCLONE_DX_VERSION_V1_6
            - SBOM_CYCLONE_DX_VERSION_V1_7
          example: SBOM_CYCLONE_DX_VERSION_V1_7
          format: enum
          type: string
        format:
          default: SBOM_FORMAT_CYCLONEDX
          description: |+
            Format for the SBOM export.

            | value | description |
            |-------|---------------|
            | SBOM_FORMAT_CYCLONEDX |  |

          enum:
            - SBOM_FORMAT_CYCLONEDX
          format: enum
          type: string
      type: object
    protos.sca.v1.SbomMetadataSupplier:
      properties:
        contact:
          $ref: '#/components/schemas/protos.sca.v1.SbomMetadataContact'
        name:
          type: string
        url:
          type: string
      type: object
    protos.sca.v1.SbomMetadataContact:
      properties:
        email:
          type: string
        name:
          type: string
        phone:
          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

````